Mail Archives: djgpp-workers/1999/07/18/04:37:56
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?
- Raw text -