[PATCH 3/3] Provide _Xsetlocale compat wrappers on Cygwin

Yaakov (Cygwin/X) yselkowitz at users.sourceforge.net
Tue Oct 13 17:15:51 PDT 2009


From: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>

Previous versions of Cygwin did not have proper locale support, so Cygwin/X
defined X_LOCALE, using _Xsetlocale instead.  Cygwin 1.7 has added locale
support, but we can't remove the _Xsetlocale entry point without breaking
ABI.

Signed-off-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
---
 src/SetLocale.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/SetLocale.c b/src/SetLocale.c
index 0155777..a19baa9 100644
--- a/src/SetLocale.c
+++ b/src/SetLocale.c
@@ -121,7 +121,7 @@ _Xsetlocale(
 
 #else /* X_LOCALE */
 
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__CYGWIN__)
 char *
 _Xsetlocale(
     int           category,
@@ -130,7 +130,7 @@ _Xsetlocale(
 {
     return setlocale(category, name);
 }
-#endif /* __APPLE__ */
+#endif /* __APPLE__ || __CYGWIN__ */
 
 /*
  * _XlcMapOSLocaleName is an implementation dependent routine that derives
-- 
1.6.4.2



More information about the xorg-devel mailing list