home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / sysv386 / 13366 < prev    next >
Encoding:
Text File  |  1992-08-19  |  1.3 KB  |  32 lines

  1. Newsgroups: comp.unix.sysv386
  2. Path: sparky!uunet!kithrup!sef
  3. From: sef@kithrup.COM (Sean Eric Fagan)
  4. Subject: Re: BSD compatibility libraries/modules for System V (3.2)
  5. Organization: Kithrup Enterprises, Ltd.
  6. Date: Thu, 20 Aug 1992 05:03:42 GMT
  7. Message-ID: <1992Aug20.050342.6477@kithrup.COM>
  8. References: <1992Aug19.003841.18005@mintaka.lcs.mit.edu> <9208192339.AA21411@iecc.cambridge.ma.us>
  9. Lines: 21
  10.  
  11. In article <9208192339.AA21411@iecc.cambridge.ma.us> johnl@iecc.cambridge.ma.us (John R. Levine) writes:
  12. >It turns out that SysV3.2/386 actually has a ftruncate() call, but they never
  13. >bothered to document it because it's hidden in the Xenix compatibility
  14. >library.  Try using chsize(fd, size) and link in -lx.
  15.  
  16. On an SCO 3.2v2 machine, in <sys/fcntl.h>:
  17.  
  18.     #define F_CHSIZE    0x6000     /* XENIX chsize() system call */    
  19.  
  20. Experimentation shows that the call is
  21.  
  22.     fcntl (fd, F_CHSIZE, size);
  23.  
  24. You don't want to use -lx, in general, because the old, broken readdir() and
  25. company tend to be put in there.
  26.  
  27. -- 
  28. Sean Eric Fagan  | "You can't get lost in in one room, no matter how
  29. sef@kithrup.COM  |  little effort you make to learn your way around."
  30. -----------------+    -- William E Davidsen (william@crd.GE.COM)
  31. Any opinions expressed are my own, and generally unpopular with others.
  32.