CompuServe Messages

#porting file i/o

    21-Jul-93 15:26:20
Sb: #porting file i/o
Fm: Rick Martin 73110,704
To: All
Hello All, I am porting some C code to the Mac and running into problems with using the unix compatible file i/o functions (open, write, read, lseek). The operations appear to function (i.e., errno = 0, and proper return codes), but the function doesn't seem to have done its job. For example, open a file, seek to the end and write 1024 bytes to the file. The file is open for read/ write and there is enough disk space. The write returns a zero, which indicates zero bytes written (which is what happened), but there is no explanation for it not having written the entire 1024 bytes. I have copied the code into a small test program and it works fine there, just not in the code I'm porting. I anyone could point me in the write <g> direction, I'd be grateful. Thanks, Rick