SCO Open Server 3 (SCO report)

Gert Doering gert at greenie.muc.de
Sun Jan 28 04:42:34 EST 2001


Hi,

On Fri, Jan 26, 2001 at 09:26:26PM -0600, mouring at etoh.eviladmin.org wrote:
> On the topic of SCO.  Can someone please explain the use 
> of "-Dftruncate=chsize"?  

ftruncate() does not exist on SCO 3, while chsize() does (coming from
the Xenix heritage).  They have the same calling syntax, so the #define
above fixes all uses of ftruncate().

> I can't find a manpage on any platform for chsize().  

Look on SCO 3 :) (head of the man page appendend below).

> And I'm interested in why it was not handled in bsd-misc.c.  

Can't comment on that.

gert
------------
 chsize(S)                      6 January 1993                      chsize(S)

 Name

    chsize - changes the size of a file

 Syntax

    cc  . . .  -lx

    int chsize (fildes, size)
    int fildes;
    long size;

 Description

    fildes is a file descriptor obtained from a creat, open, dup, fcntl, or
    pipe system call.  chsize changes the size of the file associated with
    the file descriptor fildes to be exactly size bytes in length.  The rou-
    tine either truncates the file, or pads it with an appropriate number of
    bytes.  If size is less than the initial size of the file, then all allo-
    cated disk blocks between size and the initial file size are freed.
[...]
 Standards conformance

    chsize is an extension of AT&T System V provided by the Santa Cruz Opera-
    tion.


-- 
Gert Doering
Mobile communications ... right now writing from *@home*
... mobile phone: +49 177 2160221 ... or mail me:  gert at greenie.muc.de





More information about the openssh-unix-dev mailing list