[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r15409 - in /trunk/localedef: ChangeLog.eglibc Makefile.in config.h.in configure configure.ac include/ctype.h include/locale.h
- To: commits@xxxxxxxxxx
- Subject: [commits] r15409 - in /trunk/localedef: ChangeLog.eglibc Makefile.in config.h.in configure configure.ac include/ctype.h include/locale.h
- From: joseph@xxxxxxxxxx
- Date: Wed, 21 Sep 2011 16:35:22 -0000
Author: joseph
Date: Wed Sep 21 09:35:21 2011
New Revision: 15409
Log:
* configure.ac: Test for locale_t.
* Makefile.in (DEFINES): Add -DNOT_IN_libc.
(INCLUDES): Move -I$(srcdir)/include before -Iglibc/locale.
* include/locale.h: New.
* include/ctype.h (__isalnum_l, __isalpha_l, __isdigit_l)
(__tolower_l): Define.
* configure, config.h.in: Regenerate.
Added:
trunk/localedef/include/locale.h
Modified:
trunk/localedef/ChangeLog.eglibc
trunk/localedef/Makefile.in
trunk/localedef/config.h.in
trunk/localedef/configure
trunk/localedef/configure.ac
trunk/localedef/include/ctype.h
Modified: trunk/localedef/ChangeLog.eglibc
==============================================================================
--- trunk/localedef/ChangeLog.eglibc (original)
+++ trunk/localedef/ChangeLog.eglibc Wed Sep 21 09:35:21 2011
@@ -1,3 +1,13 @@
+2011-09-21 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * configure.ac: Test for locale_t.
+ * Makefile.in (DEFINES): Add -DNOT_IN_libc.
+ (INCLUDES): Move -I$(srcdir)/include before -Iglibc/locale.
+ * include/locale.h: New.
+ * include/ctype.h (__isalnum_l, __isalpha_l, __isdigit_l)
+ (__tolower_l): Define.
+ * configure, config.h.in: Regenerate.
+
2010-06-29 Maxim Kuvyrkov <maxim@xxxxxxxxxxxxxxxx>
* include/sys/cdefs.h (__REDIRECT_NTH): Define if not present in host
Modified: trunk/localedef/Makefile.in
==============================================================================
--- trunk/localedef/Makefile.in (original)
+++ trunk/localedef/Makefile.in Wed Sep 21 09:35:21 2011
@@ -25,10 +25,11 @@
-DLOCALE_ALIAS_PATH='"$(msgcatdir)"' \
-DCHARMAP_PATH='"$(i18ndir)/charmaps"' \
-DREPERTOIREMAP_PATH='"$(i18ndir)/repertoiremaps"' \
- -DLOCSRCDIR='"$(i18ndir)/locales"'
+ -DLOCSRCDIR='"$(i18ndir)/locales"' \
+ -DNOT_IN_libc
INCLUDES = -Iglibc/locale/programs \
+ -I$(srcdir)/include \
-Iglibc/locale \
- -I$(srcdir)/include \
-I$(srcdir) \
-I$(objdir) \
-include $(srcdir)/include/always.h
Modified: trunk/localedef/config.h.in
==============================================================================
--- trunk/localedef/config.h.in (original)
+++ trunk/localedef/config.h.in Wed Sep 21 09:35:21 2011
@@ -56,6 +56,9 @@
/* Define to 1 if you have the `posix4' library (-lposix4). */
#undef HAVE_LIBPOSIX4
+
+/* Define if you have the locale_t type */
+#undef HAVE_LOCALE_T
/* Define if you have the lseek64() function */
#undef HAVE_LSEEK64
Modified: trunk/localedef/configure
==============================================================================
--- trunk/localedef/configure (original)
+++ trunk/localedef/configure Wed Sep 21 09:35:21 2011
@@ -4339,6 +4339,110 @@
fi
+{ $as_echo "$as_me:$LINENO: checking for locale_t" >&5
+$as_echo_n "checking for locale_t... " >&6; }
+if test "${ac_cv_type_locale_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_locale_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <locale.h>
+
+int
+main ()
+{
+if (sizeof (locale_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <locale.h>
+
+int
+main ()
+{
+if (sizeof ((locale_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_locale_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_locale_t" >&5
+$as_echo "$ac_cv_type_locale_t" >&6; }
+if test "x$ac_cv_type_locale_t" = x""yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LOCALE_T 1
+_ACEOF
+
+fi
+
{ $as_echo "$as_me:$LINENO: checking for __compar_fn_t" >&5
$as_echo_n "checking for __compar_fn_t... " >&6; }
if test "${ac_cv_type___compar_fn_t+set}" = set; then
Modified: trunk/localedef/configure.ac
==============================================================================
--- trunk/localedef/configure.ac (original)
+++ trunk/localedef/configure.ac Wed Sep 21 09:35:21 2011
@@ -34,6 +34,7 @@
LOCAL_CHECK_TYPE([off64_t])
LOCAL_CHECK_TYPE([blksize_t])
LOCAL_CHECK_TYPE([int_fast32_t])
+LOCAL_CHECK_TYPE([locale_t], [#include <locale.h>])
LOCAL_CHECK_TYPE([__compar_fn_t], [#include <stdlib.h>])
LOCAL_CHECK_TYPE([comparison_fn_t], [#include <stdlib.h>])
LOCAL_CHECK_FUNC([readdir64], [#include <dirent.h>])
Modified: trunk/localedef/include/ctype.h
==============================================================================
--- trunk/localedef/include/ctype.h (original)
+++ trunk/localedef/include/ctype.h Wed Sep 21 09:35:21 2011
@@ -19,3 +19,10 @@
# define _ISbit(bit) ((bit) < 8 ? ((1 << (bit)) << 8) : ((1 << (bit)) >> 8))
# endif
#endif
+
+#ifndef HAVE_LOCALE_T
+#define __isalnum_l(c, l) isalnum (c)
+#define __isalpha_l(c, l) isalpha (c)
+#define __isdigit_l(c, l) isdigit (c)
+#define __tolower_l(c, l) tolower (c)
+#endif
Added: trunk/localedef/include/locale.h
==============================================================================
--- trunk/localedef/include/locale.h (added)
+++ trunk/localedef/include/locale.h Wed Sep 21 09:35:21 2011
@@ -1,0 +1,9 @@
+#include_next <locale.h>
+
+#ifndef HAVE_LOCALE_T
+#ifndef DUMMY_LOCALE_T
+#define DUMMY_LOCALE_T 1
+typedef int locale_t;
+#define newlocale(a, b, c) 0
+#endif
+#endif