ASF Bugzilla – Attachment 20120 Details for
Bug 39895
apr_os_strerror on WinCE needs to xlate unicode->utf8
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Slight modification of previous patch
bug39895-mid.patch (text/plain), 2.87 KB, created by
Curt Arnold
on 2007-05-03 08:44:58 UTC
(
hide
)
Description:
Slight modification of previous patch
Filename:
MIME Type:
Creator:
Curt Arnold
Created:
2007-05-03 08:44:58 UTC
Size:
2.87 KB
patch
obsolete
>Index: test/teststr.c >=================================================================== >--- test/teststr.c (revision 11) >+++ test/teststr.c (working copy) >@@ -166,6 +166,8 @@ > for (n = 1; n < 1000000; n *= 2) { > apr_strerror(n, buf, sizeof buf); > } >+ >+ apr_strerror(APR_OS_START_SYSERR + ERROR_ACCESS_DENIED, buf, sizeof buf); > } > > #define SIZE 180000 >Index: test/abts_tests.h >=================================================================== >--- test/abts_tests.h (revision 11) >+++ test/abts_tests.h (working copy) >@@ -23,7 +23,7 @@ > const struct testlist { > abts_suite *(*func)(abts_suite *suite); > } alltests[] = { >- {testatomic}, >+ /* {testatomic}, > {testdir}, > {testdso}, > {testdup}, >@@ -34,10 +34,10 @@ > {testflock}, > {testfmt}, > {testfnmatch}, >- {testgetopt}, >+ {testgetopt}, */ > #if 0 /* not ready yet due to API issues */ > {testglobalmutex}, >-#endif >+#endif /* > {testhash}, > {testipsub}, > {testlock}, >@@ -57,8 +57,8 @@ > {testshm}, > {testsock}, > {testsockets}, >- {testsockopt}, >- {teststr}, >+ {testsockopt}, */ >+ {teststr} /*, > {teststrnatcmp}, > {testtable}, > {testtemp}, >@@ -66,7 +66,7 @@ > {testtime}, > {testud}, > {testuser}, >- {testvsn} >+ {testvsn} */ > }; > > #endif /* APR_TEST_INCLUDES */ >Index: misc/unix/errorcodes.c >=================================================================== >--- misc/unix/errorcodes.c (revision 11) >+++ misc/unix/errorcodes.c (working copy) >@@ -247,15 +247,35 @@ > apr_size_t len=0, i; > > #ifndef NETWARE >- len = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM >+#if !defined(_WIN32_WCE) >+ len = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM > | FORMAT_MESSAGE_IGNORE_INSERTS, > NULL, > errcode, > MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), /* Default language */ >- (LPTSTR) buf, >+ buf, > (DWORD)bufsize, > NULL); >+#else >+ LPTSTR msg = (LPTSTR) buf; >+ len = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM >+ | FORMAT_MESSAGE_IGNORE_INSERTS, >+ NULL, >+ errcode, >+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), /* Default language */ >+ msg, >+ (DWORD) (bufsize/sizeof(TCHAR)), >+ NULL); >+ /* in-place convert to US-ASCII, substituting '?' for non ASCII */ >+ for(i = 0; i <= len; i++) { >+ if (msg[i] < 0x80 && msg[i] >= 0) { >+ buf[i] = (char) msg[i]; >+ } else { >+ buf[i] = '?'; >+ } >+ } > #endif >+#endif > > if (!len) { > for (i = 0; gaErrorList[i].msg; ++i) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 39895
:
18527
|
20120
|
20121
|
20122
|
20123