os_limits.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    os_limits.h
00006  *
00007  *  implementation-defined constants
00008  *
00009  *  $Id: os_limits.h 80826 2008-03-04 14:51:23Z wotte $
00010  *
00011  *  @author Don Hinton <dhinton@dresystems.com>
00012  *  @author This code was originally in various places including ace/OS.h.
00013  */
00014 //=============================================================================
00015 
00016 #ifndef ACE_OS_INCLUDE_OS_LIMITS_H
00017 #define ACE_OS_INCLUDE_OS_LIMITS_H
00018 
00019 #include /**/ "ace/pre.h"
00020 
00021 #include "ace/config-lite.h"
00022 
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif /* ACE_LACKS_PRAGMA_ONCE */
00026 
00027 #include "ace/os_include/os_unistd.h"
00028 #include "ace/os_include/os_stdio.h" // for FILENAME_MAX on Windows
00029 
00030 #if !defined (ACE_LACKS_LIMITS_H)
00031 # include /**/ <limits.h>
00032 #endif /* !ACE_LACKS_LIMITS_H */
00033 
00034 #if !defined (ACE_LACKS_SYS_PARAM_H)
00035 #  include /**/ <sys/param.h>
00036 #endif /* ACE_LACKS_SYS_PARAM_H */
00037 
00038 // On VxWorks 5.5.1 _POSIX_TIMER_MAX is defined in time.h
00039 #if defined (ACE_VXWORKS) && (ACE_VXWORKS < 0x620)
00040 #  include /**/ <time.h>
00041 #endif /* ACE_VXWORKS */
00042 
00043 // Place all additions (especially function declarations) within extern "C" {}
00044 #ifdef __cplusplus
00045 extern "C"
00046 {
00047 #endif /* __cplusplus */
00048 
00049 #if ! defined (howmany)
00050 #  define howmany(x, y)   (((x)+((y)-1))/(y))
00051 #endif /* howmany */
00052 
00053 #if !defined (NAME_MAX)
00054 #  if defined (MAXNAMLEN)
00055 #    define NAME_MAX MAXNAMLEN
00056 #  elif defined (MAXNAMELEN)
00057 #    define NAME_MAX MAXNAMELEN
00058 #  elif defined (FILENAME_MAX)
00059 #    define NAME_MAX FILENAME_MAX
00060 #  elif defined (_MAX_FNAME)
00061 #    define NAME_MAX _MAX_FNAME
00062 #  else /* _MAX_FNAME */
00063 #    define NAME_MAX 256
00064 #  endif /* MAXNAMLEN */
00065 #endif /* !NAME_MAX */
00066 
00067 #if !defined (MAXNAMELEN)
00068 #  define MAXNAMELEN NAME_MAX
00069 #endif /* MAXNAMELEN */
00070 
00071 #if !defined (HOST_NAME_MAX)
00072 #  define HOST_NAME_MAX 256
00073 #endif /* !HOST_NAME_MAX */
00074 
00075 // Note that we are using PATH_MAX instead of _POSIX_PATH_MAX, since
00076 // _POSIX_PATH_MAX is the *minimun* maximum value for PATH_MAX and is
00077 // defined by POSIX as 256.
00078 #if !defined (PATH_MAX)
00079 #  if defined (_MAX_PATH)
00080 #    define PATH_MAX _MAX_PATH
00081 #  elif defined (MAX_PATH)
00082 #    define PATH_MAX MAX_PATH
00083 #  else /* !_MAX_PATH */
00084 #    define PATH_MAX 1024
00085 #  endif /* _MAX_PATH */
00086 #endif /* !PATH_MAX */
00087 
00088 // Leaving this for backward compatibility, but PATH_MAX should always be
00089 // used directly.
00090 #if !defined (MAXPATHLEN)
00091 #  define MAXPATHLEN  PATH_MAX
00092 #endif /* !MAXPATHLEN */
00093 
00094 // This is defined by XOPEN to be a minimum of 16.  POSIX.1g
00095 // also defines this value.  platform-specific config.h can
00096 // override this if need be.
00097 #if !defined (IOV_MAX)
00098 #  define IOV_MAX 16
00099 #endif /* IOV_MAX */
00100 
00101 #if !defined (ACE_IOV_MAX)
00102 #  define ACE_IOV_MAX IOV_MAX
00103 #endif /* ACE_IOV_MAX */
00104 
00105 #if defined (ACE_VXWORKS) && ((ACE_VXWORKS >= 0x620) && (ACE_VXWORKS <= 0x660)) && !defined (__RTP__)
00106 #  if defined (PIPE_BUF) && (PIPE_BUF == -1)
00107 #    undef PIPE_BUF
00108 #  endif
00109 #endif /* ACE_VXWORKS */
00110 
00111 #if !defined (PIPE_BUF)
00112 #  define PIPE_BUF 5120
00113 #endif /* PIPE_BUF */
00114 
00115 #if defined (ACE_HAS_POSIX_REALTIME_SIGNALS)
00116   // = Giving unique ACE scoped names for some important
00117   // RTSignal-Related constants. Becuase sometimes, different
00118   // platforms use different names for these constants.
00119 
00120   // Number of realtime signals provided in the system.
00121   // _POSIX_RTSIG_MAX is the upper limit on the number of real time
00122   // signals supported in a posix-4 compliant system.
00123 #  if defined (_POSIX_RTSIG_MAX)
00124 #    define ACE_RTSIG_MAX _POSIX_RTSIG_MAX
00125 #  else /* not _POSIX_RTSIG_MAX */
00126   // POSIX-4 compilant system has to provide atleast 8 RT signals.
00127   // @@ Make sure the platform does *not* define this constant with
00128   // some other name. If yes, use that instead of 8.
00129 #     define ACE_RTSIG_MAX 8
00130 #  endif /* _POSIX_RTSIG_MAX */
00131 #endif /* ACE_HAS_POSIX_REALTIME_SIGNALS */
00132 
00133   // The maximum number of concurrent timers per process.
00134 # if !defined (_POSIX_TIMER_MAX)
00135 #   define _POSIX_TIMER_MAX 44
00136 # endif /* _POSIX_TIMER_MAX */
00137 
00138 #ifdef __cplusplus
00139 }
00140 #endif /* __cplusplus */
00141 
00142 #include /**/ "ace/post.h"
00143 #endif /* ACE_OS_INCLUDE_OS_LIMITS_H */

Generated on Tue Feb 2 17:18:41 2010 for ACE by  doxygen 1.4.7