summaryrefslogtreecommitdiff
path: root/ACE
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2021-07-19 10:59:08 +0200
committerJohnny Willemsen <jwillemsen@remedy.nl>2021-07-19 10:59:08 +0200
commita3ecbed8af2478a7b32ef0c6bb7fb26c9701569a (patch)
tree5ac655f1ea73240b15095e7748c2afbf648ff093 /ACE
parent335e4a12ade8196a5e0bc8b7efa9d9f038f5883a (diff)
downloadATCD-a3ecbed8af2478a7b32ef0c6bb7fb26c9701569a.tar.gz
Make use of std now that we have C++11
* ACE/ace/OS_NS_math.h: * ACE/ace/OS_NS_stdio.h: * ACE/ace/OS_NS_stdio.inl: * ACE/ace/OS_NS_stdlib.h: * ACE/ace/OS_NS_wchar.inl:
Diffstat (limited to 'ACE')
-rw-r--r--ACE/ace/OS_NS_math.h10
-rw-r--r--ACE/ace/OS_NS_stdio.h71
-rw-r--r--ACE/ace/OS_NS_stdio.inl48
-rw-r--r--ACE/ace/OS_NS_stdlib.h4
-rw-r--r--ACE/ace/OS_NS_wchar.inl4
5 files changed, 33 insertions, 104 deletions
diff --git a/ACE/ace/OS_NS_math.h b/ACE/ace/OS_NS_math.h
index 9bbb0dbc369..4e8d7ee7c61 100644
--- a/ACE/ace/OS_NS_math.h
+++ b/ACE/ace/OS_NS_math.h
@@ -44,7 +44,7 @@ inline double ace_log2_helper (double x)
#undef log2
#else
# if !defined (ACE_LACKS_LOG2)
- return ACE_STD_NAMESPACE::log2 (x);
+ return std::log2 (x);
# else
/*
==================================================================
@@ -87,7 +87,7 @@ namespace ACE_OS
inline
T floor (T x)
{
- return ACE_STD_NAMESPACE::floor (x);
+ return std::floor (x);
}
#if defined (ACE_HAS_WINCE)
@@ -96,7 +96,7 @@ namespace ACE_OS
inline
float floor (float x)
{
- return ACE_STD_NAMESPACE::floorf (x);
+ return std::floorf (x);
}
#endif
@@ -105,7 +105,7 @@ namespace ACE_OS
inline
T ceil (T x)
{
- return ACE_STD_NAMESPACE::ceil (x);
+ return std::ceil (x);
}
#if defined (ACE_HAS_WINCE)
@@ -114,7 +114,7 @@ namespace ACE_OS
inline
float ceil (float x)
{
- return ACE_STD_NAMESPACE::ceilf (x);
+ return std::ceilf (x);
}
#endif
diff --git a/ACE/ace/OS_NS_stdio.h b/ACE/ace/OS_NS_stdio.h
index 1c4046f73a9..06c7d3d83d8 100644
--- a/ACE/ace/OS_NS_stdio.h
+++ b/ACE/ace/OS_NS_stdio.h
@@ -47,77 +47,6 @@
* be usable later as there is no way to save the macro definition
* using the pre-processor.
*/
-inline void ace_clearerr_helper (FILE *stream)
-{
-#if defined (clearerr)
- clearerr (stream);
-#undef clearerr
-#else
- ACE_STD_NAMESPACE::clearerr (stream);
-#endif /* defined (clearerr) */
-}
-
-inline int ace_fgetc_helper (FILE *fp)
-{
-#if defined (fgetc)
- return fgetc (fp);
-#undef fgetc
-#else
- return ACE_STD_NAMESPACE::fgetc (fp);
-#endif /* defined (fgetc) */
-}
-
-#if !defined (ACE_LACKS_FPUTC)
-inline int ace_fputc_helper (int ch, FILE *fp)
-{
-#if defined (fputc)
- return fputc (ch, fp);
-#undef fputc
-#else
- return ACE_STD_NAMESPACE::fputc (ch, fp);
-#endif /* defined (fputc) */
-}
-#endif /* !ACE_LACKS_FPUTC */
-
-#if !defined (ACE_LACKS_GETC)
-inline int ace_getc_helper (FILE *fp)
-{
-#if defined (getc)
- return getc (fp);
-#undef getc
-#else
- return ACE_STD_NAMESPACE::getc (fp);
-#endif /* defined (getc) */
-}
-#elif defined getc
-# undef getc
-#endif /* !ACE_LACKS_GETC */
-
-inline int ace_putc_helper (int ch, FILE *fp)
-{
-#if defined (putc)
- return putc (ch, fp);
-#undef putc
-#elif !defined (ACE_LACKS_PUTC)
- return ACE_STD_NAMESPACE::putc (ch, fp);
-#else
- ACE_UNUSED_ARG (ch);
- ACE_UNUSED_ARG (fp);
- return -1;
-#endif /* defined (putc) */
-}
-
-#if !defined (ACE_LACKS_UNGETC)
-inline int ace_ungetc_helper (int ch, FILE *fp)
-{
-#if defined (ungetc)
- return ungetc (ch, fp);
-#undef ungetc
-#else
- return ACE_STD_NAMESPACE::ungetc (ch, fp);
-#endif /* defined (ungetc) */
-}
-#endif /* !ACE_LACKS_UNGETC */
#if !defined ACE_FILENO_EQUIVALENT
inline ACE_HANDLE ace_fileno_helper (FILE *fp)
diff --git a/ACE/ace/OS_NS_stdio.inl b/ACE/ace/OS_NS_stdio.inl
index 9c448db1562..81280e336e8 100644
--- a/ACE/ace/OS_NS_stdio.inl
+++ b/ACE/ace/OS_NS_stdio.inl
@@ -343,7 +343,7 @@ ACE_OS::flock_wrlock (ACE_OS::ace_flock_t *lock,
ACE_INLINE void
ACE_OS::clearerr (FILE* fp)
{
- ace_clearerr_helper (fp);
+ std::clearerr (fp);
}
#if !defined (ACE_LACKS_CUSERID)
@@ -492,7 +492,7 @@ ACE_INLINE int
ACE_OS::fclose (FILE *fp)
{
ACE_OS_TRACE ("ACE_OS::fclose");
- return ACE_STD_NAMESPACE::fclose (fp);
+ return std::fclose (fp);
}
ACE_INLINE FILE *
@@ -541,13 +541,13 @@ ACE_INLINE int
ACE_OS::fflush (FILE *fp)
{
ACE_OS_TRACE ("ACE_OS::fflush");
- return ACE_STD_NAMESPACE::fflush (fp);
+ return std::fflush (fp);
}
ACE_INLINE int
ACE_OS::fgetc (FILE *fp)
{
- return ace_fgetc_helper (fp);
+ return std::fgetc (fp);
}
ACE_INLINE int
@@ -557,7 +557,7 @@ ACE_OS::getc (FILE *fp)
ACE_UNUSED_ARG (fp);
ACE_NOTSUP_RETURN (-1);
#else
- return ace_getc_helper (fp);
+ return std::getc (fp);
#endif
}
@@ -569,7 +569,7 @@ ACE_OS::fgetpos (FILE *fp, fpos_t *pos)
ACE_UNUSED_ARG (pos);
ACE_NOTSUP_RETURN (-1);
#else
- return ACE_STD_NAMESPACE::fgetpos (fp, pos);
+ return std::fgetpos (fp, pos);
#endif
}
@@ -582,14 +582,14 @@ ACE_OS::fgets (char *buf, int size, FILE *fp)
int c = EOF;
for (int i = 0; i < size - 1 && c != '\n'; ++i)
{
- c = ACE_STD_NAMESPACE::fgetc (fp);
+ c = std::fgetc (fp);
if (c != EOF)
*iter++ = static_cast<char> (c);
}
*iter = '\0';
return c == EOF ? 0 : buf;
#else
- return ACE_STD_NAMESPACE::fgets (buf, size, fp);
+ return std::fgets (buf, size, fp);
#endif /* ACE_LACKS_FGETS */
}
@@ -598,7 +598,7 @@ ACE_INLINE wchar_t *
ACE_OS::fgets (wchar_t *buf, int size, FILE *fp)
{
ACE_OS_TRACE ("ACE_OS::fgets");
- return ACE_STD_NAMESPACE::fgetws (buf, size, fp);
+ return std::fgetws (buf, size, fp);
}
#endif /* ACE_HAS_WCHAR && !ACE_LACKS_FGETWS */
@@ -671,7 +671,7 @@ ACE_OS::ungetc (int c, FILE *fp)
ACE_UNUSED_ARG (fp);
ACE_NOTSUP_RETURN (-1);
#else
- return ace_ungetc_helper (c, fp);
+ return std::ungetc (c, fp);
#endif
}
@@ -683,7 +683,7 @@ ACE_OS::fputc (int c, FILE *fp)
ACE_UNUSED_ARG (fp);
ACE_NOTSUP_RETURN (-1);
#else
- return ace_fputc_helper (c, fp);
+ return std::fputc (c, fp);
#endif
}
@@ -695,7 +695,7 @@ ACE_OS::putc (int c, FILE *fp)
ACE_UNUSED_ARG (fp);
ACE_NOTSUP_RETURN (-1);
#else
- return ace_putc_helper (c, fp);
+ return std::putc (c, fp);
#endif
}
@@ -708,7 +708,7 @@ ACE_OS::fputs (const char *s, FILE *stream)
ACE_UNUSED_ARG (stream);
ACE_NOTSUP_RETURN (-1);
#else
- return ACE_STD_NAMESPACE::fputs (s, stream);
+ return std::fputs (s, stream);
#endif
}
@@ -717,7 +717,7 @@ ACE_INLINE int
ACE_OS::fputs (const wchar_t *s, FILE *stream)
{
ACE_OS_TRACE ("ACE_OS::fputs");
- return ACE_STD_NAMESPACE::fputws (s, stream);
+ return std::fputws (s, stream);
}
#endif /* ACE_HAS_WCHAR && !ACE_LACKS_FPUTWS */
@@ -725,7 +725,7 @@ ACE_INLINE size_t
ACE_OS::fread (void *ptr, size_t size, size_t nelems, FILE *fp)
{
ACE_OS_TRACE ("ACE_OS::fread");
- return ACE_STD_NAMESPACE::fread (ptr, size, nelems, fp);
+ return std::fread (ptr, size, nelems, fp);
}
ACE_INLINE FILE *
@@ -740,7 +740,7 @@ ACE_OS::freopen (const ACE_TCHAR *filename, const ACE_TCHAR *mode, FILE* stream)
ACE_UNUSED_ARG (stream);
ACE_NOTSUP_RETURN (0);
#else
- return ACE_STD_NAMESPACE::freopen (ACE_TEXT_ALWAYS_CHAR (filename), ACE_TEXT_ALWAYS_CHAR (mode), stream);
+ return std::freopen (ACE_TEXT_ALWAYS_CHAR (filename), ACE_TEXT_ALWAYS_CHAR (mode), stream);
#endif /* ACE_WIN32 && ACE_USES_WCHAR */
}
@@ -767,7 +767,7 @@ ACE_OS::fseek (FILE *fp, long offset, int whence)
}
# endif /* SEEK_SET != FILE_BEGIN || SEEK_CUR != FILE_CURRENT || SEEK_END != FILE_END */
#endif /* ACE_WIN32 */
- return ACE_STD_NAMESPACE::fseek (fp, offset, whence);
+ return std::fseek (fp, offset, whence);
}
ACE_INLINE int
@@ -785,14 +785,14 @@ ACE_OS::fsetpos (FILE* fp, fpos_t* pos)
ACE_INLINE long
ACE_OS::ftell (FILE* fp)
{
- return ACE_STD_NAMESPACE::ftell (fp);
+ return std::ftell (fp);
}
ACE_INLINE size_t
ACE_OS::fwrite (const void *ptr, size_t size, size_t nitems, FILE *fp)
{
ACE_OS_TRACE ("ACE_OS::fwrite");
- return ACE_STD_NAMESPACE::fwrite (ptr, size, nitems, fp);
+ return std::fwrite (ptr, size, nitems, fp);
}
ACE_INLINE void
@@ -830,7 +830,7 @@ ACE_OS::puts (const char *s)
ACE_UNUSED_ARG (s);
ACE_NOTSUP_RETURN (-1);
#else
- return ::puts (s);
+ return std::puts (s);
#endif /* ACE_LACKS_PUTS */
}
@@ -934,7 +934,7 @@ ACE_OS::rewind (FILE *fp)
#else
// This isn't perfect since it doesn't reset EOF, but it's probably
// the closest we can get on WINCE.
- (void) ::fseek (fp, 0L, SEEK_SET);
+ (void) std::fseek (fp, 0L, SEEK_SET);
#endif /* ACE_HAS_WINCE */
}
@@ -1034,7 +1034,7 @@ ACE_OS::vprintf (const char *format, va_list argptr)
ACE_UNUSED_ARG (argptr);
ACE_NOTSUP_RETURN (-1);
#else
- return ::vprintf (format, argptr);
+ return std::vprintf (format, argptr);
#endif /* ACE_LACKS_VPRINTF */
}
@@ -1061,7 +1061,7 @@ ACE_OS::vfprintf (FILE *fp, const char *format, va_list argptr)
ACE_UNUSED_ARG (argptr);
ACE_NOTSUP_RETURN (-1);
#else
- return ACE_STD_NAMESPACE::vfprintf (fp, format, argptr);
+ return std::vfprintf (fp, format, argptr);
#endif
}
@@ -1089,7 +1089,7 @@ ACE_OS::vsprintf (char *buffer, const char *format, va_list argptr)
ACE_UNUSED_ARG (argptr);
ACE_NOTSUP_RETURN (-1);
#else
- return ::vsprintf (buffer, format, argptr);
+ return std::vsprintf (buffer, format, argptr);
#endif /* ACE_LACKS_VSPRINTF */
}
diff --git a/ACE/ace/OS_NS_stdlib.h b/ACE/ace/OS_NS_stdlib.h
index ab0f86884b1..86d280b3616 100644
--- a/ACE/ace/OS_NS_stdlib.h
+++ b/ACE/ace/OS_NS_stdlib.h
@@ -58,7 +58,7 @@ inline ACE_INT64 ace_strtoll_helper (const char *s, char **ptr, int base)
return strtoll (s, ptr, base);
# undef strtoll
# else
- return ACE_STD_NAMESPACE::strtoll (s, ptr, base);
+ return std::strtoll (s, ptr, base);
# endif /* strtoll */
}
#endif /* !ACE_LACKS_STRTOLL && !ACE_STRTOLL_EQUIVALENT */
@@ -70,7 +70,7 @@ inline ACE_INT64 ace_strtoull_helper (const char *s, char **ptr, int base)
return strtoull (s, ptr, base);
# undef strtoull
# else
- return ACE_STD_NAMESPACE::strtoull (s, ptr, base);
+ return std::strtoull (s, ptr, base);
# endif /* strtoull */
}
#endif /* !ACE_LACKS_STRTOULL && !ACE_STRTOULL_EQUIVALENT */
diff --git a/ACE/ace/OS_NS_wchar.inl b/ACE/ace/OS_NS_wchar.inl
index 3feee38ec13..29f5b70f1b3 100644
--- a/ACE/ace/OS_NS_wchar.inl
+++ b/ACE/ace/OS_NS_wchar.inl
@@ -9,7 +9,7 @@ ACE_OS::fgetwc (FILE* fp)
ACE_UNUSED_ARG (fp);
ACE_NOTSUP_RETURN (0);
# else
- return ACE_STD_NAMESPACE::fgetwc (fp);
+ return std::fgetwc (fp);
# endif /* ACE_LACKS_FGETWC */
}
#endif /* ACE_HAS_WCHAR */
@@ -76,7 +76,7 @@ ACE_OS::ungetwc (wint_t c, FILE* fp)
ACE_UNUSED_ARG (fp);
ACE_NOTSUP_RETURN (0);
# else
- return ACE_STD_NAMESPACE::ungetwc (c, fp);
+ return std::ungetwc (c, fp);
# endif /* ACE_LACKS_FGETWC */
}
#endif /* ACE_HAS_WCHAR */