Previous versions of Mac OS X did not have proper locale support so our StandardDefines included -DX_LOCALE. Mac OS X 10.3.x now has proper locale support, so we want to remove -DX_LOCALE. This will cause a problem for binaries compiled against the old versions of libX11 that call _Xsetlocale(). To enable a smooth transition the patch below has been suggested. I would think this problem has occurred before. Is there a better way to deal with this?

--Torrey

--- lib/X11/SetLocale.c.orig    Fri Nov 21 14:57:29 2003
+++ lib/X11/SetLocale.c Fri Jan 23 17:13:30 2004
@@ -116,6 +116,16 @@
 }

 #else /* X_LOCALE */
+#ifdef __DARWIN__
+char *
+_Xsetlocale(
+    int                  category,
+    _Xconst char  *name
+)
+{
+    return setlocale(category, name);
+}
+#endif /* __DARWIN__ */

 /*
  * _XlcMapOSLocaleName is an implementation dependent routine that derives
--- lib/X11/XlcPubI.h.orig      Fri Nov 21 14:57:32 2003
+++ lib/X11/XlcPubI.h   Fri Jan 23 17:15:38 2004
@@ -234,6 +234,12 @@
     int           category,
     _Xconst char  *name);
 #else
+#ifdef __DARWIN__
+extern char *
+_Xsetlocale(
+    int           category,
+    _Xconst char  *name);
+#endif
 extern char *_XlcMapOSLocaleName(
     char *osname,
     char *siname);
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to