3 //=============================================================================
7 * implementation-defined constants
9 * @author Don Hinton <dhinton@dresystems.com>
10 * @author This code was originally in various places including ace/OS.h.
12 //=============================================================================
14 #ifndef ACE_OS_INCLUDE_OS_LIMITS_H
15 #define ACE_OS_INCLUDE_OS_LIMITS_H
17 #include /**/ "ace/pre.h"
19 #include /**/ "ace/config-lite.h"
21 #if !defined (ACE_LACKS_PRAGMA_ONCE)
23 #endif /* ACE_LACKS_PRAGMA_ONCE */
25 #include "ace/os_include/os_unistd.h"
26 #include "ace/os_include/os_stdio.h" // for FILENAME_MAX on Windows
28 #if !defined (ACE_LACKS_LIMITS_H)
29 # include /**/ <limits.h>
30 #endif /* !ACE_LACKS_LIMITS_H */
32 #if !defined (ACE_LACKS_SYS_PARAM_H)
33 # include /**/ <sys/param.h>
34 #endif /* ACE_LACKS_SYS_PARAM_H */
36 // Place all additions (especially function declarations) within extern "C" {}
40 #endif /* __cplusplus */
42 #if ! defined (howmany)
43 # define howmany(x, y) (((x)+((y)-1))/(y))
46 #if !defined (NAME_MAX)
47 # if defined (MAXNAMLEN)
48 # define NAME_MAX MAXNAMLEN
49 # elif defined (MAXNAMELEN)
50 # define NAME_MAX MAXNAMELEN
51 # elif defined (FILENAME_MAX)
52 # define NAME_MAX FILENAME_MAX
53 # elif defined (_MAX_FNAME)
54 # define NAME_MAX _MAX_FNAME
55 # else /* _MAX_FNAME */
57 # endif /* MAXNAMLEN */
58 #endif /* !NAME_MAX */
60 #if !defined (MAXNAMELEN)
61 # define MAXNAMELEN NAME_MAX
62 #endif /* MAXNAMELEN */
64 #if !defined (HOST_NAME_MAX)
65 # define HOST_NAME_MAX 256
66 #endif /* !HOST_NAME_MAX */
68 // Note that we are using PATH_MAX instead of _POSIX_PATH_MAX, since
69 // _POSIX_PATH_MAX is the *minimum* maximum value for PATH_MAX and is
70 // defined by POSIX as 256.
71 #if !defined (PATH_MAX)
72 # if defined (_MAX_PATH)
73 # define PATH_MAX _MAX_PATH
74 # elif defined (MAX_PATH)
75 # define PATH_MAX MAX_PATH
76 # else /* !_MAX_PATH */
77 # define PATH_MAX 1024
78 # endif /* _MAX_PATH */
79 #endif /* !PATH_MAX */
81 // Leaving this for backward compatibility, but PATH_MAX should always be
83 #if !defined (MAXPATHLEN)
84 # define MAXPATHLEN PATH_MAX
85 #endif /* !MAXPATHLEN */
87 // This is defined by XOPEN to be a minimum of 16. POSIX.1g
88 // also defines this value. platform-specific config.h can
89 // override this if need be.
90 #if !defined (IOV_MAX)
94 #if !defined (ACE_IOV_MAX)
95 # define ACE_IOV_MAX IOV_MAX
96 #endif /* ACE_IOV_MAX */
98 #if defined (ACE_VXWORKS) && (ACE_VXWORKS <= 0x670) && !defined (__RTP__)
99 # if defined (PIPE_BUF) && (PIPE_BUF == -1)
102 #endif /* ACE_VXWORKS */
104 #if !defined (PIPE_BUF)
105 # define PIPE_BUF 5120
106 #endif /* PIPE_BUF */
108 #if defined (ACE_HAS_POSIX_REALTIME_SIGNALS)
109 // = Giving unique ACE scoped names for some important
110 // RTSignal-Related constants. Because sometimes, different
111 // platforms use different names for these constants.
113 // Number of realtime signals provided in the system.
114 // _POSIX_RTSIG_MAX is the upper limit on the number of real time
115 // signals supported in a posix-4 compliant system.
116 # if defined (_POSIX_RTSIG_MAX)
117 # define ACE_RTSIG_MAX _POSIX_RTSIG_MAX
118 # else /* not _POSIX_RTSIG_MAX */
119 // POSIX-4 compliant system has to provide at least 8 RT signals.
120 // @@ Make sure the platform does *not* define this constant with
121 // some other name. If yes, use that instead of 8.
122 # define ACE_RTSIG_MAX 8
123 # endif /* _POSIX_RTSIG_MAX */
124 #endif /* ACE_HAS_POSIX_REALTIME_SIGNALS */
126 // The maximum number of concurrent timers per process.
127 # if !defined (_POSIX_TIMER_MAX)
128 # define _POSIX_TIMER_MAX 44
129 # endif /* _POSIX_TIMER_MAX */
133 #endif /* __cplusplus */
135 #include /**/ "ace/post.h"
136 #endif /* ACE_OS_INCLUDE_OS_LIMITS_H */