limits.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /* $Source: /u/mark/src/pax/RCS/limits.h,v $
  2. *
  3. * $Revision: 1.2 $
  4. *
  5. * limits.h - POSIX compatible defnitions for some of <limits.h>
  6. *
  7. * DESCRIPTION
  8. *
  9. * We need to include <limits.h> if this system is being compiled with an
  10. * ANSI standard C compiler, or if we are running on a POSIX confomrming
  11. * system. If the manifest constant _POSIX_SOURCE is not defined when
  12. * <limits.h> is included, then none of the POSIX constants are defined
  13. * and we need to define them here. It's a bit wierd, but it works.
  14. *
  15. * These values where taken from the IEEE P1003.1 standard, draft 12.
  16. * All of the values below are the MINIMUM values allowed by the standard.
  17. * Not all values are used by the PAX program, but they are included for
  18. * completeness, and for support of future enhancements. Please see
  19. * section 2.9 of the draft standard for more information on the following
  20. * constants.
  21. *
  22. * AUTHOR
  23. *
  24. * Mark H. Colburn, NAPS International (mark@jhereg.mn.org)
  25. *
  26. * Sponsored by The USENIX Association for public distribution.
  27. *
  28. * Copyright (c) 1989 Mark H. Colburn.
  29. * All rights reserved.
  30. *
  31. * Redistribution and use in source and binary forms are permitted
  32. * provided that the above copyright notice and this paragraph are
  33. * duplicated in all such forms and that any documentation,
  34. * advertising materials, and other materials related to such
  35. * distribution and use acknowledge that the software was developed
  36. * by Mark H. Colburn and sponsored by The USENIX Association.
  37. *
  38. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  39. * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  40. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  41. */
  42. #ifndef _PAX_LIMITS_H
  43. #define _PAX_LIMITS_H
  44. /* Headers */
  45. #if defined(__STDC__) || defined(_POSIX_SOURCE)
  46. # include <limits.h>
  47. #endif
  48. /* Defines */
  49. #ifndef _POSIX_SOURCE
  50. #define MAX_INPUT 256 /* Max numbef of bytes in terminal input */
  51. #define NGROUPS_MAX 1 /* Max number of suplemental group id's */
  52. #define PASS_MAX 8 /* Max number of bytes in a password */
  53. #define PID_MAX 30000 /* Max value for a process ID */
  54. #define UID_MAX 32000 /* Max value for a user or group ID */
  55. #define ARG_MAX 4096 /* Nax number of bytes passed to exec */
  56. #define CHILD_MAX 6 /* Max number of simultaneous processes */
  57. #define MAX_CANON 256 /* Max numbef of bytes in a cononical queue */
  58. #define OPEN_MAX 16 /* Nax number of open files per process */
  59. #define NAME_MAX 14 /* Max number of bytes in a file name */
  60. #define PATH_MAX 255 /* Max number of bytes in pathname */
  61. #define LINK_MAX 8 /* Max value of a file's link count */
  62. #define PIPE_BUF 512 /* Max number of bytes for pipe reads */
  63. #endif /* _POSIX_SOURCE */
  64. #endif /* _PAX_LIMITS_H */