diff options
Diffstat (limited to 'ace/OS_NS_stdio.cpp')
-rw-r--r-- | ace/OS_NS_stdio.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/ace/OS_NS_stdio.cpp b/ace/OS_NS_stdio.cpp index 10208d96a34..a5bcfae03f0 100644 --- a/ace/OS_NS_stdio.cpp +++ b/ace/OS_NS_stdio.cpp @@ -77,9 +77,8 @@ void ACE_OS::checkUnicodeFormat (FILE* fp) // select correct buffer type. // At this point, check if the file is Unicode or not. - ACE_UINT16 first_two_bytes; - size_t numRead = - ACE_OS::fread(&first_two_bytes, sizeof (first_two_bytes), 1, fp); + WORD first_two_bytes; + size_t numRead = ACE_OS::fread(&first_two_bytes, sizeof(WORD), 1, fp); if (numRead == 1) { @@ -87,11 +86,7 @@ void ACE_OS::checkUnicodeFormat (FILE* fp) (first_two_bytes != 0xFEFF)) // not a big endian Unicode file { // set file pointer back to the beginning -#if defined (ACE_WIN32) ACE_OS::fseek(fp, 0, FILE_BEGIN); -#else - ACE_OS::fseek(fp, 0, SEEK_SET); -#endif /* ACE_WIN32 */ } } // if it is a Unicode file, file pointer will be right next to the first @@ -428,6 +423,6 @@ ACE_OS::sprintf (wchar_t *buf, const wchar_t *format, ...) ACE_UNUSED_ARG (format); ACE_NOTSUP_RETURN (-1); -# endif /* XPG5 || ACE_HAS_DINKUM_STL */ +# endif /* ACE_HAS_VSWPRINTF */ } #endif /* ACE_HAS_WCHAR */ |