diff options
author | Owen Taylor <owt1@cornell.edu> | 1998-02-10 18:18:19 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1998-02-10 18:18:19 +0000 |
commit | 13179d42a0d2449e53c19351ca18168f333509a7 (patch) | |
tree | 7a89f103e881bfc13426b6787d7d3a07f3c01e0d | |
parent | 6898536a026027839cf1f6662f30f793dbe4e8d3 (diff) | |
download | gtk+-13179d42a0d2449e53c19351ca18168f333509a7.tar.gz |
Add check to see if the C library's iswalnum can actually be used. (Not
Tue Feb 10 13:04:36 1998 Owen Taylor <owt1@cornell.edu>
* configure.in: Add check to see if the C library's
iswalnum can actually be used. (Not true for
Linux libc-5.4.38)
-rw-r--r-- | gdk/gdki18n.h | 2 | ||||
-rw-r--r-- | glib/ChangeLog | 6 | ||||
-rw-r--r-- | glib/acconfig.h | 7 | ||||
-rw-r--r-- | glib/configure.in | 23 | ||||
-rw-r--r-- | glib/glibconfig.h.in | 4 |
5 files changed, 36 insertions, 6 deletions
diff --git a/gdk/gdki18n.h b/gdk/gdki18n.h index f1625a8f5b..11e4fc92d9 100644 --- a/gdk/gdki18n.h +++ b/gdk/gdki18n.h @@ -145,7 +145,7 @@ extern int _g_mbtowc (wchar_t *wstr, const char *str, size_t len); #endif /* X_LOCALE */ -#if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H)) && !defined(X_LOCALE) +#if !defined(HAVE_BROKEN_WCTYPE) && (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H)) && !defined(X_LOCALE) # ifdef HAVE_WCTYPE_H # include <wctype.h> # else diff --git a/glib/ChangeLog b/glib/ChangeLog index af3f713aaf..ab77a285c4 100644 --- a/glib/ChangeLog +++ b/glib/ChangeLog @@ -1,3 +1,9 @@ +Tue Feb 10 13:04:36 1998 Owen Taylor <owt1@cornell.edu> + + * configure.in: Add check to see if the C library's + iswalnum can actually be used. (Not true for + Linux libc-5.4.38) + Sat Feb 7 11:48:09 1998 Owen Taylor <owt1@cornell.edu> * gstring.c gutils.c: added some additional consts in diff --git a/glib/acconfig.h b/glib/acconfig.h index 90e8add005..8fb6672b92 100644 --- a/glib/acconfig.h +++ b/glib/acconfig.h @@ -32,6 +32,7 @@ /* Other stuff */ +#undef HAVE_BROKEN_WCTYPE #undef HAVE_DOPRNT #undef HAVE_FLOAT_H #undef HAVE_LIMITS_H @@ -42,6 +43,8 @@ #undef HAVE_VSNPRINTF #undef HAVE_VALUES_H #undef HAVE_VPRINTF +#undef HAVE_WCHAR_H +#undef HAVE_WCTYPE_H #undef NO_FD_SET #undef NO_SYS_ERRLIST @@ -53,10 +56,6 @@ #undef SIZEOF_INT #undef SIZEOF_VOID_P -#undef HAVE_WCHAR_H -#undef HAVE_WCSTR_H -#undef HAVE_WCTYPE_H - /* #undef PACKAGE */ /* #undef VERSION */ diff --git a/glib/configure.in b/glib/configure.in index 9df1d3922b..6c98e9fca6 100644 --- a/glib/configure.in +++ b/glib/configure.in @@ -134,4 +134,27 @@ if test $gtk_ok = yes; then fi AC_MSG_RESULT($gtk_ok) +# The following is necessary for Linux libc-5.4.38 + +AC_MSG_CHECKING(If iswalnum() and friends are properly defined) +AC_TRY_LINK([#include <stdlib.h>],[ +#if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H)) +# ifdef HAVE_WCTYPE_H +# include <wctype.h> +# else +# ifdef HAVE_WCHAR_H +# include <wchar.h> +# endif +# endif +#else +# define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c)) +#endif +iswalnum((wchar_t) 0); +], gtk_ok=yes, gtk_ok=no) + +if test $gtk_ok = no; then + AC_DEFINE(HAVE_BROKEN_WCTYPE) +fi +AC_MSG_RESULT($gtk_ok) + AC_OUTPUT(Makefile) diff --git a/glib/glibconfig.h.in b/glib/glibconfig.h.in index 3cf668fb3b..31fc81ca17 100644 --- a/glib/glibconfig.h.in +++ b/glib/glibconfig.h.in @@ -32,9 +32,11 @@ #undef NO_SYS_SIGLIST #undef HAVE_WCHAR_H -#undef HAVE_WCSTR_H #undef HAVE_WCTYPE_H +/* Define if iswalnum(), etc. should not be used */ +#undef HAVE_BROKEN_WCTYPE + /* #undef PACKAGE */ /* #undef VERSION */ |