# | Line 47 | Line 47 | readobj( /* read in an object file or stream */ | |
---|---|---|
47 | sprintf(errmsg, "cannot open scene file \"%s\"", inpspec); | |
48 | error(SYSTEM, errmsg); | |
49 | } | |
50 | + | #ifdef getc_unlocked /* avoid stupid semaphores */ |
51 | + | flockfile(infp); |
52 | + | #endif |
53 | while ((c = getc(infp)) != EOF) { | |
54 | if (isspace(c)) | |
55 | continue; | |
# | Line 65 | Line 68 | readobj( /* read in an object file or stream */ | |
68 | pclose(infp); | |
69 | else if (infp != stdin) | |
70 | fclose(infp); | |
71 | + | #ifdef getc_unlocked |
72 | + | else |
73 | + | funlockfile(infp); |
74 | + | #endif |
75 | if (nobjects == lastobj) { | |
76 | sprintf(errmsg, "(%s): empty file", inpspec); | |
77 | error(WARNING, errmsg); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |