Commit 2a2d769d authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

Make PLT-reduction work with gcc4, and don't include everything in

2005-03-15  Matthias Clasen  <mclasen@redhat.com>

	Make PLT-reduction work with gcc4, and don't include
	everything in gdkalias.h:

	* gdk/gdk.symbols: Group symbols by header and source file.
	* gdk/makegdkalias.pl: Protect definitions by the same
	preprocessor symbols used to guard the headers. Move
	the alias declarations to a separate file which is
	produced when calling makegdkalias.pl -def
	* gdk/Makefile.am (gdkaliasdef.c): Add a rule to generate this
	file.
	* gdk/*.c, gdk/x11/*.c: Include gdkalias.h after the other
	headers, include gdkaliasdef.c at the bottom.
parent 34bfd712
2005-03-15 Matthias Clasen <mclasen@redhat.com>
Make PLT-reduction work with gcc4, and don't include
everything in gdkalias.h:
* gdk/gdk.symbols: Group symbols by header and source file.
* gdk/makegdkalias.pl: Protect definitions by the same
preprocessor symbols used to guard the headers. Move
the alias declarations to a separate file which is
produced when calling makegdkalias.pl -def
* gdk/Makefile.am (gdkaliasdef.c): Add a rule to generate this
file.
* gdk/*.c, gdk/x11/*.c: Include gdkalias.h after the other
headers, include gdkaliasdef.c at the bottom.
2005-03-16 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkdisplay-win32.c (_win32_on_clipboard_change): Print
......
2005-03-15 Matthias Clasen <mclasen@redhat.com>
Make PLT-reduction work with gcc4, and don't include
everything in gdkalias.h:
* gdk/gdk.symbols: Group symbols by header and source file.
* gdk/makegdkalias.pl: Protect definitions by the same
preprocessor symbols used to guard the headers. Move
the alias declarations to a separate file which is
produced when calling makegdkalias.pl -def
* gdk/Makefile.am (gdkaliasdef.c): Add a rule to generate this
file.
* gdk/*.c, gdk/x11/*.c: Include gdkalias.h after the other
headers, include gdkaliasdef.c at the bottom.
2005-03-16 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkdisplay-win32.c (_win32_on_clipboard_change): Print
......
2005-03-15 Matthias Clasen <mclasen@redhat.com>
Make PLT-reduction work with gcc4, and don't include
everything in gdkalias.h:
* gdk/gdk.symbols: Group symbols by header and source file.
* gdk/makegdkalias.pl: Protect definitions by the same
preprocessor symbols used to guard the headers. Move
the alias declarations to a separate file which is
produced when calling makegdkalias.pl -def
* gdk/Makefile.am (gdkaliasdef.c): Add a rule to generate this
file.
* gdk/*.c, gdk/x11/*.c: Include gdkalias.h after the other
headers, include gdkaliasdef.c at the bottom.
2005-03-16 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkdisplay-win32.c (_win32_on_clipboard_change): Print
......
......@@ -177,11 +177,14 @@ uninstall-ms-lib:
endif
gdk.def: gdk.symbols
(echo -e EXPORTS; $(CPP) -P -DGDK_WINDOWING_WIN32 -DINCLUDE_VARIABLES - <$(srcdir)/gdk.symbols | sed -e '/^$$/d' -e 's/^/ /' -e 's/G_GNUC_[^ ]*//g') > gdk.def
(echo -e EXPORTS; $(CPP) -P -DALL_FILES -DGDK_WINDOWING_WIN32 -DINCLUDE_VARIABLES - <$(srcdir)/gdk.symbols | sed -e '/^$$/d' -e 's/^/ /' -e 's/G_GNUC_[^ ]*//g') > gdk.def
gdkalias.h: gdk.symbols
$(PERL) $(srcdir)/makegdkalias.pl < $(srcdir)/gdk.symbols > gdkalias.h
gdkaliasdef.c: gdk.symbols
$(PERL) $(srcdir)/makegdkalias.pl -def < $(srcdir)/gdk.symbols > gdkaliasdef.c
if OS_LINUX
TESTS = abicheck.sh
endif
......@@ -215,6 +218,7 @@ endif
#note: not gdkconfig.h
BUILT_SOURCES = \
gdkalias.h \
gdkaliasdef.c \
gdkenumtypes.h \
gdkenumtypes.c \
gdkmarshalers.h \
......@@ -235,8 +239,9 @@ stamp-gdkenumtypes.h: @REBUILD@ $(gdk_public_h_sources) Makefile
&& echo timestamp > $(@F)
gdkenumtypes.c: @REBUILD@ $(gdk_public_h_sources) Makefile
( cd $(srcdir) && glib-mkenums \
--fhead "#define GDK_ENABLE_BROKEN\n#include \"gdkalias.h\"\n#include \"gdk.h\"" \
--fprod "\n/* enumerations from \"@filename@\" */" \
--fhead "#define GDK_ENABLE_BROKEN\n#include \"gdk.h\"\n#include \"gdkalias.h\"\n" \
--fprod "\n/* enumerations from \"@filename@\" */" \
--ftail "\n#define __GDK_ENUM_TYPES_C__\n#include \"gdkaliasdef.c\"\n" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \
......
#! /bin/sh
cpp -P -DGDK_WINDOWING_X11 ${srcdir:-.}/gdk.symbols | sed -e '/^$/d' -e 's/ G_GNUC.*$//' | sort > expected-abi
cpp -P -DALL_FILES -DGDK_ENABLE_BROKEN -DGDK_WINDOWING_X11 ${srcdir:-.}/gdk.symbols | sed -e '/^$/d' -e 's/ G_GNUC.*$//' | sort > expected-abi
nm -D .libs/libgdk-x11-2.0.so | grep " T " | cut -d ' ' -f 3 | sort > actual-abi
diff -u expected-abi actual-abi && rm expected-abi actual-abi
......@@ -29,7 +29,6 @@
#include <string.h>
#include <stdlib.h>
#include "gdkalias.h"
#include "gdk.h"
#include "gdkinternals.h"
#include "gdkintl.h"
......@@ -37,6 +36,7 @@
#ifndef HAVE_XCONVERTCASE
#include "gdkkeysyms.h"
#endif
#include "gdkalias.h"
typedef struct _GdkPredicate GdkPredicate;
......@@ -455,3 +455,6 @@ gdk_set_program_class (const char *program_class)
gdk_progclass = g_strdup (program_class);
}
#define __GDK_C__
#include "gdkaliasdef.c"
This diff is collapsed.
......@@ -27,10 +27,10 @@
#include <config.h>
#include <time.h>
#include "gdkalias.h"
#include "gdkscreen.h"
#include "gdkcolor.h"
#include "gdkinternals.h"
#include "gdkalias.h"
/**
* gdk_colormap_ref:
......@@ -371,3 +371,5 @@ gdk_colormap_get_system (void)
return gdk_screen_get_system_colormap (gdk_screen_get_default ());
}
#define __GDK_COLOR_C__
#include "gdkaliasdef.c"
......@@ -25,10 +25,10 @@
*/
#include <config.h>
#include "gdkalias.h"
#include "gdkcursor.h"
#include "gdkdisplay.h"
#include "gdkinternals.h"
#include "gdkalias.h"
GType
gdk_cursor_get_type (void)
......@@ -98,3 +98,6 @@ gdk_cursor_new (GdkCursorType cursor_type)
{
return gdk_cursor_new_for_display (gdk_display_get_default(), cursor_type);
}
#define __GDK_CURSOR_C__
#include "gdkaliasdef.c"
......@@ -23,12 +23,12 @@
#include <config.h>
#include <glib.h>
#include "gdkalias.h"
#include "gdk.h" /* gdk_event_send_client_message() */
#include "gdkdisplay.h"
#include "gdkinternals.h"
#include "gdkmarshalers.h"
#include "gdkscreen.h"
#include "gdkalias.h"
enum {
CLOSED,
......@@ -647,4 +647,5 @@ gdk_set_pointer_hooks (const GdkPointerHooks *new_hooks)
return (GdkPointerHooks *)result;
}
#define __GDK_DISPLAY_C__
#include "gdkaliasdef.c"
......@@ -26,7 +26,7 @@
#include <config.h>
#include "gdkalias.h"
#include "gdkscreen.h"
#include "gdkdisplay.h"
#include "gdkdisplaymanager.h"
......@@ -35,6 +35,8 @@
#include "gdkintl.h"
#include "gdkalias.h"
struct _GdkDisplayManager
{
GObject parent_instance;
......@@ -277,3 +279,5 @@ gdk_display_manager_list_displays (GdkDisplayManager *display_manager)
return g_slist_copy (_gdk_displays);
}
#define __GDK_DISPLAY_MANAGER_C__
#include "gdkaliasdef.c"
......@@ -25,10 +25,10 @@
*/
#include <config.h>
#include "gdkalias.h"
#include <gdkdnd.h>
#include <gdkdrawable.h>
#include <gdkdisplay.h>
#include "gdkalias.h"
/**
* gdk_drag_find_window:
......@@ -77,6 +77,5 @@ gdk_drag_get_protocol (guint32 xid,
return gdk_drag_get_protocol_for_display (gdk_display_get_default (), xid, protocol);
}
#define __GDK_DND_C__
#include "gdkaliasdef.c"
......@@ -26,13 +26,13 @@
#include <config.h>
#include <math.h>
#include "gdkalias.h"
#include "gdkdrawable.h"
#include "gdkinternals.h"
#include "gdkwindow.h"
#include "gdkscreen.h"
#include "gdk-pixbuf-private.h"
#include "gdkpixbuf.h"
#include "gdkalias.h"
static GdkImage* gdk_drawable_real_get_image (GdkDrawable *drawable,
gint x,
......@@ -1965,3 +1965,6 @@ _gdk_drawable_get_scratch_gc (GdkDrawable *drawable,
return screen->normal_gcs[depth];
}
}
#define __GDK_DRAW_C__
#include "gdkaliasdef.c"
......@@ -27,9 +27,9 @@
#include <config.h>
#include <string.h> /* For memset() */
#include "gdkalias.h"
#include "gdk.h"
#include "gdkinternals.h"
#include "gdkalias.h"
typedef struct _GdkIOClosure GdkIOClosure;
......@@ -1221,3 +1221,6 @@ gdk_setting_get (const gchar *name,
{
return gdk_screen_get_setting (gdk_screen_get_default (), name, value);
}
#define __GDK_EVENTS_C__
#include "gdkaliasdef.c"
......@@ -27,10 +27,10 @@
#undef GDK_DISABLE_DEPRECATED
#include <config.h>
#include "gdkalias.h"
#include "gdkdisplay.h"
#include "gdkfont.h"
#include "gdkinternals.h"
#include "gdkalias.h"
GType
gdk_font_get_type (void)
......@@ -355,4 +355,5 @@ gdk_font_load (const gchar *font_name)
return gdk_font_load_for_display (gdk_display_get_default(), font_name);
}
#define __GDK_FONT_C__
#include "gdkaliasdef.c"
......@@ -27,10 +27,10 @@
#include <config.h>
#include <string.h>
#include "gdkalias.h"
#include "gdkgc.h"
#include "gdkrgb.h"
#include "gdkprivate.h"
#include "gdkalias.h"
static void gdk_gc_class_init (GObjectClass *class);
static void gdk_gc_finalize (GObject *object);
......@@ -723,3 +723,6 @@ gdk_gc_set_rgb_bg_color (GdkGC *gc,
gdk_rgb_find_color (cmap, &tmp_color);
gdk_gc_set_background (gc, &tmp_color);
}
#define __GDK_GC_C__
#include "gdkaliasdef.c"
......@@ -28,7 +28,6 @@
#include <stdio.h>
#include "gdkalias.h"
#include "gdktypes.h"
#include "gdkprivate.h"
......
......@@ -28,11 +28,11 @@
#include <stdlib.h>
#include <sys/types.h>
#include "gdkalias.h"
#include "gdk.h" /* For gdk_flush() */
#include "gdkimage.h"
#include "gdkprivate.h"
#include "gdkinternals.h" /* For scratch_image code */
#include "gdkalias.h"
/**
* gdk_image_ref:
......@@ -423,3 +423,6 @@ gdk_image_new (GdkImageType type,
return _gdk_image_new_for_depth (gdk_visual_get_screen (visual), type,
visual, width, height, -1);
}
#define __GDK_IMAGE_C__
#include "gdkaliasdef.c"
......@@ -29,9 +29,9 @@
#include <stdlib.h>
#include <string.h>
#include "gdkalias.h"
#include "gdkkeysyms.h"
#include "gdkinternals.h"
#include "gdkalias.h"
/* Key handling not part of the keymap */
......@@ -102,3 +102,5 @@ gdk_keyval_from_name (const gchar *keyval_name)
return GDK_VoidSymbol;
}
#define __GDK_KEYNAMES_C__
#include "gdkaliasdef.c"
......@@ -26,9 +26,9 @@
#include <config.h>
#include "gdkalias.h"
#include "gdkdisplay.h"
#include "gdkkeys.h"
#include "gdkalias.h"
enum {
DIRECTION_CHANGED,
......@@ -313,3 +313,6 @@ gdk_keymap_get_default (void)
{
return gdk_keymap_get_for_display (gdk_display_get_default ());
}
#define __GDK_KEYS_C__
#include "gdkaliasdef.c"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment