ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/readoct.c
(Generate patch)

Comparing ray/src/common/readoct.c (file contents):
Revision 2.31 by greg, Sat May 4 00:32:47 2019 UTC vs.
Revision 2.32 by greg, Tue Feb 7 20:28:16 2023 UTC

# Line 63 | Line 63 | readoct(                               /* read in octree file or stream */
63                          error(SYSTEM, errmsg);
64                  }
65          }
66 + #ifdef getc_unlocked                    /* avoid stupid semaphores */
67 +        flockfile(infp);
68 + #endif
69          SET_FILE_BINARY(infp);
70                                          /* get header */
71          if (checkheader(infp, OCTFMT, load&IO_INFO ? stdout : (FILE *)NULL) < 0)
# Line 120 | Line 123 | readoct(                               /* read in octree file or stream */
123                  pclose(infp);
124          else if (infp != stdin)
125                  fclose(infp);
126 + #ifdef getc_unlocked
127 +        else
128 +                funlockfile(infp);
129 + #endif
130          return(nf);
131   }
132  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines