Date: Sun, 18 Jul 1999 11:20:55 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: djgpp-workers AT delorie DOT com Subject: ftruncate Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com I've seen code in some GNU package which seems to imply that `ftruncate' doesn't move the file pointer position. Our implementation does. I am not sure whether this is a bug in the GNU application or in our implementation. One Unix box says in the man page that the file pointer is left unaltered, but the rest keep silent. Could someone please see how does `ftruncate' behave on Unix/Linux? And while at that: since `ftruncate' is in man2, it probably means that it is a system call. If so, would it be reasonable to have a separate FSEXT number for it? I mean, some extensions could support truncation, but not lseek, right? Also, short of looking into sources, there's no easy way for an application programmer to know that `ftruncate' is an `lseek' followed by `_write'. Comments?