Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site sdcsvax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!ittatc!dcdwest!sdcsvax!allyn From: allyn@sdcsvax.UUCP (Allyn Fratkin) Newsgroups: net.unix-wizards Subject: Re: a question on open() and lseek() Message-ID: <1727@sdcsvax.UUCP> Date: Mon, 28-Apr-86 22:41:02 EDT Article-I.D.: sdcsvax.1727 Posted: Mon Apr 28 22:41:02 1986 Date-Received: Fri, 2-May-86 07:16:27 EDT References: <2594@brl-smoke.ARPA> <691@edison.UUCP> <1968@ism780c.UUCP> <423@ukecc.UUCP> Organization: U.C. San Diego Lines: 20 In article <423@ukecc.UUCP>, edward@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@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."