a question on open() and lseek()
Allyn Fratkin
allyn at sdcsvax.UUCP
Tue Apr 29 12:41:02 AEST 1986
In article <423 at ukecc.UUCP>, edward at ukecc.UUCP (Edward C. Bennett) writes:
>
> #ifdef O_APPEND
> f = open( file, O_WRONLY | O_APPEND );
> #else
> f = open( file, O_WRONLY );
> lseek( f, 0L, L_XTND );
> #endif ^
In the interests of portability,the 0 should be replaced with 0L in the lseek
line to make this portable to smaller machines (e.g., machines with
16 bit ints). Also many machines do not have defines for L_XTND.
This is the value 2.
--
From the virtual mind of Allyn Fratkin allyn at sdcsvax.ucsd.edu or
UCSD EMU/Pascal Project {ucbvax, decvax, ihnp4}
U.C. San Diego !sdcsvax!allyn
"Generally you don't see that kind of behavior in a major appliance."
More information about the Comp.unix.wizards
mailing list