diff options
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 11 | ||||
-rw-r--r-- | ace/OS.cpp | 4 | ||||
-rw-r--r-- | ace/config-hpux-11.00.h | 4 | ||||
-rw-r--r-- | ace/config-posix.h | 6 |
5 files changed, 32 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog index 0f8ccbef139..6af8f53ad8b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +Fri Dec 13 18:10:31 2002 Steve Huston <shuston@riverace.com> + + * ace/OS.cpp (wchar snprintf, sprintf): Change the selection for + ability to use vswprintf from ACE_HAS_XPG4_MULTIBYTE_CHAR to + _XOPEN_SOURCE >= 500. vswprintf came in at XPG5 (and C99). + + * ace/config-hpux-11.00.h: Enable ACE_HAS_SNPRINTF if + _INCLUDE_HPUX_SOURCE is set after including stdsyms.h. + + * ace/config-posix.h: Set ACE_HAS_SNPRINTF if _XOPEN_SOURCE >= 500. + Thu Dec 12 20:11:39 2002 Steve Huston <shuston@riverace.com> * ace/Timer_Heap_T.cpp (cancel): Release the queue lock before diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index 0f8ccbef139..6af8f53ad8b 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,14 @@ +Fri Dec 13 18:10:31 2002 Steve Huston <shuston@riverace.com> + + * ace/OS.cpp (wchar snprintf, sprintf): Change the selection for + ability to use vswprintf from ACE_HAS_XPG4_MULTIBYTE_CHAR to + _XOPEN_SOURCE >= 500. vswprintf came in at XPG5 (and C99). + + * ace/config-hpux-11.00.h: Enable ACE_HAS_SNPRINTF if + _INCLUDE_HPUX_SOURCE is set after including stdsyms.h. + + * ace/config-posix.h: Set ACE_HAS_SNPRINTF if _XOPEN_SOURCE >= 500. + Thu Dec 12 20:11:39 2002 Steve Huston <shuston@riverace.com> * ace/Timer_Heap_T.cpp (cancel): Release the queue lock before diff --git a/ace/OS.cpp b/ace/OS.cpp index 0da00b1ef60..40291b5a335 100644 --- a/ace/OS.cpp +++ b/ace/OS.cpp @@ -1012,7 +1012,7 @@ ACE_OS::sprintf (wchar_t *buf, const wchar_t *format, ...) { ACE_OS_TRACE ("ACE_OS::sprintf"); -# if defined (ACE_HAS_XPG4_MULTIBYTE_CHAR) +# if defined (_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) // The XPG4/UNIX98/C99 signature of the wide-char sprintf has a // maxlen argument. Since this method doesn't supply one, pass in @@ -1083,7 +1083,7 @@ int ACE_OS::snprintf (wchar_t *buf, size_t maxlen, const wchar_t *format, ...) { // ACE_OS_TRACE ("ACE_OS::snprintf"); -#if defined (ACE_HAS_XPG4_MULTIBYTE_CHAR) || defined (ACE_WIN32) +#if (defined (_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)) || defined (ACE_WIN32) int result; va_list ap; va_start (ap, format); diff --git a/ace/config-hpux-11.00.h b/ace/config-hpux-11.00.h index b48a9e227e5..32468e816ae 100644 --- a/ace/config-hpux-11.00.h +++ b/ace/config-hpux-11.00.h @@ -179,6 +179,10 @@ #include /**/ <sys/stdsyms.h> +#if defined (_INCLUDE_HPUX_SOURCE) +# define ACE_HAS_SNPRINTF +#endif + // HP-UX is a POSIX-compliant system - see what's available. #include "ace/config-posix.h" diff --git a/ace/config-posix.h b/ace/config-posix.h index c8ed1db264e..f9de58e354a 100644 --- a/ace/config-posix.h +++ b/ace/config-posix.h @@ -54,13 +54,15 @@ # endif /* ACE_HAS_PTHREADS_STD */ #endif /* _POSIX_THREADS */ - - #if defined(_POSIX_MESSAGE_PASSING) && (_POSIX_MESSAGE_PASSING-0 != -1 ) # if !defined(ACE_HAS_POSIX_MESSAGE_PASSING) # define ACE_HAS_POSIX_MESSAGE_PASSING # endif /* ACE_HAS_POSIX_MESSAGE_PASSING */ #endif /* _POSIX_MESSAGE_PASSING */ +#if defined (_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) +# define ACE_HAS_SNPRINTF +#endif /* _XOPEN_SOURCE */ + #endif /* ACE_CONFIG_POSIX_H */ |