diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-08-10 19:53:11 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-08-10 19:53:11 +0000 |
commit | 9d91084c5d4f462efece76d7ab1abe1f6c1f8672 (patch) | |
tree | 2958387ba7a84fd9c850d1af805b9b920ac7c3bf | |
parent | 8356545007b7f43ae260719c950e949deaf50ed2 (diff) | |
download | ATCD-9d91084c5d4f462efece76d7ab1abe1f6c1f8672.tar.gz |
ChangeLogTag: Tue Aug 10 14:46:12 1999 David L. Levine <levine@cs.wustl.edu>
-rw-r--r-- | ChangeLog-99b | 34 | ||||
-rw-r--r-- | ace/OS.cpp | 18 | ||||
-rw-r--r-- | ace/OS.h | 6 | ||||
-rw-r--r-- | ace/README | 3 | ||||
-rw-r--r-- | ace/config-irix6.x-common.h | 2 | ||||
-rw-r--r-- | ace/config-linux-common.h | 2 | ||||
-rw-r--r-- | ace/config-osf1-4.0.h | 1 | ||||
-rw-r--r-- | ace/config-sunos5.5.h | 4 |
8 files changed, 53 insertions, 17 deletions
diff --git a/ChangeLog-99b b/ChangeLog-99b index fa896c547ac..6925330b6ee 100644 --- a/ChangeLog-99b +++ b/ChangeLog-99b @@ -1,13 +1,37 @@ +Tue Aug 10 14:46:12 1999 David L. Levine <levine@cs.wustl.edu> + + * ace/OS.{h,cpp},README: Changed support for ACE_OS::strptime () + to be configurable. VxWorks, LynxOS, and Chorus, for example, + don't have a native ::strptime (). The current emulation cost + 2 Kb, which will be objectionable to some embedded systems + developers. + + Replaced ACE_LACKS_STRPTIME with a combination + ACE_HAS_STRPTIME/ACE_LACKS_NATIVE_STRPTIME. ACE_HAS_STRPTIME + enables ACE_OS::strptime () support. ACE_LACKS_NATIVE_STRPTIME + lets ACE know that there's no native ::strptime (), so it then + uses its emulation. + + This has two advantages: it minimizes footprint in the default + case, and doesn't break builds on platforms that don't have + ::strptime (). It easily allows developers to configure ACE + identically, with respect to strptime, on their Unix, NT, and + embedded platforms. [Bug 219] + + * ace/config-sunos5.5.h,config-linux-common.h,config-osf1-4.0.h, + config-irix6.x-common.h: + added #define ACE_HAS_STRPTIME. [Bug 219] + Tue Aug 10 12:28:54 1999 Jeff Parsons <parsons@cs.wustl.edu> - * bin/run_all_list.pm: - Added IDL test to the list. + * bin/run_all_list.pm: + Added IDL test to the list. Mon Aug 09 16:49:45 1999 Nanbor Wang <nanbor@cs.wustl.edu> - * ace/Process.{h,cpp} (wait): Re-visited the implementation so it - behaves the same on both UNIX and Win32. Thanks to Doug for - suggesting this. + * ace/Process.{h,cpp} (wait): Re-visited the implementation so it + behaves the same on both UNIX and Win32. Thanks to Doug for + suggesting this. Mon Aug 09 16:30:24 1999 David L. Levine <levine@cs.wustl.edu> diff --git a/ace/OS.cpp b/ace/OS.cpp index 62540c92e88..fba7d4651d0 100644 --- a/ace/OS.cpp +++ b/ace/OS.cpp @@ -6674,7 +6674,8 @@ exit (int status) # endif /* ACE_HAS_WINCE */ -#if defined (ACE_LACKS_STRPTIME) +#if defined (ACE_HAS_STRPTIME) +# if defined (ACE_LACKS_NATIVE_STRPTIME) int ACE_OS::strptime_getnum (char *buf, int *num, @@ -6705,18 +6706,14 @@ ACE_OS::strptime_getnum (char *buf, else return 0; } -#endif /* ACE_LACKS_STRPTIME */ +# endif /* ACE_LACKS_NATIVE_STRPTIME */ char * ACE_OS::strptime (char *buf, const char *format, struct tm *tm) { -#if !defined (ACE_LACKS_STRPTIME) - return ::strptime (buf, - format, - tm); -#else +#if defined (ACE_LACKS_NATIVE_STRPTIME) int bi = 0, fi = 0, percent = 0; int wday = 0, yday = 0; struct tm tmp; @@ -6954,5 +6951,10 @@ ACE_OS::strptime (char *buf, } return buf + bi; -#endif /* !defined (ACE_LACKS_STRPTIME) */ +#else /* ! ACE_LACKS_NATIVE_STRPTIME */ + return ::strptime (buf, + format, + tm); +#endif /* ! ACE_LACKS_NATIVE_STRPTIME */ } +#endif /* ACE_HAS_STRPTIME */ @@ -6127,9 +6127,11 @@ public: const char *reject); static size_t strspn(const char *s1, const char *s2); +#if defined (ACE_HAS_STRPTIME) static char *strptime (char *buf, const char *format, struct tm *tm); +#endif /* ACE_HAS_STRPTIME */ static char *strstr (char *s, const char *t); static const char *strstr (const char *s, @@ -6576,14 +6578,14 @@ private: friend class ACE_OS_Object_Manager; // Allow the ACE_OS_Object_Manager to call set_exit_hook. -#if defined (ACE_LACKS_STRPTIME) +#if defined (ACE_HAS_STRPTIME) && defined (ACE_LACKS_NATIVE_STRPTIME) static int strptime_getnum (char *buf, int *num, int *bi, int *fi, int min, int max); -#endif /* ACE_LACKS_STRPTIME */ +#endif /* ACE_HAS_STRPTIME && ACE_LACKS_NATIVE_STRPTIME */ # if defined (ACE_WIN32) # if defined (ACE_HAS_WINCE) diff --git a/ace/README b/ace/README index aa2809783f0..4f27b3d35e8 100644 --- a/ace/README +++ b/ace/README @@ -485,6 +485,7 @@ ACE_HAS_SPARCWORKS_401_SIGNALS Compiler has brain-damaged prototype... ACE_HAS_SSIZE_T Compiler supports the ssize_t typedef +ACE_HAS_STRPTIME Enables ACE_OS::strptime (). ACE_HAS_STHREADS Platform supports Solaris threads ACE_HAS_STANDARD_CPP_LIBRARY Platform/compiler supports @@ -797,7 +798,7 @@ ACE_LACKS_SOME_POSIX_PROTOTYPES Platform lacks POSIX prototypes for certain System V functions like shared memory and message queues. -ACE_LACKS_STRPTIME Platform/compiler lacks the strptime() +ACE_LACKS_NATIVE_STRPTIME Platform/compiler lacks the strptime() function. ACE_LACKS_STRRCHR Platform/compiler lacks strrchr () function. diff --git a/ace/config-irix6.x-common.h b/ace/config-irix6.x-common.h index 4e02604dc2f..836d07f4f06 100644 --- a/ace/config-irix6.x-common.h +++ b/ace/config-irix6.x-common.h @@ -122,6 +122,8 @@ // Platform supports IP multicast #define ACE_HAS_IP_MULTICAST +#define ACE_HAS_STRPTIME + //************************************************************** // Not so sure how next lines should look like diff --git a/ace/config-linux-common.h b/ace/config-linux-common.h index 38a59e61824..9d86285be19 100644 --- a/ace/config-linux-common.h +++ b/ace/config-linux-common.h @@ -166,6 +166,8 @@ // Compiler/platform supports strerror (). #define ACE_HAS_STRERROR +#define ACE_HAS_STRPTIME + // Compiler supports the ssize_t typedef. #define ACE_HAS_SSIZE_T diff --git a/ace/config-osf1-4.0.h b/ace/config-osf1-4.0.h index 12d38213c9e..b9dceb31bf6 100644 --- a/ace/config-osf1-4.0.h +++ b/ace/config-osf1-4.0.h @@ -181,6 +181,7 @@ #define ACE_HAS_STREAMS #define ACE_HAS_STRERROR #define ACE_HAS_STRING_CLASS +#define ACE_HAS_STRPTIME #define ACE_HAS_SVR4_DYNAMIC_LINKING #define ACE_HAS_SVR4_SIGNAL_T #define ACE_HAS_SYSCALL_H diff --git a/ace/config-sunos5.5.h b/ace/config-sunos5.5.h index 07946945b44..6091a32aed7 100644 --- a/ace/config-sunos5.5.h +++ b/ace/config-sunos5.5.h @@ -27,7 +27,7 @@ to work around problems with automatic template instantiation. */ # define ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION # define ACE_HAS_STD_TEMPLATE_SPECIALIZATION -// Note that SunC++ 5.0 doesn't yet appear to support +// Note that SunC++ 5.0 doesn't yet appear to support // ACE_HAS_STD_TEMPLATE_METHOD_SPECIALIZATION... # define ACE_TEMPLATES_REQUIRE_SOURCE # define ACE_HAS_STANDARD_CPP_LIBRARY 1 @@ -296,6 +296,8 @@ // Platform supports ACE_TLI. #define ACE_HAS_TLI +#define ACE_HAS_STRPTIME + // Turns off the tracing feature. #if !defined (ACE_NTRACE) # define ACE_NTRACE 1 |