diff options
author | Steve Huston <shuston@riverace.com> | 2004-05-14 20:18:22 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 2004-05-14 20:18:22 +0000 |
commit | 4f7efc37a86acd83f691cae8b5c3de359e4ed030 (patch) | |
tree | 9c1616a5d034befd937c1ff96cc8eeda79293dc9 /ace/OS_NS_unistd.inl | |
parent | 2cf303a0e28889e6e7cbfc350b76e69c115f1733 (diff) | |
download | ATCD-4f7efc37a86acd83f691cae8b5c3de359e4ed030.tar.gz |
ChangeLog:Thu May 13 14:40:12 2004 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'ace/OS_NS_unistd.inl')
-rw-r--r-- | ace/OS_NS_unistd.inl | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/ace/OS_NS_unistd.inl b/ace/OS_NS_unistd.inl index a150f78792e..cd83bc91396 100644 --- a/ace/OS_NS_unistd.inl +++ b/ace/OS_NS_unistd.inl @@ -1253,7 +1253,7 @@ ACE_OS::ualarm (const ACE_Time_Value &tv, } ACE_INLINE int -ACE_OS::unlink (const ACE_TCHAR *path) +ACE_OS::unlink (const char *path) { ACE_OS_TRACE ("ACE_OS::unlink"); # if defined (VXWORKS) @@ -1269,15 +1269,31 @@ ACE_OS::unlink (const ACE_TCHAR *path) ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::DeleteFile (path), ace_result_), int, -1); # elif defined (ACE_LACKS_UNLINK) - ACE_UNUSED_ARG (path); - ACE_NOTSUP_RETURN (-1); -# elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR) - ACE_OSCALL_RETURN (::_wunlink (path), int, -1); + ACE_UNUSED_ARG (path); + ACE_NOTSUP_RETURN (-1); # else ACE_OSCALL_RETURN (::unlink (path), int, -1); # endif /* VXWORKS */ } +#if defined (ACE_HAS_WCHAR) +ACE_INLINE int +ACE_OS::unlink (const wchar_t *path) +{ + ACE_OS_TRACE ("ACE_OS::unlink"); +# if defined (ACE_HAS_WINCE) + // @@ The problem is, DeleteFile is not actually equals to unlink. ;( + ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::DeleteFile (path), ace_result_), + int, -1); +# elif defined (ACE_WIN32) + ACE_OSCALL_RETURN (::_wunlink (path), int, -1); +# else + ACE_Wide_To_Ascii npath (path); + return ACE_OS::unlink (npath.char_rep ()); +# endif /* ACE_HAS_WINCE */ +} +#endif /* ACE_HAS_WCHAR */ + ACE_INLINE ssize_t ACE_OS::write (ACE_HANDLE handle, const void *buf, size_t nbyte) { |