summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2021-07-19 12:29:53 +0200
committerJohnny Willemsen <jwillemsen@remedy.nl>2021-07-19 12:29:53 +0200
commitde0dde267b764c98e817b0affd2af354721b4e6b (patch)
treeedc2b71f3b717be512b7b62431929a882a79e569
parent80b5d2a102bb0cea3bb58bd891af52a8796a7018 (diff)
downloadATCD-de0dde267b764c98e817b0affd2af354721b4e6b.tar.gz
Fixed compile errors
* ACE/ace/OS_NS_stdio.h: * ACE/ace/OS_NS_stdio.inl: * ACE/ace/OS_NS_time.inl:
-rw-r--r--ACE/ace/OS_NS_stdio.h49
-rw-r--r--ACE/ace/OS_NS_stdio.inl4
-rw-r--r--ACE/ace/OS_NS_time.inl2
3 files changed, 52 insertions, 3 deletions
diff --git a/ACE/ace/OS_NS_stdio.h b/ACE/ace/OS_NS_stdio.h
index 06c7d3d83d8..03366458315 100644
--- a/ACE/ace/OS_NS_stdio.h
+++ b/ACE/ace/OS_NS_stdio.h
@@ -47,6 +47,55 @@
* be usable later as there is no way to save the macro definition
* using the pre-processor.
*/
+inline int ace_fgetc_helper (FILE *fp)
+{
+#if defined (fgetc)
+ return fgetc (fp);
+#undef fgetc
+#else
+ return ::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 ::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 ::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 ::putc (ch, fp);
+#else
+ ACE_UNUSED_ARG (ch);
+ ACE_UNUSED_ARG (fp);
+ return -1;
+#endif /* defined (putc) */
+}
#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 81280e336e8..b97adfdbbc9 100644
--- a/ACE/ace/OS_NS_stdio.inl
+++ b/ACE/ace/OS_NS_stdio.inl
@@ -557,7 +557,7 @@ ACE_OS::getc (FILE *fp)
ACE_UNUSED_ARG (fp);
ACE_NOTSUP_RETURN (-1);
#else
- return std::getc (fp);
+ return ace_getc_helper (fp);
#endif
}
@@ -683,7 +683,7 @@ ACE_OS::fputc (int c, FILE *fp)
ACE_UNUSED_ARG (fp);
ACE_NOTSUP_RETURN (-1);
#else
- return std::fputc (c, fp);
+ return ace_fputc_helper (c, fp);
#endif
}
diff --git a/ACE/ace/OS_NS_time.inl b/ACE/ace/OS_NS_time.inl
index f2e53058cbe..03bb984d762 100644
--- a/ACE/ace/OS_NS_time.inl
+++ b/ACE/ace/OS_NS_time.inl
@@ -433,7 +433,7 @@ ACE_OS::strptime (const char *buf, const char *format, struct tm *tm)
#if defined (ACE_LACKS_STRPTIME)
return ACE_OS::strptime_emulation (buf, format, tm);
#else
- return std::strptime (buf, format, tm);
+ return ::strptime (buf, format, tm);
#endif /* ACE_LACKS_STRPTIME */
}