summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjohn_c <john_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-11-07 20:55:40 +0000
committerjohn_c <john_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-11-07 20:55:40 +0000
commit103d4362e4fe462222015dd9c449996ef1015272 (patch)
treef683d4ab9a9bea90636e0cf8d1cbcea45e8dc50c
parent535e35f228bb11298ecb696a83dc911b005e8cea (diff)
downloadATCD-103d4362e4fe462222015dd9c449996ef1015272.tar.gz
Daves ACE_USES_WCHAR fixes
-rw-r--r--ace/OS_NS_stdio.inl7
-rw-r--r--ace/OS_NS_stdlib.inl8
2 files changed, 7 insertions, 8 deletions
diff --git a/ace/OS_NS_stdio.inl b/ace/OS_NS_stdio.inl
index e237ce94275..607d974d972 100644
--- a/ace/OS_NS_stdio.inl
+++ b/ace/OS_NS_stdio.inl
@@ -1007,13 +1007,12 @@ ACE_OS::tempnam (const wchar_t *dir, const wchar_t *pfx)
ACE_TEXT_TO_CHAR_IN (pfx));
// ACE_OS::tempnam returns a pointer to a malloc()-allocated space.
// Convert that string to wide-char and free() the original.
- wchar_t* wname = 0;
if (name != 0)
{
- ::free( name );
- wname = ACE_TEXT_TO_MALLOC_WCHAR_OUT( name );
+ ::free( name );
+ return ACE_TEXT_TO_MALLOC_WCHAR_OUT( name );
}
- return *wname;
+ return 0;
#endif /* ACE_LACKS_TEMPNAM */
}
diff --git a/ace/OS_NS_stdlib.inl b/ace/OS_NS_stdlib.inl
index 23801969a72..3a01c8a39e7 100644
--- a/ace/OS_NS_stdlib.inl
+++ b/ace/OS_NS_stdlib.inl
@@ -205,10 +205,10 @@ ACE_OS::mkstemp (wchar_t *s)
{
s[0] = 0;
# if !defined (ACE_LACKS_MKSTEMP)
- ACE::String_Conversion::Convert_InOut<char, wchar_t> convert( s, MAX_PATH );
+ ACE::String_Conversion::Convert_InOut<char, wchar_t> convert( s, PATH_MAX );
return ::mkstemp (convert.c_str());
# else
- ACE::String_Conversion::Convert_InOut<ACE_TCHAR, ACE_ANTI_TCHAR> convert( s, MAX_PATH );
+ ACE::String_Conversion::Convert_InOut<ACE_TCHAR, ACE_ANTI_TCHAR> convert( s, PATH_MAX );
return ACE_OS::mkstemp_emulation (convert.c_str());
# endif /* !ACE_LACKS_MKSTEMP */
}
@@ -240,7 +240,7 @@ ACE_OS::mktemp (wchar_t *s)
// a narrow-char string for mktemp(), then convert the name back to
// wide-char for the caller.
s[0] = 0;
- ACE::String_Conversion::Convert_InOut<char, wchar_t> convert( s, MAX_PATH );
+ ACE::String_Conversion::Convert_InOut<char, wchar_t> convert( s, PATH_MAX );
if (::mktemp (convert.c_str()) == 0)
return 0;
return s;
@@ -427,7 +427,7 @@ ACE_OS::strenvdup (const ACE_TCHAR *str)
# else
// Use char * for environment on non-Windows.
char *temp = 0;
- if ((temp = ACE_OS::getenv (ACE_TEXT_TO_CHAR_IN(&str[1])) != 0)
+ if ((temp = ACE_OS::getenv (ACE_TEXT_TO_CHAR_IN(&str[1]))) != 0)
return ACE_OS::strdup (ACE_TEXT_TO_TCHAR_IN (temp));
# endif /* ACE_WIN32 */
return ACE_OS::strdup (str);