summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-05-11 14:44:31 +0000
committerdhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-05-11 14:44:31 +0000
commite41e2beee86005f17c3297568b398e168dee6542 (patch)
tree24aaa9971bcb34b462c4beddbc35f60cd72c29e8
parenta814299202bfb50b46f4e93b16799d48eb763e4a (diff)
downloadATCD-dre_osh_00.tar.gz
ChangeLogTag:Sun May 11 14:42:23 UTC 2003 Don Hinton <dhinton@dresystems.com>dre_osh_00
-rw-r--r--ChangeLog20
-rw-r--r--ace/Basic_Types.h36
-rw-r--r--ace/Default_Constants.h6
-rw-r--r--ace/Malloc.h6
-rw-r--r--ace/OS.h108
-rw-r--r--ace/os_include/limits.h31
-rw-r--r--ace/os_include/time.h12
7 files changed, 87 insertions, 132 deletions
diff --git a/ChangeLog b/ChangeLog
index 105c7396611..4cfc1141c58 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+Sun May 11 14:42:23 UTC 2003 Don Hinton <dhinton@dresystems.com>
+
+ * ace/OS.h:
+ Moved more code, as listed below.
+
+ * ace/Basic_Types.h:
+ Changed #includes to use new headers. Moved MAXPATHLEN
+ to ace/os_include/limits.h.
+
+ * ace/Malloc.h:
+ * ace/Default_Constants.h:
+ Moved ACE_DEFAULT_BASE_ADDR here.
+
+ * ace/os_include/limits.h:
+ Added conditional include of <sys/param.h>. Moved howmany
+ macro and MAXPATHLEN here. Added POSIX PATH_MAX.
+
+ * ace/os_include/time.h:
+ Moved timespec_t typedef for ACE_PSOS here.
+
Sat May 10 21:39:05 UTC 2003 Don Hinton <dhinton@dresystems.com>
* ace/OS.h:
diff --git a/ace/Basic_Types.h b/ace/Basic_Types.h
index 97369369461..98bb6206847 100644
--- a/ace/Basic_Types.h
+++ b/ace/Basic_Types.h
@@ -53,18 +53,18 @@
# endif /* ACE_LACKS_PRAGMA_ONCE */
// Pull in definitions
-# include /**/ <limits.h> // Integer limits
-# include /**/ <float.h> // Floating point limits
-# include /**/ <stdlib.h> // Other types
+# include "ace/os_include/limits.h" // Integer limits
+# include "ace/os_include/float.h" // Floating point limits
+# include "ace/os_include/stdlib.h" // Other types
# if defined(ACE_LACKS_LONGLONG_T)
-# include /**/ <stdarg.h> // LynxOS requires this before stdio.h
-# include /**/ <stdio.h> // For long long emulation
+# include "ace/os_include/stdarg.h" // LynxOS requires this before stdio.h
+# include "ace/os_include/stdio.h" // For long long emulation
# endif /* ACE_LACKS_LONGLONG_T */
-# if !defined (ACE_LACKS_SYS_TYPES_H)
-# include /**/ <sys/types.h>
-# endif /* ACE_LACKS_SYS_TYPES_H */
+//# if !defined (ACE_LACKS_SYS_TYPES_H)
+# include "ace/os_include/sys/types.h"
+//# endif /* ACE_LACKS_SYS_TYPES_H */
# if !defined (ACE_LACKS_PARAM_H)
# include /**/ <sys/param.h>
@@ -72,16 +72,16 @@
# include "ace/ACE_export.h"
-// Pick up MAXPATHLEN without need of OS.h.
-#if !defined (MAXPATHLEN)
-# if defined (ACE_WIN32)
-# define MAXPATHLEN _MAX_PATH
-# elif defined (_POSIX_PATH_MAX)
-# define MAXPATHLEN _POSIX_PATH_MAX
-# else
-# define MAXPATHLEN 1024
-# endif /* ACE_WIN32 */
-#endif /* MAXPATHLEN */
+//// Pick up MAXPATHLEN without need of OS.h.
+//#if !defined (MAXPATHLEN)
+//# if defined (ACE_WIN32)
+//# define MAXPATHLEN _MAX_PATH
+//# elif defined (_POSIX_PATH_MAX)
+//# define MAXPATHLEN _POSIX_PATH_MAX
+//# else
+//# define MAXPATHLEN 1024
+//# endif /* ACE_WIN32 */
+//#endif /* MAXPATHLEN */
// A char always has 1 byte, by definition.
# define ACE_SIZEOF_CHAR 1
diff --git a/ace/Default_Constants.h b/ace/Default_Constants.h
index 87c0934d555..36d75e2acce 100644
--- a/ace/Default_Constants.h
+++ b/ace/Default_Constants.h
@@ -223,6 +223,12 @@
# define ACE_DEFAULT_SHM_KEY 1234
# endif /* ACE_DEFAULT_SHM_KEY */
+// Default address for shared memory mapped files and SYSV shared memory
+// (defaults to 64 M).
+# if !defined (ACE_DEFAULT_BASE_ADDR)
+# define ACE_DEFAULT_BASE_ADDR ((char *) (64 * 1024 * 1024))
+# endif /* ACE_DEFAULT_BASE_ADDR */
+
// Default segment size used by SYSV shared memory (128 K)
# if !defined (ACE_DEFAULT_SEGMENT_SIZE)
# define ACE_DEFAULT_SEGMENT_SIZE 1024 * 128
diff --git a/ace/Malloc.h b/ace/Malloc.h
index 7e4d5097e72..696a74c0836 100644
--- a/ace/Malloc.h
+++ b/ace/Malloc.h
@@ -24,12 +24,6 @@
#include "ace/OS.h"
#include "ace/Log_Msg.h"
-// Default address for shared memory mapped files and SYSV shared memory
-// (defaults to 64 M).
-# if !defined (ACE_DEFAULT_BASE_ADDR)
-# define ACE_DEFAULT_BASE_ADDR ((char *) (64 * 1024 * 1024))
-# endif /* ACE_DEFAULT_BASE_ADDR */
-
#if defined (ACE_HAS_MALLOC_STATS)
# include "ace/Atomic_Op.h"
# if defined (ACE_HAS_THREADS)
diff --git a/ace/OS.h b/ace/OS.h
index 44fe5b1c23d..9afdeba1e1c 100644
--- a/ace/OS.h
+++ b/ace/OS.h
@@ -169,10 +169,6 @@ class ACE_Timeout_Manager;
# define IPPORT_RESERVED 1024
# define IPPORT_USERRESERVED 5000
-# if !defined (howmany)
-# define howmany(x, y) (((x)+((y)-1))/(y))
-# endif /* howmany */
-
extern "C"
{
typedef void (* ACE_SignalHandler) (void);
@@ -301,14 +297,6 @@ typedef struct
# endif /* ACE_USES_CLASSIC_SVC_CONF ==1 */
# endif /* ACE_DEFAULT_SVC_CONF */
-//# if !defined (ACE_DEFAULT_SEM_KEY)
-//# define ACE_DEFAULT_SEM_KEY 1234
-//# endif /* ACE_DEFAULT_SEM_KEY */
-
-//# define ACE_STDIN 0
-//# define ACE_STDOUT 1
-//# define ACE_STDERR 2
-
# define ACE_DIRECTORY_SEPARATOR_STR_A "/"
# define ACE_DIRECTORY_SEPARATOR_CHAR_A '/'
# define ACE_PLATFORM_A "pSOS"
@@ -322,10 +310,6 @@ typedef struct
# define ACE_MAX_DEFAULT_PORT 65535
-# if ! defined(MAXPATHLEN)
-# define MAXPATHLEN 1024
-# endif /* MAXPATHLEN */
-
# if ! defined(MAXNAMLEN)
# define MAXNAMLEN 255
# endif /* MAXNAMLEN */
@@ -424,18 +408,6 @@ struct ACE_OVERLAPPED
ACE_HANDLE hEvent;
};
-# if !defined (USER_INCLUDE_SYS_TIME_TM)
-# if defined (ACE_PSOS_DIAB_PPC)
-typedef struct timespec timespec_t;
-# else /* ! defined (ACE_PSOS_DIAB_PPC) */
-typedef struct timespec
-{
- time_t tv_sec; // Seconds
- long tv_nsec; // Nanoseconds
-} timespec_t;
-# endif /* defined (ACE_PSOS_DIAB_PPC) */
-# endif /* !defined (USER_INCLUDE_SYS_TIME_TM) */
-
#if defined (ACE_PSOS_HAS_TIME)
// Use pSOS time, wrapped . . .
@@ -498,57 +470,11 @@ private:
# endif /* defined (ACE_PSOS) **********************************************/
-//# if defined (ACE_HAS_CHARPTR_SPRINTF)
-//# define ACE_SPRINTF_ADAPTER(X) ::strlen (X)
-//# else
-//# define ACE_SPRINTF_ADAPTER(X) X
-//# endif /* ACE_HAS_CHARPTR_SPRINTF */
-
-//// Default address for shared memory mapped files and SYSV shared memory
-//// (defaults to 64 M).
-//# if !defined (ACE_DEFAULT_BASE_ADDR)
-//# define ACE_DEFAULT_BASE_ADDR ((char *) (64 * 1024 * 1024))
-//# endif /* ACE_DEFAULT_BASE_ADDR */
-
-//// This fudge factor can be overriden for timers that need it, such as on
-//// Solaris, by defining the ACE_TIMER_SKEW symbol in the appropriate config
-//// header.
-//#if !defined (ACE_TIMER_SKEW)
-//# define ACE_TIMER_SKEW 0
-//#endif /* ACE_TIMER_SKEW */
-
// This needs to go here *first* to avoid problems with AIX.
# if defined (ACE_HAS_PTHREADS)
-//extern "C" {
-//# define ACE_DONT_INCLUDE_ACE_SIGNAL_H
-//# include "ace/os_include/signal.h"
-//# undef ACE_DONT_INCLUDE_ACE_SIGNAL_H
# include "ace/os_include/pthread.h"
-//# if defined (DIGITAL_UNIX)
-//# define pthread_self __pthread_self
-//extern "C" pthread_t pthread_self (void);
-//# endif /* DIGITAL_UNIX */
-//}
-//# if defined (HPUX_10)
-//// HP-UX 10 needs to see cma_sigwait, and since _CMA_NOWRAPPERS_ is defined,
-//// this header does not get included from pthreads.h.
-//# include /**/x <dce/cma_sigwait.h>
-//# endif /* HPUX_10 */
# endif /* ACE_HAS_PTHREADS */
-// There are a lot of threads-related macro definitions in the config files.
-// They came in at different times and from different places and platform
-// requirements as threads evolved. They are probably not all needed - some
-// overlap or are otherwise confused. This is an attempt to start
-// straightening them out.
-//# if defined (ACE_HAS_PTHREADS_STD) /* POSIX.1c threads (pthreads) */
-// // ... and 2-parameter asctime_r and ctime_r
-//# if !defined (ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R) && (continuation removed)
-// !defined (ACE_HAS_STHREADS)
-//# define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R
-//# endif
-//# endif /* ACE_HAS_PTHREADS_STD */
-
// By default we perform no tracing on the OS layer, otherwise the
// coupling between the OS layer and Log_Msg is too tight. But the
// application can override the default if they wish to.
@@ -568,17 +494,6 @@ using std::timezone;
using std::difftime;
# endif /* ACE_USES_STD_NAMESPACE_FOR_STDC_LIB */
-//# if !defined (ACE_HAS_CLOCK_GETTIME) && !(defined (_CLOCKID_T_) || defined (_CLOCKID_T))
-//typedef int clockid_t;
-//# if !defined (CLOCK_REALTIME)
-//# define CLOCK_REALTIME 0
-//# endif /* CLOCK_REALTIME */
-//# endif /* ! ACE_HAS_CLOCK_GETTIME && ! _CLOCKID_T_ */
-
-//#if !defined (E2BIG) // do idea what this is for... dah
-//# define E2BIG 7
-//#endif /* E2BIG */
-
/**
* @class ACE_Countdown_Time
*
@@ -852,10 +767,6 @@ private:
# define ACE_WSOCK_VERSION 0, 0
# endif /* ACE_WSOCK_VERSION */
-//# if defined (ACE_HAS_BROKEN_CTIME)
-//# undef ctime
-//# endif /* ACE_HAS_BROKEN_CTIME */
-
/// Service Objects, i.e., objects dynamically loaded via the service
/// configurator, must provide a destructor function with the
/// following prototype to perform object cleanup.
@@ -2078,10 +1989,6 @@ typedef DWORD ACE_exitcode;
// Reliance on CRT - I don't really like this.
-//# define O_NDELAY 1
-# if !defined (MAXPATHLEN)
-# define MAXPATHLEN _MAX_PATH
-# endif /* !MAXPATHLEN */
# define MAXNAMLEN _MAX_FNAME
# define EADDRINUSE WSAEADDRINUSE
@@ -2334,12 +2241,6 @@ extern "C"
# include "ace/os_include/netinet/tcp.h"
# endif /* ACE_LACKS_TCP_H */
-# if defined (__Lynx__) || defined (UNIXWARE_7_1)
-# ifndef howmany
-# define howmany(x, y) (((x)+((y)-1))/(y))
-# endif /* howmany */
-# endif /* __Lynx__ || UNIXWARE_7_1 **/
-
# if defined (CHORUS)
# include /**/x <chorus.h>
# if !defined(CHORUS_4)
@@ -2362,16 +2263,10 @@ extern_C char* getcwd __((char* buf, size_t size));
extern_C int pipe __((int* fildes));
extern_C int gethostname __((char*, size_t));
-// This must come after limits.h is included
-# define MAXPATHLEN _POSIX_PATH_MAX
-
# if !defined(CHORUS_4)
typedef cx_fd_mask fd_mask;
typedef void (*__sighandler_t)(int); // keep Signal compilation happy
# endif
-# ifndef howmany
-# define howmany(x, y) (((x)+((y)-1))/(y))
-# endif /* howmany */
# elif defined (CYGWIN32)
# include "ace/os_include/sys/uio.h"
# include "ace/os_include/fcntl.h" // <sys/file.h>
@@ -2394,9 +2289,6 @@ typedef void (*__sighandler_t)(int); // keep Signal compilation happy
# if !defined (NFDBITS)
# define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */
# endif /* ! NFDBITS */
-# if !defined (howmany)
-# define howmany(x, y) (((x)+((y)-1))/(y))
-# endif /* ! howmany */
# elif defined(__rtems__)
# include "ace/os_include/fcntl.h" // <sys/file.h>
# include "ace/os_include/sys/resource.h"
diff --git a/ace/os_include/limits.h b/ace/os_include/limits.h
index b0637b318a3..3f83460e5f3 100644
--- a/ace/os_include/limits.h
+++ b/ace/os_include/limits.h
@@ -30,5 +30,36 @@
# include /**/ <limits.h>
#endif /* !ACE_LACKS_LIMITS_H */
+#if !defined (ACE_LACKS_PARAM_H)
+# include /**/ <sys/param.h>
+#endif /* ACE_LACKS_PARAM_H */
+
+#if ! defined (howmany)
+# define howmany(x, y) (((x)+((y)-1))/(y))
+#endif /* howmany */
+
+#if !defined (NAME_MAX)
+#endif /* !NAME_MAX */
+
+// Note that we are using PATH_MAX instead of _POSIX_PATH_MAX, since
+// _POSIX_PATH_MAX is the *minimun* maximum value for PATH_MAX and is
+// defined by POSIX as 255 (or 256 depending on how you read it).
+#if !defined (PATH_MAX)
+# if defined (_MAX_PATH)
+# define PATH_MAX _MAX_PATH
+# else /* !_MAX_PATH */
+# define 1024
+# endif /* _MAX_PATH */
+#endif /* !PATH_MAX */
+
+// Leaving this for backward compatibility, but PATH_MAX should always be
+// used directly.
+#if !defined (MAXPATHLEN)
+# define MAXPATHLEN PATH_MAX
+#endif /* !MAXPATHLEN */
+
+//# define MAXNAMLEN _MAX_FNAME
+//# define EADDRINUSE WSAEADDRINUSE
+
#include "ace/post.h"
#endif /* ACE_OS_INCLUDE_LIMITS_H */
diff --git a/ace/os_include/time.h b/ace/os_include/time.h
index ca321498a0e..15e07f9679c 100644
--- a/ace/os_include/time.h
+++ b/ace/os_include/time.h
@@ -52,5 +52,17 @@
extern "C" char *strptime (const char *s, const char *fmt, struct tm *tp);
#endif /* ACE_LACKS_STRPTIME_PROTOTYPE */
+#if defined (ACE_PSOS) && !defined (USER_INCLUDE_SYS_TIME_TM)
+# if defined (ACE_PSOS_DIAB_PPC)
+ typedef struct timespec timespec_t;
+# else /* ! defined (ACE_PSOS_DIAB_PPC) */
+ typedef struct timespec
+ {
+ time_t tv_sec; // Seconds
+ long tv_nsec; // Nanoseconds
+ } timespec_t;
+# endif /* defined (ACE_PSOS_DIAB_PPC) */
+#endif /* defined (ACE_PSOS) && !defined (USER_INCLUDE_SYS_TIME_TM) */
+
#include "ace/post.h"
#endif /* ACE_OS_INCLUDE_TIME_H */