Hi!
Found this while analyzing rxvt-unicode's config.log:
configure:7078: checking for working X setlocale
configure:7095: c++ -o conftest -O2 -pipe -w -I/usr/X11R6/include conftest.cpp
-lsupc++ -L/usr/X11R6/lib -R/usr/X11R6/lib -lX11 >&5
/tmp//cc2K0U3P.o(.text+0x11): In function `main':
: undefined reference to `_Xsetlocale'
collect2: ld returned 1 exit status
configure:7095: $? = 1
configure: failed program was:
The diff below makes Xsetlocale fall back to setlocale() like they
did for Apple and Cygwin...
Opinions / OKs ?
ciao
David
Index: src/SetLocale.c
===================================================================
RCS file: /cvs/xenocara/lib/libX11/src/SetLocale.c,v
retrieving revision 1.5
diff -u -p -u -p -r1.5 SetLocale.c
--- src/SetLocale.c 27 Aug 2011 15:34:15 -0000 1.5
+++ src/SetLocale.c 21 May 2014 12:09:48 -0000
@@ -117,7 +117,7 @@ _Xsetlocale(
#else /* X_LOCALE */
-#if defined(__APPLE__) || defined(__CYGWIN__)
+#if defined(__APPLE__) || defined(__CYGWIN__) || defined(__OpenBSD__)
char *
_Xsetlocale(
int category,
@@ -126,7 +126,7 @@ _Xsetlocale(
{
return setlocale(category, name);
}
-#endif /* __APPLE__ || __CYGWIN__ */
+#endif /* __APPLE__ || __CYGWIN__ || __OpenBSD__ */
/*
* _XlcMapOSLocaleName is an implementation dependent routine that derives