Author: hdu
Date: Fri Jun 20 11:13:13 2014
New Revision: 1604138
URL: http://svn.apache.org/r1604138
Log:
#i125115# fix unoinfo output on Windows
by using plain fwrite instead of trusting fprintf to handle the wchar_t string.
The endianess on Win32 can be assumed to be constant.
Merged from trunk revision 1603897
Modified:
openoffice/branches/AOO410/ (props changed)
openoffice/branches/AOO410/main/ (props changed)
openoffice/branches/AOO410/main/desktop/win32/source/unoinfo.cxx
Propchange: openoffice/branches/AOO410/
------------------------------------------------------------------------------
Merged /openoffice/trunk:r1603897
Propchange: openoffice/branches/AOO410/main/
------------------------------------------------------------------------------
Merged /openoffice/trunk/main:r1603897
Modified: openoffice/branches/AOO410/main/desktop/win32/source/unoinfo.cxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/AOO410/main/desktop/win32/source/unoinfo.cxx?rev=1604138&r1=1604137&r2=1604138&view=diff
==============================================================================
--- openoffice/branches/AOO410/main/desktop/win32/source/unoinfo.cxx (original)
+++ openoffice/branches/AOO410/main/desktop/win32/source/unoinfo.cxx Fri Jun 20
11:13:13 2014
@@ -66,7 +66,8 @@ void writePath(
if (end == NULL) {
exit(EXIT_FAILURE);
}
- fprintf(stdout, "%S", path);
+ size_t nWideLen = wcslen(path);
+ fwrite( path, sizeof(wchar_t), nWideLen, stdout);
}
}
@@ -103,7 +104,7 @@ int wmain(int argc, wchar_t ** argv, wch
writeNull();
writePath(path, pathEnd, MY_STRING(L"classes\\unoil.jar"));
writeNull();
- writePath(path, pathEnd, MY_STRING(L"\classes\\ridl.jar"));
+ writePath(path, pathEnd, MY_STRING(L"classes\\ridl.jar"));
writeNull();
writePath(path, pathEnd, MY_STRING(L"classes\\jurt.jar"));
writeNull();