3 Copyright 1999, 2000, 2001 Red Hat, Inc.
5 This file is part of Cygwin.
7 This software is a copyrighted work licensed under the terms of the
8 Cygwin license. Please consult the file "CYGWIN_LICENSE" for
12 #ifndef _MACH_MACHLIMITS_H_
14 /* _MACH_MACHLIMITS_H_ is used on OSF/1. */
16 #define _MACH_MACHLIMITS_H_
18 /* Number of bits in a `char'. */
22 /* Maximum length of a multibyte character. */
27 /* Minimum and maximum values a `signed char' can hold. */
29 #define SCHAR_MIN (-128)
33 /* Maximum value an `unsigned char' can hold. (Minimum is 0). */
37 /* Minimum and maximum values a `char' can hold. */
38 #ifdef __CHAR_UNSIGNED__
45 #define CHAR_MIN (-128)
50 /* Minimum and maximum values a `signed short int' can hold. */
52 #define SHRT_MIN (-32768)
54 #define SHRT_MAX 32767
56 /* Maximum value an `unsigned short int' can hold. (Minimum is 0). */
58 #define USHRT_MAX 65535
60 /* Minimum and maximum values a `signed int' can hold. */
62 #define __INT_MAX__ 2147483647
65 #define INT_MIN (-INT_MAX-1)
67 #define INT_MAX __INT_MAX__
69 /* Maximum value an `unsigned int' can hold. (Minimum is 0). */
71 #define UINT_MAX (INT_MAX * 2U + 1)
73 /* Minimum and maximum values a `signed long int' can hold.
77 #define __LONG_MAX__ 2147483647L
79 #define __LONG_MAX__ 9223372036854775807L
80 # endif /* __alpha__ */
83 #define LONG_MIN (-LONG_MAX-1)
85 #define LONG_MAX __LONG_MAX__
87 /* Maximum value an `unsigned long int' can hold. (Minimum is 0). */
89 #define ULONG_MAX (LONG_MAX * 2UL + 1)
91 #if defined (__GNU_LIBRARY__) ? defined (__USE_GNU) : !defined (__STRICT_ANSI__)
92 /* Minimum and maximum values a `signed long long int' can hold. */
93 #ifndef __LONG_LONG_MAX__
94 #define __LONG_LONG_MAX__ 9223372036854775807LL
97 #define LONG_LONG_MIN (-LONG_LONG_MAX-1)
99 #define LONG_LONG_MAX __LONG_LONG_MAX__
101 /* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */
102 #undef ULONG_LONG_MAX
103 #define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1)
106 /* Maximum number of iovcnt in a writev */
108 #define IOV_MAX (__INT_MAX__-1)
110 /* Maximum size of ssize_t */
112 #define SSIZE_MAX (__LONG_MAX__)
114 /* Maximum length of a path */
115 #define PATH_MAX (260 - 1 /*NUL*/)
117 /* Max num groups for a user, value taken from NT documentation */
118 /* Must match <sys/param.h> NGROUPS */
119 #define NGROUPS_MAX 16
121 /* WaitForMultipleObjects can't handle waiting for more than 64 objects.
122 This limits how many children we can fork/spawn off. */
125 /* # of open files per process. Actually it can be more since Cygwin
126 grows the dtable as necessary. We define a reasonable limit here
127 which is returned by getdtablesize(), sysconf(_SC_OPEN_MAX) and
128 getrlimit(RLIMIT_NOFILE). */
132 /* # of bytes in a pipe buf. This is the max # of bytes which can be
133 written to a pipe in one atomic operation. */
135 #define PIPE_BUF 4096
138 /* These should never vary from one system type to another */
139 /* They represent the minimum values that POSIX systems must support.
140 POSIX-conforming apps must not require larger values. */
141 #define _POSIX_ARG_MAX 4096
142 #define _POSIX_CHILD_MAX 6
143 #define _POSIX_LINK_MAX 8
144 #define _POSIX_MAX_CANON 255
145 #define _POSIX_MAX_INPUT 255
146 #define _POSIX_NAME_MAX 14
147 #define _POSIX_NGROUPS_MAX 0
148 #define _POSIX_OPEN_MAX 16
149 #define _POSIX_PATH_MAX 255
150 #define _POSIX_PIPE_BUF 512
151 #define _POSIX_SSIZE_MAX 32767
152 #define _POSIX_STREAM_MAX 8
153 #define _POSIX_TZNAME_MAX 3
155 #endif /* _MACH_MACHLIMITS_H_ */
156 #endif /* _LIMITS_H___ */