From 4b4c6aff9147aa2ef8c748bf14035e560264fa64 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Wed, 3 Dec 1997 21:43:44 +0000 Subject: [PATCH] Various configuration and portability related changes. See ChangeLog for details. -owt --- ChangeLog | 28 ++++++++++++++++++++++--- ChangeLog.pre-2-0 | 28 ++++++++++++++++++++++--- ChangeLog.pre-2-10 | 28 ++++++++++++++++++++++--- ChangeLog.pre-2-2 | 28 ++++++++++++++++++++++--- ChangeLog.pre-2-4 | 28 ++++++++++++++++++++++--- ChangeLog.pre-2-6 | 28 ++++++++++++++++++++++--- ChangeLog.pre-2-8 | 28 ++++++++++++++++++++++--- configure.in | 48 ++++++++++++++++++++++++++++--------------- gdk/Makefile.am | 2 ++ gdk/gdk.c | 10 +++++---- gdk/gdk.h | 1 - gdk/gdki18n.h | 28 +++++++++++++++++++++---- gdk/gdktypes.h | 8 ++------ gdk/x11/gdkmain-x11.c | 10 +++++---- glib/configure.in | 35 +++++++++++++++++++++++++------ glib/glibconfig.h.in | 10 +++++++++ gtk/gtkentry.c | 1 + 17 files changed, 286 insertions(+), 63 deletions(-) diff --git a/ChangeLog b/ChangeLog index dcbc48a8c3..2548d34035 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,20 +1,42 @@ +Wed Dec 3 1997 Owen Taylor + * gdk/Makefile.am: add a dependence for $(DEP_FILES) on + $(BUILT_SOURCES) to work around automake problem + +Wed Dec 3 1997 Owen Taylor + * configure.in glib/configure.in glib/glibconfig.h.in gdk/gdk.h + gdk/gdk18n.h gdk.c gtk/gtkentry.c: Try to handle variations in + headers gracefully. Do not automatically include + gdk/gdki18n.h. + Wed Dec 3 1997 Jay Painter * gtk/gtkoptionmenu.c: fixed a old bug where if you set a new menu for a optionmenu the widget would not get positioned correctly inside of the optionmenu. -Tue Dec 1 1997 Owen Taylor +Tue Dec 2 1997 Owen Taylor + * gdk/gdkpixmap.c: Include unistd.h to get SEEK_END + for SunOS (john_johns@credence.com) + +Tue Dec 2 1997 Owen Taylor + * gtk+/fnmatch.c: Define _GNU_SOURCE before including + fnmatch.h to make sure all constants are defined. + (Yasuhiro SHIRASAKI ) + +Tue Dec 2 1997 Owen Taylor + * configure.in, glib/configure.in: Make the logic to add -Wall, + -ansi, -pedantic for GCC operational. + +Tue Dec 2 1997 Owen Taylor * glib/glib.h, glib/configure.in. Disabled gldouble, since it wasn't used anywhere and caused portability problems -Tue Dec 1 1997 Owen Taylor +Tue Dec 2 1997 Owen Taylor * glib/glib.h, glib/configure.in, glib/glibconfig.h.in: Added a g_memmove function which is simply memmove if it exists, otherwise bcopy.(Should really check if bcopy has the correct semantics, and create our own memmove is necessary) * glib/gstring.c, glib/garray.c, gtk/gtktext.c: memmove => g_memmove - Sun Nov 30 1997 Jay Painter * gtk/gtknotebook.c: fixed a old bug where all the notebook pages diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index dcbc48a8c3..2548d34035 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,20 +1,42 @@ +Wed Dec 3 1997 Owen Taylor + * gdk/Makefile.am: add a dependence for $(DEP_FILES) on + $(BUILT_SOURCES) to work around automake problem + +Wed Dec 3 1997 Owen Taylor + * configure.in glib/configure.in glib/glibconfig.h.in gdk/gdk.h + gdk/gdk18n.h gdk.c gtk/gtkentry.c: Try to handle variations in + headers gracefully. Do not automatically include + gdk/gdki18n.h. + Wed Dec 3 1997 Jay Painter * gtk/gtkoptionmenu.c: fixed a old bug where if you set a new menu for a optionmenu the widget would not get positioned correctly inside of the optionmenu. -Tue Dec 1 1997 Owen Taylor +Tue Dec 2 1997 Owen Taylor + * gdk/gdkpixmap.c: Include unistd.h to get SEEK_END + for SunOS (john_johns@credence.com) + +Tue Dec 2 1997 Owen Taylor + * gtk+/fnmatch.c: Define _GNU_SOURCE before including + fnmatch.h to make sure all constants are defined. + (Yasuhiro SHIRASAKI ) + +Tue Dec 2 1997 Owen Taylor + * configure.in, glib/configure.in: Make the logic to add -Wall, + -ansi, -pedantic for GCC operational. + +Tue Dec 2 1997 Owen Taylor * glib/glib.h, glib/configure.in. Disabled gldouble, since it wasn't used anywhere and caused portability problems -Tue Dec 1 1997 Owen Taylor +Tue Dec 2 1997 Owen Taylor * glib/glib.h, glib/configure.in, glib/glibconfig.h.in: Added a g_memmove function which is simply memmove if it exists, otherwise bcopy.(Should really check if bcopy has the correct semantics, and create our own memmove is necessary) * glib/gstring.c, glib/garray.c, gtk/gtktext.c: memmove => g_memmove - Sun Nov 30 1997 Jay Painter * gtk/gtknotebook.c: fixed a old bug where all the notebook pages diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index dcbc48a8c3..2548d34035 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,20 +1,42 @@ +Wed Dec 3 1997 Owen Taylor + * gdk/Makefile.am: add a dependence for $(DEP_FILES) on + $(BUILT_SOURCES) to work around automake problem + +Wed Dec 3 1997 Owen Taylor + * configure.in glib/configure.in glib/glibconfig.h.in gdk/gdk.h + gdk/gdk18n.h gdk.c gtk/gtkentry.c: Try to handle variations in + headers gracefully. Do not automatically include + gdk/gdki18n.h. + Wed Dec 3 1997 Jay Painter * gtk/gtkoptionmenu.c: fixed a old bug where if you set a new menu for a optionmenu the widget would not get positioned correctly inside of the optionmenu. -Tue Dec 1 1997 Owen Taylor +Tue Dec 2 1997 Owen Taylor + * gdk/gdkpixmap.c: Include unistd.h to get SEEK_END + for SunOS (john_johns@credence.com) + +Tue Dec 2 1997 Owen Taylor + * gtk+/fnmatch.c: Define _GNU_SOURCE before including + fnmatch.h to make sure all constants are defined. + (Yasuhiro SHIRASAKI ) + +Tue Dec 2 1997 Owen Taylor + * configure.in, glib/configure.in: Make the logic to add -Wall, + -ansi, -pedantic for GCC operational. + +Tue Dec 2 1997 Owen Taylor * glib/glib.h, glib/configure.in. Disabled gldouble, since it wasn't used anywhere and caused portability problems -Tue Dec 1 1997 Owen Taylor +Tue Dec 2 1997 Owen Taylor * glib/glib.h, glib/configure.in, glib/glibconfig.h.in: Added a g_memmove function which is simply memmove if it exists, otherwise bcopy.(Should really check if bcopy has the correct semantics, and create our own memmove is necessary) * glib/gstring.c, glib/garray.c, gtk/gtktext.c: memmove => g_memmove - Sun Nov 30 1997 Jay Painter * gtk/gtknotebook.c: fixed a old bug where all the notebook pages diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index dcbc48a8c3..2548d34035 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,20 +1,42 @@ +Wed Dec 3 1997 Owen Taylor + * gdk/Makefile.am: add a dependence for $(DEP_FILES) on + $(BUILT_SOURCES) to work around automake problem + +Wed Dec 3 1997 Owen Taylor + * configure.in glib/configure.in glib/glibconfig.h.in gdk/gdk.h + gdk/gdk18n.h gdk.c gtk/gtkentry.c: Try to handle variations in + headers gracefully. Do not automatically include + gdk/gdki18n.h. + Wed Dec 3 1997 Jay Painter * gtk/gtkoptionmenu.c: fixed a old bug where if you set a new menu for a optionmenu the widget would not get positioned correctly inside of the optionmenu. -Tue Dec 1 1997 Owen Taylor +Tue Dec 2 1997 Owen Taylor + * gdk/gdkpixmap.c: Include unistd.h to get SEEK_END + for SunOS (john_johns@credence.com) + +Tue Dec 2 1997 Owen Taylor + * gtk+/fnmatch.c: Define _GNU_SOURCE before including + fnmatch.h to make sure all constants are defined. + (Yasuhiro SHIRASAKI ) + +Tue Dec 2 1997 Owen Taylor + * configure.in, glib/configure.in: Make the logic to add -Wall, + -ansi, -pedantic for GCC operational. + +Tue Dec 2 1997 Owen Taylor * glib/glib.h, glib/configure.in. Disabled gldouble, since it wasn't used anywhere and caused portability problems -Tue Dec 1 1997 Owen Taylor +Tue Dec 2 1997 Owen Taylor * glib/glib.h, glib/configure.in, glib/glibconfig.h.in: Added a g_memmove function which is simply memmove if it exists, otherwise bcopy.(Should really check if bcopy has the correct semantics, and create our own memmove is necessary) * glib/gstring.c, glib/garray.c, gtk/gtktext.c: memmove => g_memmove - Sun Nov 30 1997 Jay Painter * gtk/gtknotebook.c: fixed a old bug where all the notebook pages diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index dcbc48a8c3..2548d34035 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,20 +1,42 @@ +Wed Dec 3 1997 Owen Taylor + * gdk/Makefile.am: add a dependence for $(DEP_FILES) on + $(BUILT_SOURCES) to work around automake problem + +Wed Dec 3 1997 Owen Taylor + * configure.in glib/configure.in glib/glibconfig.h.in gdk/gdk.h + gdk/gdk18n.h gdk.c gtk/gtkentry.c: Try to handle variations in + headers gracefully. Do not automatically include + gdk/gdki18n.h. + Wed Dec 3 1997 Jay Painter * gtk/gtkoptionmenu.c: fixed a old bug where if you set a new menu for a optionmenu the widget would not get positioned correctly inside of the optionmenu. -Tue Dec 1 1997 Owen Taylor +Tue Dec 2 1997 Owen Taylor + * gdk/gdkpixmap.c: Include unistd.h to get SEEK_END + for SunOS (john_johns@credence.com) + +Tue Dec 2 1997 Owen Taylor + * gtk+/fnmatch.c: Define _GNU_SOURCE before including + fnmatch.h to make sure all constants are defined. + (Yasuhiro SHIRASAKI ) + +Tue Dec 2 1997 Owen Taylor + * configure.in, glib/configure.in: Make the logic to add -Wall, + -ansi, -pedantic for GCC operational. + +Tue Dec 2 1997 Owen Taylor * glib/glib.h, glib/configure.in. Disabled gldouble, since it wasn't used anywhere and caused portability problems -Tue Dec 1 1997 Owen Taylor +Tue Dec 2 1997 Owen Taylor * glib/glib.h, glib/configure.in, glib/glibconfig.h.in: Added a g_memmove function which is simply memmove if it exists, otherwise bcopy.(Should really check if bcopy has the correct semantics, and create our own memmove is necessary) * glib/gstring.c, glib/garray.c, gtk/gtktext.c: memmove => g_memmove - Sun Nov 30 1997 Jay Painter * gtk/gtknotebook.c: fixed a old bug where all the notebook pages diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index dcbc48a8c3..2548d34035 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,20 +1,42 @@ +Wed Dec 3 1997 Owen Taylor + * gdk/Makefile.am: add a dependence for $(DEP_FILES) on + $(BUILT_SOURCES) to work around automake problem + +Wed Dec 3 1997 Owen Taylor + * configure.in glib/configure.in glib/glibconfig.h.in gdk/gdk.h + gdk/gdk18n.h gdk.c gtk/gtkentry.c: Try to handle variations in + headers gracefully. Do not automatically include + gdk/gdki18n.h. + Wed Dec 3 1997 Jay Painter * gtk/gtkoptionmenu.c: fixed a old bug where if you set a new menu for a optionmenu the widget would not get positioned correctly inside of the optionmenu. -Tue Dec 1 1997 Owen Taylor +Tue Dec 2 1997 Owen Taylor + * gdk/gdkpixmap.c: Include unistd.h to get SEEK_END + for SunOS (john_johns@credence.com) + +Tue Dec 2 1997 Owen Taylor + * gtk+/fnmatch.c: Define _GNU_SOURCE before including + fnmatch.h to make sure all constants are defined. + (Yasuhiro SHIRASAKI ) + +Tue Dec 2 1997 Owen Taylor + * configure.in, glib/configure.in: Make the logic to add -Wall, + -ansi, -pedantic for GCC operational. + +Tue Dec 2 1997 Owen Taylor * glib/glib.h, glib/configure.in. Disabled gldouble, since it wasn't used anywhere and caused portability problems -Tue Dec 1 1997 Owen Taylor +Tue Dec 2 1997 Owen Taylor * glib/glib.h, glib/configure.in, glib/glibconfig.h.in: Added a g_memmove function which is simply memmove if it exists, otherwise bcopy.(Should really check if bcopy has the correct semantics, and create our own memmove is necessary) * glib/gstring.c, glib/garray.c, gtk/gtktext.c: memmove => g_memmove - Sun Nov 30 1997 Jay Painter * gtk/gtknotebook.c: fixed a old bug where all the notebook pages diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index dcbc48a8c3..2548d34035 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,20 +1,42 @@ +Wed Dec 3 1997 Owen Taylor + * gdk/Makefile.am: add a dependence for $(DEP_FILES) on + $(BUILT_SOURCES) to work around automake problem + +Wed Dec 3 1997 Owen Taylor + * configure.in glib/configure.in glib/glibconfig.h.in gdk/gdk.h + gdk/gdk18n.h gdk.c gtk/gtkentry.c: Try to handle variations in + headers gracefully. Do not automatically include + gdk/gdki18n.h. + Wed Dec 3 1997 Jay Painter * gtk/gtkoptionmenu.c: fixed a old bug where if you set a new menu for a optionmenu the widget would not get positioned correctly inside of the optionmenu. -Tue Dec 1 1997 Owen Taylor +Tue Dec 2 1997 Owen Taylor + * gdk/gdkpixmap.c: Include unistd.h to get SEEK_END + for SunOS (john_johns@credence.com) + +Tue Dec 2 1997 Owen Taylor + * gtk+/fnmatch.c: Define _GNU_SOURCE before including + fnmatch.h to make sure all constants are defined. + (Yasuhiro SHIRASAKI ) + +Tue Dec 2 1997 Owen Taylor + * configure.in, glib/configure.in: Make the logic to add -Wall, + -ansi, -pedantic for GCC operational. + +Tue Dec 2 1997 Owen Taylor * glib/glib.h, glib/configure.in. Disabled gldouble, since it wasn't used anywhere and caused portability problems -Tue Dec 1 1997 Owen Taylor +Tue Dec 2 1997 Owen Taylor * glib/glib.h, glib/configure.in, glib/glibconfig.h.in: Added a g_memmove function which is simply memmove if it exists, otherwise bcopy.(Should really check if bcopy has the correct semantics, and create our own memmove is necessary) * glib/gstring.c, glib/garray.c, gtk/gtktext.c: memmove => g_memmove - Sun Nov 30 1997 Jay Painter * gtk/gtknotebook.c: fixed a old bug where all the notebook pages diff --git a/configure.in b/configure.in index 63a82b4a1a..6221c494cd 100644 --- a/configure.in +++ b/configure.in @@ -48,19 +48,16 @@ AC_PROG_INSTALL AC_PROG_MAKE_SET if eval "test x$GCC = xyes"; then - test `echo "$CFLAGS" | grep "\-Wall" > /dev/null 2> /dev/null` - if test ! $?; then + if test ! `echo "$CFLAGS" | grep "\-Wall" 2> /dev/null` ; then CFLAGS="$CFLAGS -Wall" fi if eval "test x$enable_ansi = xyes"; then - test `echo "$CFLAGS" | grep "\-ansi" > /dev/null 2> /dev/null` - if test ! $?; then + if test ! `echo "$CFLAGS" | grep "\-ansi" 2> /dev/null` ; then CFLAGS="$CFLAGS -ansi" fi - test `echo "$CFLAGS" | grep "\-pedantic" > /dev/null 2> /dev/null` - if test ! $?; then + if test ! `echo "$CFLAGS" | grep "\-pedantic" 2> /dev/null` ; then CFLAGS="$CFLAGS -pedantic" fi fi @@ -193,21 +190,38 @@ gtk_cv_display_resource_base="private3")]) AC_MSG_RESULT($gtk_cv_display_resource_base) AC_DEFINE_UNQUOTED(RESOURCE_BASE, gdk_display->$gtk_cv_display_resource_base) +# Look for wide string functions in wchar.h or wcstr.h + +AC_MSG_CHECKING(for or ) +AC_TRY_CPP([#include ], gtk_ok=yes, gtk_ok=no) +if test $gtk_ok = no; then + AC_TRY_CPP([#include ], gtk_ok=yes, gtk_ok=no) + if test $gtk_ok = no; then + gtk_cv_x_locale=yes + fi +fi + +AC_MSG_RESULT($gtk_ok) + # Check if X_LOCALE definition is necessary AC_MSG_CHECKING(need -DX_LOCALE) -AC_TRY_RUN([ -#include -#include +if test x$gtk_cv_x_locale = xyes; then + AC_MSG_RESULT([yes (C library doesn't include wide string functions)]) +else + AC_TRY_RUN([ + #include + #include -int -main () -{ - return setlocale (LC_ALL, "${with_locale}") == NULL; -}], -gtk_cv_x_locale=no, -gtk_cv_x_locale=yes) -AC_MSG_RESULT($gtk_cv_x_locale) + int + main () + { + return setlocale (LC_ALL, "${with_locale}") == NULL; + }], + gtk_cv_x_locale=no, + gtk_cv_x_locale=yes) + AC_MSG_RESULT($gtk_cv_x_locale) +fi if test $gtk_cv_x_locale = yes; then CFLAGS="$CFLAGS -DX_LOCALE" fi diff --git a/gdk/Makefile.am b/gdk/Makefile.am index ffaef5ffad..9a5764f357 100644 --- a/gdk/Makefile.am +++ b/gdk/Makefile.am @@ -74,3 +74,5 @@ files: @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \ echo $$p; \ done + +$(DEP_FILES) : $(BUILT_SOURCES) diff --git a/gdk/gdk.c b/gdk/gdk.c index f787e59cdf..4a8e8fffac 100644 --- a/gdk/gdk.c +++ b/gdk/gdk.c @@ -49,7 +49,7 @@ #include "gdkx.h" #include "gdkkeysyms.h" #endif - +#include "gdki18n.h" #ifndef X_GETTIMEOFDAY #define X_GETTIMEOFDAY(tv) gettimeofday (tv, NULL) @@ -1754,8 +1754,10 @@ gdk_event_translate (GdkEvent *event, { if(gdk_dnd.drag_really) { - GdkPoint foo = {xevent->xbutton.x_root, - xevent->xbutton.y_root}; + GdkPoint foo; + foo.x = xevent->xbutton.x_root; + foo.y = xevent->xbutton.y_root; + XUngrabPointer(gdk_display, CurrentTime); if(dnd_drag_target != None) @@ -2522,7 +2524,7 @@ gdk_event_translate (GdkEvent *event, { event->other.type = GDK_OTHER_EVENT; event->other.window = window; - event->other.xevent = &other_xevent[other_xevent_i]; + event->other.xevent = (GdkXEvent *)&other_xevent[other_xevent_i]; memcpy (&other_xevent[other_xevent_i], xevent, sizeof (XEvent)); other_xevent_i = (other_xevent_i+1) % OTHER_XEVENT_BUFSIZE; return_val = TRUE; diff --git a/gdk/gdk.h b/gdk/gdk.h index e237ad50e5..cb15f5ecf6 100644 --- a/gdk/gdk.h +++ b/gdk/gdk.h @@ -20,7 +20,6 @@ #include -#include #ifdef __cplusplus diff --git a/gdk/gdki18n.h b/gdk/gdki18n.h index 776a7e4be6..d166833141 100644 --- a/gdk/gdki18n.h +++ b/gdk/gdki18n.h @@ -19,13 +19,32 @@ #ifndef __GDK_I18N_H__ #define __GDK_I18N_H__ +/* GDK uses "glib". (And so does GTK). + */ +#include + /* international string support */ #include + +#ifdef HAVE_WCTYPE_H +#include +#else +#define iswalnum isalnum +/* Other functions could be added here if necessary */ +#endif /* HAVE_WCTYPE_H */ + +#ifndef X_LOCALE + +#ifdef HAVE_WCHAR_H #include +#else /* !HAVE_WCHAR_H */ +#ifdef HAVE_WCSTR_H +#include +#endif /* HAVE_WCSTR_H*/ +#endif /* HAVE_WCHAR_H */ -#ifdef X_LOCALE - +#else /* X_LOCALE */ #include #include @@ -38,6 +57,7 @@ extern int _Xmblen ( #if NeedFunctionPrototypes const char *s, size_t n #endif + ); _XFUNCPROTOEND @@ -133,7 +153,7 @@ extern int _g_mbtowc (wchar_t *wstr, const char *str, size_t len); #define wcstombs(a,b,c) _Xwcstombs ((a),(b),(c)) #define wcslen(a) _Xwcslen ((a)) #define wcscpy(a,b) _Xwcscpy ((a),(b)) -#define wcsncpy(a,b,c) _Xwcsnpy ((a),(b),(c)) +#define wcsncpy(a,b,c) _Xwcsncpy ((a),(b),(c)) #ifdef __cplusplus } @@ -141,4 +161,4 @@ extern int _g_mbtowc (wchar_t *wstr, const char *str, size_t len); #endif /* X_LOCALE */ -#endif __GDK_I18N_H__ +#endif /* __GDK_I18N_H__ */ diff --git a/gdk/gdktypes.h b/gdk/gdktypes.h index 6c0eb1e4e6..024f1b3c48 100644 --- a/gdk/gdktypes.h +++ b/gdk/gdktypes.h @@ -19,8 +19,6 @@ #define __GDK_TYPES_H__ -#include - /* GDK uses "glib". (And so does GTK). */ #include @@ -960,15 +958,13 @@ struct _GdkEventClient } data; }; -#ifndef _XLIB_H_ -#define XEvent void -#endif +typedef void GdkXEvent; /* Can be cast to XEvent */ struct _GdkEventOther { GdkEventType type; GdkWindow *window; - XEvent *xevent; + GdkXEvent *xevent; }; union _GdkEvent diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c index f787e59cdf..4a8e8fffac 100644 --- a/gdk/x11/gdkmain-x11.c +++ b/gdk/x11/gdkmain-x11.c @@ -49,7 +49,7 @@ #include "gdkx.h" #include "gdkkeysyms.h" #endif - +#include "gdki18n.h" #ifndef X_GETTIMEOFDAY #define X_GETTIMEOFDAY(tv) gettimeofday (tv, NULL) @@ -1754,8 +1754,10 @@ gdk_event_translate (GdkEvent *event, { if(gdk_dnd.drag_really) { - GdkPoint foo = {xevent->xbutton.x_root, - xevent->xbutton.y_root}; + GdkPoint foo; + foo.x = xevent->xbutton.x_root; + foo.y = xevent->xbutton.y_root; + XUngrabPointer(gdk_display, CurrentTime); if(dnd_drag_target != None) @@ -2522,7 +2524,7 @@ gdk_event_translate (GdkEvent *event, { event->other.type = GDK_OTHER_EVENT; event->other.window = window; - event->other.xevent = &other_xevent[other_xevent_i]; + event->other.xevent = (GdkXEvent *)&other_xevent[other_xevent_i]; memcpy (&other_xevent[other_xevent_i], xevent, sizeof (XEvent)); other_xevent_i = (other_xevent_i+1) % OTHER_XEVENT_BUFSIZE; return_val = TRUE; diff --git a/glib/configure.in b/glib/configure.in index 4820da6282..0580e9dfc8 100644 --- a/glib/configure.in +++ b/glib/configure.in @@ -33,19 +33,16 @@ AM_PROG_CC_STDC AC_PROG_INSTALL if eval "test x$GCC = xyes"; then - test `echo "$CFLAGS" | grep "\-Wall" > /dev/null 2> /dev/null` - if test ! $?; then + if test ! `echo "$CFLAGS" | grep "\-Wall" 2> /dev/null` ; then CFLAGS="$CFLAGS -Wall" fi if eval "test x$enable_ansi = xyes"; then - test `echo "$CFLAGS" | grep "\-ansi" > /dev/null 2> /dev/null` - if test ! $?; then + if test ! `echo "$CFLAGS" | grep "\-ansi" 2> /dev/null` ; then CFLAGS="$CFLAGS -ansi" fi - test `echo "$CFLAGS" | grep "\-pedantic" > /dev/null 2> /dev/null` - if test ! $?; then + if test ! `echo "$CFLAGS" | grep "\-pedantic" 2> /dev/null` ; then CFLAGS="$CFLAGS -pedantic" fi fi @@ -114,4 +111,30 @@ if test $gtk_ok = no; then AC_DEFINE(NO_FD_SET) fi +# This stuff is here, only so that we can define these +# things in glibconfig.h. If ../config.h was installed +# (under some other name?) then the definitions would +# belong there. (They are only used in GDK) + +# Look for wide string functions in wchar.h or wcstr.h + +AC_MSG_CHECKING(for or ) +AC_TRY_CPP([#include ], gtk_ok=yes, gtk_ok=no) +if test $gtk_ok = yes; then + AC_DEFINE(HAVE_WCHAR_H) +else + AC_TRY_CPP([#include ], gtk_ok=yes, gtk_ok=no) + if test $gtk_ok = yes; then + AC_DEFINE(HAVE_WCSTR_H) + fi +fi + +# Check for wctype.h (for iswalnum) +AC_MSG_CHECKING(for ) +AC_TRY_CPP([#include ], gtk_ok=yes, gtk_ok=no) +if test $gtk_ok = yes; then + AC_DEFINE(HAVE_WCTYPE_H) +fi +AC_MSG_RESULT($gtk_ok) + AC_OUTPUT(Makefile) diff --git a/glib/glibconfig.h.in b/glib/glibconfig.h.in index 43c7d66072..288eab91fb 100644 --- a/glib/glibconfig.h.in +++ b/glib/glibconfig.h.in @@ -67,3 +67,13 @@ /* Define if you have the header file. */ #undef HAVE_VALUES_H + +/* Define if you have the header file */ +#undef HAVE_WCHAR_H + +/* Define if you have the header file */ +#undef HAVE_WCSTR_H + +/* Define if you have the header file */ +#undef HAVE_WCTYPE_H + diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index ab5b0d2056..f2699081fe 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -21,6 +21,7 @@ #include "gdk/gdkx.h" #endif #include "gdk/gdkkeysyms.h" +#include "gdk/gdki18n.h" #include "gtkentry.h" #include "gtkmain.h" #include "gtkselection.h"