home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / bsd / 3008 < prev    next >
Encoding:
Internet Message Format  |  1992-07-27  |  2.1 KB

  1. Path: sparky!uunet!cs.utexas.edu!usc!sdd.hp.com!uakari.primate.wisc.edu!ames!sgi!fido!zola!twilight!zuni!anchor!olson
  2. From: olson@anchor.esd.sgi.com (Dave Olson)
  3. Newsgroups: comp.unix.bsd
  4. Subject: Re: Beware of fileno()
  5. Keywords: sunos, ultrix, stdio, fileno, lossage, irix
  6. Message-ID: <nrg0vuk@zuni.esd.sgi.com>
  7. Date: 28 Jul 92 03:06:39 GMT
  8. References: <14njaeINNvk@agate.berkeley.edu> <1992Jul24.062320.2170@kithrup.COM> <1992Jul24.141048.10911@aosg.gsf.dec.com> <1217@ki.com>
  9. Sender: news@zuni.esd.sgi.com (Net News)
  10. Organization: Silicon Graphics, Inc.  Mountain View, CA
  11. Lines: 32
  12.  
  13. In <1217@ki.com> dwatts@ki.com (Dan Watts) writes:
  14.  
  15. | In article <1992Jul24.141048.10911@aosg.gsf.dec.com> reeves@decvax.dec.com writes:
  16. | ||> >Sean Eric Fagan   |> Andreas Stolcke
  17. | ||> >... fileno() returns a char field in the FILE structure...one has to use
  18. | ||> >    (unsigned char)fileno(stream) 
  19. | ||> Current BSD sources have the _file element as a short.
  20. | |
  21. | |The same change went into ULTRIX over a year ago; I believe it's been released
  22. | |for nearly a year (it was definitely in V4.2, which isn't even the current
  23. | |release any more).
  24. | |-- 
  25. | |Jon Reeves    Digital Equipment Corporation, Alpha Open Systems Group
  26. | |        5 Wentworth Drive, MS GSF1-1K13, Hudson NH 03051-4929 USA
  27. | |+1 603 884 5859    reeves@decvax.dec.com    FAX: +1 603 884 1685
  28. | SGI Irix 4.0.1 still has it as "char _file;".  I wonder if they've
  29. | fixed it yet?  Luckily, the default behaviour for the SGI C compiler
  30. | is to treat all chars as unsigned.
  31.  
  32. We only go up to 100 files per process by default; 200 can be
  33. configured in 4.0.5 though.  In any case, characters are unsigned by
  34. default.  If you use  -signed when compiling, and you configure the
  35. system for more files per process, then yes, this could be a problem,
  36. EXCEPT, that stdio will deal with at most 100 files, even if the system
  37. limit is configured higher, so it is pretty unlikely, although not
  38. impossible, for this to be a problem.
  39.  
  40. --
  41. Let no one tell me that silence gives consent,  |   Dave Olson
  42. because whoever is silent dissents.             |   Silicon Graphics, Inc.
  43.     Maria Isabel Barreno                        |   olson@sgi.com
  44.