diff options
-rw-r--r-- | ace/OS_NS_stdio.cpp | 16 | ||||
-rw-r--r-- | ace/OS_NS_stdio.inl | 10 | ||||
-rw-r--r-- | ace/OS_NS_stdlib.inl | 8 | ||||
-rw-r--r-- | ace/config-win32-borland.h | 2 |
4 files changed, 20 insertions, 16 deletions
diff --git a/ace/OS_NS_stdio.cpp b/ace/OS_NS_stdio.cpp index 8539a386435..309f5077c7a 100644 --- a/ace/OS_NS_stdio.cpp +++ b/ace/OS_NS_stdio.cpp @@ -178,7 +178,7 @@ ACE_OS::fprintf (FILE *fp, const wchar_t *format, ...) int result = 0; va_list ap; va_start (ap, format); - ACE_OSCALL (::vfwprintf (fp, format, ap), int, -1, result); + ACE_OSCALL (ACE_STD_NAMESPACE::vfwprintf (fp, format, ap), int, -1, result); va_end (ap); return result; @@ -249,16 +249,16 @@ ACE_OS::snprintf (char *buf, size_t maxlen, const char *format, ...) int result; va_list ap; va_start (ap, format); -# if defined (ACE_WIN32) +# if !defined (ACE_WIN32) || (defined (__BORLANDC__) && (__BORLANDC__ >= 0x600)) + ACE_OSCALL (ACE_SPRINTF_ADAPTER (::vsnprintf (buf, maxlen, format, ap)), + int, -1, result); +# else ACE_OSCALL (ACE_SPRINTF_ADAPTER (::_vsnprintf (buf, maxlen, format, ap)), int, -1, result); // Win32 doesn't 0-terminate the string if it overruns maxlen. if (result == -1) buf[maxlen-1] = '\0'; -# else - ACE_OSCALL (ACE_SPRINTF_ADAPTER (::vsnprintf (buf, maxlen, format, ap)), - int, -1, result); -# endif /* ACE_WIN32 */ +# endif /* !ACE_WIN32 || __BORLANDC__ >= 0x600 */ va_end (ap); // In out-of-range conditions, C99 defines vsnprintf to return the number // of characters that would have been written if enough space was available. @@ -337,7 +337,7 @@ ACE_OS::sprintf (wchar_t *buf, const wchar_t *format, ...) { ACE_OS_TRACE ("ACE_OS::sprintf"); -# if defined (_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) +# if (defined (_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)) || (defined ACE_HAS_DINKUM_STL) // The XPG4/UNIX98/C99 signature of the wide-char sprintf has a // maxlen argument. Since this method doesn't supply one, pass in @@ -345,7 +345,7 @@ ACE_OS::sprintf (wchar_t *buf, const wchar_t *format, ...) int result; va_list ap; va_start (ap, format); - ACE_OSCALL (::vswprintf (buf, ULONG_MAX, format, ap), int, -1, result); + ACE_OSCALL (ACE_STD_NAMESPACE::vswprintf (buf, ULONG_MAX, format, ap), int, -1, result); va_end (ap); return result; diff --git a/ace/OS_NS_stdio.inl b/ace/OS_NS_stdio.inl index c21ac140387..f2adf882f84 100644 --- a/ace/OS_NS_stdio.inl +++ b/ace/OS_NS_stdio.inl @@ -903,14 +903,14 @@ ACE_OS::tempnam (const ACE_TCHAR *dir, const ACE_TCHAR *pfx) // pSOS only considers the directory prefix ACE_UNUSED_ARG (pfx); ACE_OSCALL_RETURN (::tmpnam ((char *) dir), char *, 0); -#elif (defined (ACE_WIN32) && ((defined (__BORLANDC__) && !defined(ACE_USES_WCHAR)) || defined (__IBMCPP__))) +#elif (defined (ACE_WIN32) && ((defined (__BORLANDC__) && !defined(ACE_USES_WCHAR) && (__BORLANDC__ < 0x600)) || defined (__IBMCPP__))) ACE_OSCALL_RETURN (::_tempnam ((char *) dir, (char *) pfx), char *, 0); -#elif defined(ACE_WIN32) && defined (__BORLANDC__) && defined (ACE_USES_WCHAR) +#elif defined(ACE_WIN32) && (defined (__BORLANDC__) && (__BORLANDC__ < 0x600)) && defined (ACE_USES_WCHAR) ACE_OSCALL_RETURN (::_wtempnam ((wchar_t*) dir, (wchar_t*) pfx), wchar_t *, 0); #elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR) ACE_OSCALL_RETURN (::_wtempnam (dir, pfx), wchar_t *, 0); #else /* ACE_HAS_WINCE || ACE_LACKS_TEMPNAM */ - ACE_OSCALL_RETURN (::tempnam (dir, pfx), char *, 0); + ACE_OSCALL_RETURN (ACE_STD_NAMESPACE::tempnam (dir, pfx), char *, 0); #endif /* VXWORKS */ } @@ -925,7 +925,11 @@ ACE_INLINE int ACE_OS::vsprintf (wchar_t *buffer, const wchar_t *format, va_list argptr) { # if defined (ACE_HAS_VSWPRINTF) +# if defined (ACE_HAS_DINKUM_STL) + return ACE_STD_NAMESPACE::vswprintf (buffer, ULONG_MAX, format, argptr); +#else return ::vswprintf (buffer, format, argptr); +# endif /* ACE_HAS_DINKUM_STL */ # else ACE_UNUSED_ARG (buffer); diff --git a/ace/OS_NS_stdlib.inl b/ace/OS_NS_stdlib.inl index 0a483488da3..54718026562 100644 --- a/ace/OS_NS_stdlib.inl +++ b/ace/OS_NS_stdlib.inl @@ -216,7 +216,7 @@ ACE_OS::putenv (const ACE_TCHAR *string) ACE_OSCALL_RETURN (::_wputenv (string), int, -1); #else /* ! ACE_HAS_WINCE && ! ACE_PSOS */ // VxWorks declares ::putenv with a non-const arg. - ACE_OSCALL_RETURN (::putenv ((char *) string), int, -1); + ACE_OSCALL_RETURN (ACE_STD_NAMESPACE::putenv ((char *) string), int, -1); #endif /* ACE_HAS_WINCE */ } @@ -343,7 +343,7 @@ ACE_OS::strtod (const char *s, char **endptr) ACE_INLINE double ACE_OS::strtod (const wchar_t *s, wchar_t **endptr) { - return ::wcstod (s, endptr); + return ACE_STD_NAMESPACE::wcstod (s, endptr); } #endif /* ACE_HAS_WCHAR && !ACE_LACKS_WCSTOD */ @@ -361,7 +361,7 @@ ACE_OS::strtol (const char *s, char **ptr, int base) ACE_INLINE long ACE_OS::strtol (const wchar_t *s, wchar_t **ptr, int base) { - return ::wcstol (s, ptr, base); + return ACE_STD_NAMESPACE::wcstol (s, ptr, base); } #endif /* ACE_HAS_WCHAR && !ACE_LACKS_WCSTOL */ @@ -379,7 +379,7 @@ ACE_OS::strtoul (const char *s, char **ptr, int base) ACE_INLINE unsigned long ACE_OS::strtoul (const wchar_t *s, wchar_t **ptr, int base) { - return ::wcstoul (s, ptr, base); + return ACE_STD_NAMESPACE::wcstoul (s, ptr, base); } #endif /* ACE_HAS_WCHAR && !ACE_LACKS_WCSTOUL */ diff --git a/ace/config-win32-borland.h b/ace/config-win32-borland.h index 39631ecadbc..a53790c9287 100644 --- a/ace/config-win32-borland.h +++ b/ace/config-win32-borland.h @@ -33,7 +33,6 @@ # define ACE_LACKS_MODE_MASKS 1 # define ACE_WSTRING_HAS_USHORT_SUPPORT 1 -# define ACE_HAS_ITOA 1 # define ACE_HAS_DIRENT #ifdef ACE_USES_STD_NAMESPACE_FOR_STDC_LIB @@ -90,6 +89,7 @@ # define ACE_WCSDUP_EQUIVALENT ::_wcsdup # define ACE_STRCASECMP_EQUIVALENT ::stricmp # define ACE_STRNCASECMP_EQUIVALENT ::strnicmp +# define ACE_HAS_ITOA 1 #endif #include /**/ "ace/post.h" |