summaryrefslogtreecommitdiff
path: root/ace/OS.i
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-01-17 20:29:00 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-01-17 20:29:00 +0000
commit2d85c325b1050a34721139241028988913994e6b (patch)
tree0a7b4d9c37b1d93019857742bb61ff8bab7138be /ace/OS.i
parent953cf51642f6c44e4a503084518c98a8174aa469 (diff)
downloadATCD-2d85c325b1050a34721139241028988913994e6b.tar.gz
ChangeLogTag:Mon Jan 17 14:20:17 2000 Nanbor Wang <nanbor@cs.wustl.edu>
Diffstat (limited to 'ace/OS.i')
-rw-r--r--ace/OS.i24
1 files changed, 14 insertions, 10 deletions
diff --git a/ace/OS.i b/ace/OS.i
index 416ba8b5c74..671cbfb998e 100644
--- a/ace/OS.i
+++ b/ace/OS.i
@@ -12276,12 +12276,12 @@ ferror (FILE *fp)
// **** Warning ****
ACE_INLINE int
-isatty (ACE_HANDLE h)
+isatty (int h)
{
return ACE_OS::isatty (h);
}
-ACE_INLINE ACE_HANDLE
+int ACE_HANDLE
fileno (FILE *fp)
{
return fp;
@@ -12320,7 +12320,7 @@ putchar (int c)
#if defined (ACE_PSOS)
ACE_INLINE int
-isatty (ACE_HANDLE h)
+isatty (int h)
{
return ACE_OS::isatty (h);
}
@@ -12592,19 +12592,14 @@ ACE_OS::set_exit_hook (ACE_EXIT_HOOK exit_hook)
}
ACE_INLINE int
-ACE_OS::isatty (ACE_HANDLE handle)
+ACE_OS::isatty (int handle)
{
# if defined (ACE_LACKS_ISATTY)
ACE_UNUSED_ARG (handle);
return 0;
# elif defined (ACE_WIN32)
-# if !defined (ACE_HAS_WINCE)
ACE_TRACE ("ACE_OS::isatty");
- ACE_OSCALL_RETURN (::_isatty ((int) handle), int, -1);
-# else
- ACE_UNUSED_ARG (handle);
- return 0;
-# endif /* ACE_HAS_WINCE */
+ return ::_isatty (handle);
# else
ACE_TRACE ("ACE_OS::isatty");
ACE_OSCALL_RETURN (::isatty (handle), int, -1);
@@ -12612,6 +12607,15 @@ ACE_OS::isatty (ACE_HANDLE handle)
}
#if defined (ACE_WIN32)
+# if !defined (ACE_HAS_WINCE)
+ACE_INLINE int
+ACE_OS::isatty (ACE_HANDLE handle)
+{
+ int fd = ::_open_osfhandle ((long) handle, 0);
+ return ::_isatty (fd);
+}
+# endif /* !ACE_HAS_WINCE */
+
ACE_INLINE void
ACE_OS::fopen_mode_to_open_mode_converter (char x, int &hmode)
{