Bug 39889 - misc/win32/misc.c fails to compile on WinCE
Summary: misc/win32/misc.c fails to compile on WinCE
Status: RESOLVED FIXED
Alias: None
Product: APR
Classification: Unclassified
Component: APR (show other bugs)
Version: HEAD
Hardware: Other Windows CE
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache Portable Runtime bugs mailinglist
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2006-06-23 18:03 UTC by Curt Arnold
Modified: 2007-07-22 09:30 UTC (History)
0 users



Attachments
Patch to make misc.c compile when _UNICODE set (3.03 KB, patch)
2006-06-23 18:48 UTC, Curt Arnold
Details | Diff
Avoids _tstoi which is missing on link in WinCE (2.89 KB, patch)
2006-06-24 00:19 UTC, Curt Arnold
Details | Diff
Third time is the charm (3.13 KB, patch)
2006-06-24 05:23 UTC, Curt Arnold
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Curt Arnold 2006-06-23 18:03:54 UTC
misc/win32/misc.c depends on _UNICODE not being set and all Windows API calls
being char* based.  On WinCE, _UNICODE is forced to be set.  This patch modifies
to Windows version detection code to use TCHAR and adds the explicit "A"
qualifier to LoadLibrary and GetProcAddress so the char* based versions are used
regardless.
Comment 1 Curt Arnold 2006-06-23 18:48:42 UTC
Created attachment 18524 [details]
Patch to make misc.c compile when _UNICODE set
Comment 2 Curt Arnold 2006-06-24 00:19:58 UTC
Created attachment 18531 [details]
Avoids _tstoi which is missing on link in WinCE
Comment 3 Curt Arnold 2006-06-24 05:23:17 UTC
Created attachment 18532 [details]
Third time is the charm

GetProcAddressA is only defined for WinCE (where GetProcAddress takes
wchar_t*).  GetProcAddress on other platforms only takes char* regardless of
_UNICODE setting.
Comment 4 William A. Rowe Jr. 2006-09-19 19:54:43 UTC
Mass reassign the 44 open apr-bugs to apr bug list
Comment 5 Davi Arnaut 2007-04-29 15:27:16 UTC
It compiles and builds fine on VS C++ 6.0
Comment 6 William A. Rowe Jr. 2007-05-31 19:38:08 UTC
There's an assumption that tchar.h is available to our users of mingw, borland, 
etc.  If this is not true, this patch needs to be refactored.

Can we verify before we take 2 steps backwards to make one step forwards?
Comment 7 Davi Arnaut 2007-06-04 11:09:58 UTC
Borland C++ Builder 6.0 and newer versions have tchar.h
The mingw-runtime-3.9 (Oct 27, 2005) has it too.
Comment 8 Davi Arnaut 2007-07-22 09:30:17 UTC
Patch committed to trunk in revision 558506:

http://svn.apache.org/viewvc?view=rev&revision=558506