ASF Bugzilla – Attachment 18524 Details for
Bug 39889
misc/win32/misc.c fails to compile on WinCE
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to make misc.c compile when _UNICODE set
apr-bug-39889.patch (text/plain), 3.03 KB, created by
Curt Arnold
on 2006-06-23 18:48:42 UTC
(
hide
)
Description:
Patch to make misc.c compile when _UNICODE set
Filename:
MIME Type:
Creator:
Curt Arnold
Created:
2006-06-23 18:48:42 UTC
Size:
3.03 KB
patch
obsolete
>Index: misc/win32/misc.c >=================================================================== >--- misc/win32/misc.c (revision 408977) >+++ misc/win32/misc.c (working copy) >@@ -20,6 +20,7 @@ > #include "apr_arch_file_io.h" > #include "assert.h" > #include "apr_lib.h" >+#include "tchar.h" > > APR_DECLARE_DATA apr_oslevel_e apr_os_level = APR_WIN_UNK; > >@@ -34,13 +35,13 @@ > if (oslev.dwPlatformId == VER_PLATFORM_WIN32_NT) > { > static unsigned int servpack = 0; >- char *pservpack; >+ TCHAR *pservpack; > if (pservpack = oslev.szCSDVersion) { > while (*pservpack && !apr_isdigit(*pservpack)) { > pservpack++; > } > if (*pservpack) >- servpack = atoi(pservpack); >+ servpack = _tstoi(pservpack); > } > > if (oslev.dwMajorVersion < 3) { >@@ -98,22 +99,22 @@ > } > #ifndef WINNT > else if (oslev.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) { >- char *prevision; >+ TCHAR *prevision; > if (prevision = oslev.szCSDVersion) { > while (*prevision && !apr_isupper(*prevision)) { > prevision++; > } > } >- else prevision = ""; >+ else prevision = _T(""); > > if (oslev.dwMinorVersion < 10) { >- if (*prevision < 'C') >+ if (*prevision < _T('C')) > apr_os_level = APR_WIN_95; > else > apr_os_level = APR_WIN_95_OSR2; > } > else if (oslev.dwMinorVersion < 90) { >- if (*prevision < 'A') >+ if (*prevision < _T('A')) > apr_os_level = APR_WIN_98; > else > apr_os_level = APR_WIN_98_SE; >@@ -161,14 +162,14 @@ > FARPROC apr_load_dll_func(apr_dlltoken_e fnLib, char* fnName, int ordinal) > { > if (!lateDllHandle[fnLib]) { >- lateDllHandle[fnLib] = LoadLibrary(lateDllName[fnLib]); >+ lateDllHandle[fnLib] = LoadLibraryA(lateDllName[fnLib]); > if (!lateDllHandle[fnLib]) > return NULL; > } > if (ordinal) >- return GetProcAddress(lateDllHandle[fnLib], (char *) ordinal); >+ return GetProcAddressA(lateDllHandle[fnLib], (char *) ordinal); > else >- return GetProcAddress(lateDllHandle[fnLib], fnName); >+ return GetProcAddressA(lateDllHandle[fnLib], fnName); > } > > /* Declared in include/arch/win32/apr_dbg_win32_handles.h >@@ -196,10 +197,10 @@ > (TlsSetValue)(tlsid, sbuf); > sbuf[1023] = '\0'; > if (!fh) { >- (GetModuleFileName)(NULL, sbuf, 250); >+ (GetModuleFileNameA)(NULL, sbuf, 250); > sprintf(strchr(sbuf, '\0'), ".%d", > (GetCurrentProcessId)()); >- fh = (CreateFile)(sbuf, GENERIC_WRITE, 0, NULL, >+ fh = (CreateFileA)(sbuf, GENERIC_WRITE, 0, NULL, > CREATE_ALWAYS, 0, NULL); > (InitializeCriticalSection)(&cs); > }
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 39889
:
18524
|
18531
|
18532