Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!overload!dillon From: dillon@overload.Berkeley.CA.US (Matthew Dillon) Newsgroups: comp.sys.amiga.tech Subject: Re: Problems with lseek() under Manx 5.0b Message-ID: Date: 6 Aug 90 21:35:30 GMT References: <55519@ames.arc.nasa.gov> Lines: 35 In article <55519@ames.arc.nasa.gov> smithwik@pioneer.arc.nasa.gov (R. Michael Smithwick -- FSN) writes: >[] > >As anyone else encounted the lseek problem in Manx 5.0b and >know of a workaround? > >I want to lseek back to the beginning of a file, and write some >updated info to it. I use lseek(fd,0,0). Trouble is, write() >begins at the end of the file, not where the lseek is supposed to be. > >mike > > >> mike smithwick << Two possible problems: (1) You are compiling using 16 bit ints (which is an option under 5.0 I believe, the default is 32 bits), and did not #include , thus no prototype and thus the second argument is being passed as a short instead of a long. (2) You openned the file with the O_APPEND flag. Any write() to the file will always append, period. (3) There really is a bug with Aztec. -Matt -- Matthew Dillon dillon@Overload.Berkeley.CA.US 891 Regal Rd. uunet.uu.net!overload!dillon Berkeley, Ca. 94708 USA