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

Comparing ray/src/common/readmesh.c (file contents):
Revision 2.18 by greg, Mon Jul 12 17:42:51 2021 UTC vs.
Revision 2.19 by greg, Tue Feb 7 20:28:16 2023 UTC

# Line 250 | Line 250 | int    flags;
250                  error(SYSTEM, errmsg);
251          }
252          SET_FILE_BINARY(meshfp);
253 + #ifdef getc_unlocked                    /* avoid stupid semaphores */
254 +        flockfile(meshfp);
255 + #endif
256                                          /* read header */
257          checkheader(meshfp, MESHFMT, flags&IO_INFO ? stdout : (FILE *)NULL);
258                                          /* read format number */
# Line 292 | Line 295 | int    flags;
295                                          /* clean up */
296          if (meshfp != stdin)
297                  fclose(meshfp);
298 + #ifdef getc_unlocked
299 +        else
300 +                funlockfile(meshfp);
301 + #endif
302          mp->ldflags |= flags;
303                                          /* verify data */
304          if ((err = checkmesh(mp)) != NULL)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines