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

Comparing ray/src/common/caldefn.c (file contents):
Revision 2.33 by greg, Fri Apr 8 23:32:25 2022 UTC vs.
Revision 2.34 by greg, Tue Feb 7 20:28:16 2023 UTC

# Line 78 | Line 78 | fcompile(                      /* get definitions from a file */
78          eputs(": cannot open\n");
79          quit(1);
80      }
81 <    initfile(fp, fname, 0);
81 > #ifdef getc_unlocked                    /* avoid stupid semaphores */
82 >    flockfile(fp);
83 > #endif
84 >   initfile(fp, fname, 0);
85      while (nextc != EOF)
86          getstatement();
87      if (fname != NULL)
88          fclose(fp);
89 + #ifdef getc_unlocked
90 +    else
91 +        funlockfile(fp);
92 + #endif
93   }
94  
95  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines