apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@covalent.net>
Subject Re: [PATCH] APR WCE
Date Tue, 29 Jan 2002 07:25:33 GMT
From: "Mladen Turk" <mturk@mappingsoft.com>
Sent: Monday, January 28, 2002 3:48 PM


> Some more work on the subject...
> 
> MT.


--- apr_general.h 11 Dec 2001 19:40:50 -0000 1.62
+++ apr_general.h 28 Jan 2002 21:41:22 -0000
@@ -133,13 +133,21 @@
  * have it
  */
 #if (!APR_HAVE_STRCASECMP) && (APR_HAVE_STRICMP) 
+#ifdef _MSC_VER
+#define strcasecmp(s1, s2) _stricmp(s1, s2)


You are looking to define a new APR_HAVE__STRICMP (or APR_HAVE_uSTRICMP, 
whichever you find clearer.)  It must be defined to 0 in apr.h.in.

_MSC_VER is not namespace protected for APR, and apr_general.h is included
in more modules and more platforms than anything else I can imaginge but apr.h
itself :)

If this is true of oodles of things, perhaps APR_HAVE_UNDERBAR_DECL makes
more sense.


--- dso.c 28 Jan 2002 15:56:08 -0000 1.27
+++ dso.c 28 Jan 2002 21:44:57 -0000
@@ -158,8 +164,14 @@
                          struct apr_dso_handle_t *handle, 
                          const char *symname)
 {
-    *ressym = (apr_dso_handle_sym_t)GetProcAddress(handle->handle, symname);
+#if _WIN32_WCE
+    apr_wchar_t wsymname[256];
 
+    MultiByteToWideChar(CP_ACP, 0, symname, strlen(symname), wsymname, 255);
+    *ressym = (apr_dso_handle_sym_t)GetProcAddressW(handle->handle, wsymname);
+#else
+    *ressym = (apr_dso_handle_sym_t)GetProcAddress(handle->handle, symname);
+#endif
     if (!*ressym) {


Your SEM changes in this file are fine.  But you cannot use MBtWC.  APR is
implemented in terms of a single charset.  GStein has asked that we be able
to change that, which we might at some point.  But it's absolutely unacceptable
to go from narrow mapping to another.  Please replace with the utf-8 -> unicode
change so we can get this one commited.

This is one platform where 'local' charset is senseless - map it all utf-8 and
you have a 1:1 mapping to the one-and-only charset on CE :)

The rest is committed, thanks :)

Bill




Mime
View raw message