--- ray/src/rt/ambient.c 1993/01/26 09:08:20 2.17 +++ ray/src/rt/ambient.c 1993/01/29 12:02:23 2.18 @@ -384,20 +384,9 @@ memerr: } -#ifdef NIX +#ifdef F_SETLKW int -ambsync() /* flush ambient file */ -{ - if (nunflshed == 0) - return(0); - nunflshed = 0; - return(fflush(ambfp)); -} - -#else - -int ambsync() /* synchronize ambient file */ { static FILE *ambinp = NULL; @@ -444,6 +433,17 @@ syncend: fcntl(fileno(ambfp), F_SETLKW, &fls); nunflshed = 0; return(n); +} + +#else + +int +ambsync() /* flush ambient file */ +{ + if (nunflshed == 0) + return(0); + nunflshed = 0; + return(fflush(ambfp)); } #endif