summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ace/OS_NS_stdio.cpp4
-rw-r--r--ace/OS_NS_stdio.inl6
2 files changed, 6 insertions, 4 deletions
diff --git a/ace/OS_NS_stdio.cpp b/ace/OS_NS_stdio.cpp
index b370b46ee49..46b30ef5fdb 100644
--- a/ace/OS_NS_stdio.cpp
+++ b/ace/OS_NS_stdio.cpp
@@ -136,9 +136,9 @@ ACE_OS::fopen (const char *filename,
if (fd != -1)
{
# if defined (__BORLANDC__) && !defined (ACE_USES_WCHAR)
- FILE *fp = ::_fdopen (fd, const_cast<char *> (mode));
+ FILE *fp = ::_fdopen (fd, const_cast<ACE_TCHAR *> (mode));
# elif defined (__BORLANDC__) && defined (ACE_USES_WCHAR)
- FILE *fp = ::_wfdopen (fd, const_cast<wchar_t *> (mode));
+ FILE *fp = ::_wfdopen (fd, const_cast<ACE_TCHAR *> (mode));
# elif defined (ACE_USES_WCHAR)
FILE *fp = ::_wfdopen (fd, mode);
# else
diff --git a/ace/OS_NS_stdio.inl b/ace/OS_NS_stdio.inl
index 2c208212091..bde987d0b90 100644
--- a/ace/OS_NS_stdio.inl
+++ b/ace/OS_NS_stdio.inl
@@ -648,8 +648,10 @@ ACE_OS::fdopen (ACE_HANDLE handle, const ACE_TCHAR *mode)
if (crt_handle != -1)
{
-# if defined(__BORLANDC__) /* VSB */
- file = ::_fdopen (crt_handle, const_cast<char *> (mode));
+# if defined(__BORLANDC__) && !defined (ACE_USES_WCHAR)
+ file = ::_fdopen (crt_handle, const_cast<ACE_TCHAR *> (mode));
+# elif defined (__BORLANDC__) && defined (ACE_USES_WCHAR)
+ file = ::_wfdopen (crt_handle, const_cast<ACE_TCHAR *> (mode));
# elif defined (ACE_USES_WCHAR)
file = ::_wfdopen (crt_handle, mode);
# else