summaryrefslogtreecommitdiff
path: root/ACE/ace/OS_NS_stdio.h
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2009-05-20 07:38:52 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2009-05-20 07:38:52 +0000
commitbaf8709edf0fafb3011a1bc8da8bf6fd9a486b71 (patch)
treec85b53d06e056d1480bbad1f9a8e184b1e94814e /ACE/ace/OS_NS_stdio.h
parent2620d20738b2b812be8e67e6493f9bf58f6943d1 (diff)
downloadATCD-baf8709edf0fafb3011a1bc8da8bf6fd9a486b71.tar.gz
Wed May 20 07:38:05 2009 Johnny Willemsen <jwillemsen@remedy.nl>
* ace/OS_NS_stdio.h: * ace/OS_NS_stdio.inl: On some platforms fileno is a macro * ace/OS_NS_dirent.cpp: Layout and const changes
Diffstat (limited to 'ACE/ace/OS_NS_stdio.h')
-rw-r--r--ACE/ace/OS_NS_stdio.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/ACE/ace/OS_NS_stdio.h b/ACE/ace/OS_NS_stdio.h
index 1231da98e14..e8d61f16017 100644
--- a/ACE/ace/OS_NS_stdio.h
+++ b/ACE/ace/OS_NS_stdio.h
@@ -34,6 +34,10 @@
# include "ace/os_include/os_unistd.h"
#endif /* CYGWIN32 || ACE_OPENVMS */
+#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)
+# include "io.h"
+#endif
+
#if defined (ACE_EXPORT_MACRO)
# undef ACE_EXPORT_MACRO
#endif
@@ -108,6 +112,18 @@ inline int ace_ungetc_helper (int ch, FILE *fp)
#endif /* defined (ungetc) */
}
+inline ACE_HANDLE ace_fileno_helper (FILE *fp)
+{
+#if defined (fileno)
+ return fileno (fp);
+#undef fileno
+#elif defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)
+ return (ACE_HANDLE)_get_osfhandle (ACE_STD_NAMESPACE::fileno (fp));
+#else
+ return ACE_STD_NAMESPACE::fileno (fp);
+#endif /* defined (fileno) */
+}
+
#if !defined (ACE_LACKS_CUSERID) && !defined(ACE_HAS_ALT_CUSERID) \
&& !defined(ACE_WIN32) && !defined (ACE_VXWORKS)