home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / mod.std.unix.v3 / text0021.txt < prev    next >
Encoding:
Internet Message Format  |  1987-06-30  |  1.6 KB

  1. Date:     Fri, 15 Nov 85 11:49:49 EST
  2. From: Dan Franklin <dan@BBN-PROPHET.ARPA>
  3.  
  4. While we're moving kernel-dependent values out of limits.h into a system call
  5. where they belong, it seems only appropriate to list the limits which I believe
  6. are appropriate for limits.h, and should stay there.
  7.  
  8.     {CHAR_BIT} Maximum number of bits in a datum of type char
  9.     {CHAR_MAX} Maximum magnitude for a datum of type char
  10.     {CHAR_MIN} Minimum magnitude for a datum of type char
  11.     {INT_MAX}  (Same for ints)
  12.     {INT_MIN}
  13.     {LONG_MAX} (For longs)
  14.     {LONG_MIN}
  15.     {SHRT_MAX} (For shorts)
  16.     {SHRT_MIN}
  17.     {USI_MAX}  (For unsigned ints)
  18.     {WORD_BIT} Number of bits in a word or datum of type int
  19.  
  20. These limits reflect the architecture of the CPU as viewed through the
  21. compiler; they would change only if the CPU architecture or the compiler
  22. changed.  They can safely be kept in limits.h because if the architecture
  23. changed, recompilation would be necessary for other reasons besides getting the
  24. value of the limit to be up-to-date; and if the compiler changed, recompilation
  25. wouldn't be necessary because the operation of binaries is not affected by
  26. changes to the compiler (except perhaps binaries that actually deal with
  27. compiler output, like symbol tables and .o files and so on; again, such
  28. binaries would need a lot more than just an up-to-date value or two).
  29.  
  30. It's also inappropriate (as well as unnecessary) for the kernel to return these
  31. values, since they are not properties of the kernel like {PIPE_MAX}.
  32.  
  33. By the way, why aren't there USL_MAX, USC_MAX, and USS_MAX? (For unsigned
  34. longs, chars, and shorts respectively.)
  35.  
  36.     Dan
  37.  
  38. Volume-Number: Volume 3, Number 22
  39.  
  40.