Commit 608a31b9 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

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

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

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

	* glib/glib.symbols: Group symbols by header and source file.
	* glib/makegalias.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 makegalias.pl -def
	* glib/Makefile.am (galiasdef.c): Add a rule to generate this
	file.
	* glib/*.c: Include galias.h after the other GLib headers,
	include galiasdef.c at the bottom.
parent 96913f7a
005-03-13 Matthias Clasen <mclasen@redhat.com>
Make PLT-reduction work with gcc4, and don't include
everything in galias.h:
* glib/glib.symbols: Group symbols by header and source file.
* glib/makegalias.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 makegalias.pl -def
* glib/Makefile.am (galiasdef.c): Add a rule to generate this
file.
* glib/*.c: Include galias.h after the other GLib headers,
include galiasdef.c at the bottom.
* glib/glib.symbols: Add g_listenv and g_file_replace.
Fri Mar 11 23:51:12 2005 Soeren Sandmann <sandmann@redhat.com>
* glib/gfileutils.c (write_to_temp_file): Don't try and generate
......
005-03-13 Matthias Clasen <mclasen@redhat.com>
Make PLT-reduction work with gcc4, and don't include
everything in galias.h:
* glib/glib.symbols: Group symbols by header and source file.
* glib/makegalias.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 makegalias.pl -def
* glib/Makefile.am (galiasdef.c): Add a rule to generate this
file.
* glib/*.c: Include galias.h after the other GLib headers,
include galiasdef.c at the bottom.
* glib/glib.symbols: Add g_listenv and g_file_replace.
Fri Mar 11 23:51:12 2005 Soeren Sandmann <sandmann@redhat.com>
* glib/gfileutils.c (write_to_temp_file): Don't try and generate
......
005-03-13 Matthias Clasen <mclasen@redhat.com>
Make PLT-reduction work with gcc4, and don't include
everything in galias.h:
* glib/glib.symbols: Group symbols by header and source file.
* glib/makegalias.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 makegalias.pl -def
* glib/Makefile.am (galiasdef.c): Add a rule to generate this
file.
* glib/*.c: Include galias.h after the other GLib headers,
include galiasdef.c at the bottom.
* glib/glib.symbols: Add g_listenv and g_file_replace.
Fri Mar 11 23:51:12 2005 Soeren Sandmann <sandmann@redhat.com>
* glib/gfileutils.c (write_to_temp_file): Don't try and generate
......
005-03-13 Matthias Clasen <mclasen@redhat.com>
Make PLT-reduction work with gcc4, and don't include
everything in galias.h:
* glib/glib.symbols: Group symbols by header and source file.
* glib/makegalias.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 makegalias.pl -def
* glib/Makefile.am (galiasdef.c): Add a rule to generate this
file.
* glib/*.c: Include galias.h after the other GLib headers,
include galiasdef.c at the bottom.
* glib/glib.symbols: Add g_listenv and g_file_replace.
Fri Mar 11 23:51:12 2005 Soeren Sandmann <sandmann@redhat.com>
* glib/gfileutils.c (write_to_temp_file): Don't try and generate
......
......@@ -14,18 +14,21 @@ INCLUDES = -I$(top_srcdir) -DG_LOG_DOMAIN=\"GLib\" \
$(GLIB_DEBUG_FLAGS) -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION
glib.def: glib.symbols
(echo -e EXPORTS; $(CPP) -P -DINCLUDE_VARIABLES -DINCLUDE_INTERNAL_SYMBOLS -DG_OS_WIN32 - <$(srcdir)/glib.symbols | sed -e '/^$$/d' -e 's/^/ /' -e 's/G_GNUC_[^ ]*//g') > glib.def
(echo -e EXPORTS; $(CPP) -P -DINCLUDE_VARIABLES -DINCLUDE_INTERNAL_SYMBOLS -DG_OS_WIN32 -DALL_FILES - <$(srcdir)/glib.symbols | sed -e '/^$$/d' -e 's/^/ /' -e 's/G_GNUC_[^ ]*//g') > glib.def
galias.h: glib.symbols
$(PERL) $(srcdir)/makegalias.pl < $(srcdir)/glib.symbols > galias.h
galiasdef.c: glib.symbols
$(PERL) $(srcdir)/makegalias.pl -def < $(srcdir)/glib.symbols > galiasdef.c
if OS_LINUX
if HAVE_GNUC_VISIBILITY
TESTS = abicheck.sh
endif
endif
BUILT_SOURCES = galias.h
BUILT_SOURCES = galias.h galiasdef.c
EXTRA_DIST = \
makefile.msc.in \
......@@ -39,7 +42,8 @@ EXTRA_DIST = \
BUILT_EXTRA_DIST = \
makefile.msc \
glib.rc \
galias.h
galias.h \
galiasdef.c
lib_LTLIBRARIES = libglib-2.0.la
......
......@@ -5,7 +5,7 @@ egrep '^#([^i]|if).*[^\]$' "${top_builddir:-..}/glibconfig.h" > glibconfig.cpp
INCLUDES="-include ${top_builddir:-..}/config.h"
INCLUDES="$INCLUDES -include glibconfig.cpp"
cpp -P -DINCLUDE_INTERNAL_SYMBOLS -DG_STDIO_NO_WRAP_ON_UNIX $INCLUDES "${srcdir:-.}/glib.symbols" | sed -e '/^$/d' -e 's/ G_GNUC.*$//' -e 's/ PRIVATE$//' | sort > expected-abi
cpp -P -DINCLUDE_INTERNAL_SYMBOLS -DG_STDIO_NO_WRAP_ON_UNIX -DALL_FILES $INCLUDES "${srcdir:-.}/glib.symbols" | sed -e '/^$/d' -e 's/ G_GNUC.*$//' -e 's/ PRIVATE$//' | sort > expected-abi
rm glibconfig.cpp
nm -D .libs/libglib-2.0.so | grep " T " | cut -d ' ' -f 3 | sort > actual-abi
......
......@@ -32,8 +32,15 @@
#include <string.h>
#include <stdlib.h>
#include "garray.h"
#include "gmem.h"
#include "gthread.h"
#include "gmessages.h"
#include "gqsort.h"
#include "galias.h"
#include "glib.h"
#define MIN_ARRAY_SIZE 16
......@@ -750,3 +757,6 @@ g_byte_array_sort_with_data (GByteArray *array,
{
g_array_sort_with_data ((GArray *) array, compare_func, user_data);
}
#define __G_ARRAY_C__
#include "galiasdef.c"
......@@ -26,8 +26,8 @@
#include "config.h"
#include "galias.h"
#include "glib.h"
#include "galias.h"
struct _GAsyncQueue
......@@ -444,3 +444,5 @@ g_async_queue_length_unlocked (GAsyncQueue* queue)
return queue->queue->length - queue->waiting_threads;
}
#define __G_ASYNCQUEUE_C__
#include "galiasdef.c"
......@@ -646,3 +646,6 @@ _g_atomic_thread_init (void)
g_atomic_mutex = g_mutex_new ();
#endif /* DEFINE_WITH_MUTEXES */
}
#define IN_FILE_gatomic 1
#include "galiasdef.c"
......@@ -35,7 +35,6 @@
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include "galias.h"
#include "glib.h"
#include "gprintfint.h"
......@@ -76,6 +75,7 @@
# endif
#endif
#include "galias.h"
#ifndef G_OS_WIN32
static void stack_trace (char **args);
......@@ -302,3 +302,6 @@ stack_trace (char **args)
}
#endif /* !G_OS_WIN32 */
#define __G_BACKTRACE_C__
#include "galiasdef.c"
......@@ -213,3 +213,6 @@ g_cache_node_destroy (GCacheNode *node)
g_mem_chunk_free (node_mem_chunk, node);
G_UNLOCK (node_mem_chunk);
}
#define IN_FILE_gcache 1
#include "galiasdef.c"
......@@ -32,9 +32,8 @@
#include <string.h>
#include "galias.h"
#include "glib.h"
#include "galias.h"
static void completion_check_cache (GCompletion* cmp,
gchar** new_prefix);
......@@ -346,3 +345,6 @@ main (int argc,
return 0;
}
#endif
#define __G_COMPLETION_C__
#include "galiasdef.c"
......@@ -28,7 +28,6 @@
#include <string.h>
#include <stdlib.h>
#include "galias.h"
#include "glib.h"
#include "gprintfint.h"
#include "gthreadinit.h"
......@@ -48,6 +47,8 @@
#error GNU libiconv not in use but included iconv.h is from libiconv
#endif
#include "galias.h"
GQuark
g_convert_error_quark (void)
{
......@@ -2003,3 +2004,5 @@ g_filename_display_name (const gchar *filename)
return display_name;
}
#define __G_CONVERT_C__
#include "galiasdef.c"
......@@ -34,8 +34,9 @@
#include "config.h"
#include <string.h>
#include "galias.h"
#include "glib.h"
#include "galias.h"
/* --- defines --- */
......@@ -544,7 +545,7 @@ g_data_initialize (void)
}
GQuark
g_quark_try_string (const gchar *string)
IA__g_quark_try_string (const gchar *string)
{
GQuark quark = 0;
g_return_val_if_fail (string != NULL, 0);
......@@ -631,3 +632,6 @@ g_quark_new (gchar *string)
return quark;
}
#define __G_DATASET_C__
#include "galiasdef.c"
......@@ -35,7 +35,6 @@
/* #define DEBUG_MSG(args) g_message args ; */
#endif
#include "galias.h"
#include "glib.h"
#include <time.h>
......@@ -43,6 +42,8 @@
#include <stdlib.h>
#include <locale.h>
#include "galias.h"
GDate*
g_date_new (void)
{
......@@ -1467,3 +1468,6 @@ g_date_strftime (gchar *s,
return retval;
}
#define __G_DATE_C__
#include "galiasdef.c"
......@@ -32,12 +32,13 @@
#include <dirent.h>
#endif
#include "galias.h"
#include "glib.h"
#include "gdir.h"
#include "glibintl.h"
#include "galias.h"
struct _GDir
{
union {
......@@ -343,3 +344,6 @@ g_dir_close (GDir *dir)
closedir (dir->u.dirp);
g_free (dir);
}
#define __G_DIR_C__
#include "galiasdef.c"
......@@ -26,8 +26,8 @@
#include "config.h"
#include "galias.h"
#include "glib.h"
#include "galias.h"
static GError*
......@@ -256,3 +256,6 @@ g_clear_error (GError **err)
*err = NULL;
}
}
#define __G_ERROR_C__
#include "galiasdef.c"
......@@ -20,7 +20,6 @@
#include "config.h"
#include "galias.h"
#include "glib.h"
#include <sys/stat.h>
......@@ -53,6 +52,8 @@
#include "gstdio.h"
#include "glibintl.h"
#include "galias.h"
/**
* g_file_test:
* @filename: a filename to test in the GLib file name encoding
......@@ -1721,3 +1722,6 @@ g_file_read_link (const gchar *filename,
return NULL;
#endif
}
#define __G_FILEUTILS_C__
#include "galiasdef.c"
......@@ -30,8 +30,8 @@
#include "config.h"
#include "galias.h"
#include "glib.h"
#include "galias.h"
#define HASH_TABLE_MIN_SIZE 11
......@@ -759,3 +759,6 @@ g_hash_nodes_destroy (GHashNode *hash_node,
}
#endif
}
#define __G_HASH_C__
#include "galiasdef.c"
......@@ -33,8 +33,8 @@
#include "config.h"
#include "galias.h"
#include "glib.h"
#include "galias.h"
/* --- defines --- */
......@@ -645,3 +645,6 @@ g_hook_compare_ids (GHook *new_hook,
return 0;
}
#define __G_HOOK_C__
#include "galiasdef.c"
......@@ -42,13 +42,14 @@
#undef G_DISABLE_DEPRECATED
#include "galias.h"
#include "glib.h"
#include "giochannel.h"
#include "glibintl.h"
#include "galias.h"
#define G_IO_NICE_BUF_SIZE 1024
/* This needs to be as wide as the largest character in any possible encoding */
......@@ -2301,3 +2302,6 @@ g_io_channel_error_quark (void)
return q;
}
#define __G_IOCHANNEL_C__
#include "galiasdef.c"
......@@ -43,8 +43,8 @@
#include <string.h>
#include <fcntl.h>
#include "galias.h"
#include "glib.h"
#include "galias.h"
/*
* Unix IO Channels
......@@ -596,3 +596,6 @@ g_io_channel_unix_get_fd (GIOChannel *channel)
GIOUnixChannel *unix_channel = (GIOUnixChannel *)channel;
return unix_channel->fd;
}
#define __G_IO_UNIX_C__
#include "galiasdef.c"
......@@ -34,7 +34,6 @@
#include "config.h"
#include "galias.h"
#include "glib.h"
#include <stdlib.h>
......@@ -49,6 +48,8 @@
#include "gstdio.h"
#include "glibintl.h"
#include "galias.h"
typedef struct _GIOWin32Channel GIOWin32Channel;
typedef struct _GIOWin32Watch GIOWin32Watch;
......@@ -1713,3 +1714,6 @@ g_io_channel_win32_new_stream_socket (int socket)
{
return g_io_channel_win32_new_socket (socket);
}
#define __G_IO_WIN32_C__
#include "galiasdef.c"
......@@ -22,7 +22,6 @@
*/
#include "config.h"
#include "galias.h"
#include "gkeyfile.h"
......@@ -61,6 +60,8 @@
#include "gstrfuncs.h"
#include "gutils.h"
#include "galias.h"
typedef struct _GKeyFileGroup GKeyFileGroup;
struct _GKeyFile
......@@ -3274,4 +3275,5 @@ g_key_file_parse_comment_as_value (GKeyFile *key_file,
return value;
}
#define __G_KEY_FILE_C__
#include "galiasdef.c"
This diff is collapsed.
......@@ -30,8 +30,8 @@
#include "config.h"
#include "galias.h"
#include "glib.h"
#include "galias.h"
#ifndef DISABLE_MEM_POOLS
......@@ -814,3 +814,5 @@ g_list_sort_with_data (GList *list,
return g_list_sort_real (list, (GFunc) compare_func, TRUE, user_data);
}
#define __G_LIST_C__
#include "galiasdef.c"
......@@ -36,7 +36,6 @@
/* uncomment the next line to get poll() debugging info */
/* #define G_MAIN_POLL_DEBUG */
#include "galias.h"
#include "glib.h"
#include "gthreadinit.h"
#include <signal.h>
......@@ -76,6 +75,9 @@
#include <fcntl.h>
#include <sys/wait.h>
#endif
#include "galias.h"
/* Types */
typedef struct _GTimeoutSource GTimeoutSource;
......@@ -3916,3 +3918,5 @@ g_idle_remove_by_data (gpointer data)
return g_source_remove_by_funcs_user_data (&g_idle_funcs, data);
}
#define __G_MAIN_C__
#include "galiasdef.c"
......@@ -26,8 +26,8 @@
#include <stdlib.h>
#include <errno.h>
#include "galias.h"
#include "glib.h"
#include "galias.h"
#include "glibintl.h"
......@@ -2259,3 +2259,6 @@ g_markup_printf_escaped (const char *format, ...)
return result;
}
#define __G_MARKUP_C__
#include "galiasdef.c"
......@@ -34,9 +34,9 @@
#include <string.h>
#include <signal.h>
#include "galias.h"
#include "glib.h"
#include "gthreadinit.h"
#include "galias.h"
/* notes on macros:
* having DISABLE_MEM_POOLS defined, disables mem_chunks alltogether, their
......@@ -1272,3 +1272,5 @@ _g_mem_thread_private_init (void)
#endif
}
#define __G_MEM_C__
#include "galiasdef.c"
......@@ -41,11 +41,11 @@
#include <locale.h>
#include <errno.h>
#include "galias.h"
#include "glib.h"
#include "gdebug.h"
#include "gprintfint.h"
#include "gthreadinit.h"
#include "galias.h"
#ifdef G_OS_WIN32
#include <io.h>
......@@ -1122,3 +1122,6 @@ _g_debug_init (void)
g_log_set_always_fatal (fatal_mask);
}
}
#define __G_MESSAGES_C__
#include "galiasdef.c"
......@@ -33,8 +33,8 @@
#include "config.h"
#include "galias.h"
#include "glib.h"
#include "galias.h"
#ifndef DISABLE_MEM_POOLS
/* node allocation
......@@ -1048,3 +1048,6 @@ g_node_children_foreach (GNode *node,
}
}
}
#define __G_NODE_C__
#include "galiasdef.c"
......@@ -21,12 +21,12 @@
#include "config.h"
#include "galias.h"
#include "goption.h"
#include "glib.h"
#include "gi18n.h"
#include "galias.h"
#include <string.h>
#include <stdlib.h>
#include <errno.h>
......@@ -1657,3 +1657,5 @@ g_option_group_set_translation_domain (GOptionGroup *group,
g_free);
}
#define __G_OPTION_C__
#include "galiasdef.c"
......@@ -21,7 +21,6 @@
#include <string.h>
#include "galias.h"
#include "gpattern.h"
#include "gmacros.h"
......@@ -29,6 +28,7 @@
#include "gmem.h"
#include "gunicode.h"
#include "gutils.h"
#include "galias.h"
/* keep enum and structure of gpattern.c and patterntest.c in sync */
typedef enum
......@@ -320,3 +320,6 @@ g_pattern_match_simple (const gchar *pattern,
return ergo;
}
#define __G_PATTERN_C__
#include "galiasdef.c"
......@@ -30,8 +30,8 @@
#include "config.h"
#include "galias.h"
#include "glib.h"
#include "galias.h"
static const guint g_primes[] =
......@@ -85,3 +85,6 @@ g_spaced_primes_closest (guint num)
return g_primes[g_nprimes - 1];
}
#define __G_PRIMES_C__
#include "galiasdef.c"
......@@ -27,11 +27,12 @@
#include <stdlib.h>
#include <stdio.h>
#include "galias.h"
#include "glib.h"
#include "gprintf.h"
#include "gprintfint.h"
#include "galias.h"
/**
* g_printf:
* @format: a standard printf() format string, but notice
......@@ -337,6 +338,5 @@ g_vasprintf (gchar **string,
return len;
}
#define __G_PRINTF_C__
#include "galiasdef.c"
......@@ -38,8 +38,8 @@
#include <stdlib.h>
#include <string.h>
#include "galias.h"
#include "glib.h"
#include "galias.h"
/* Byte-wise swap two items of size SIZE. */
#define SWAP(a, b, size) \
......@@ -282,3 +282,6 @@ g_qsort_with_data (gconstpointer pbase,
}
}
}
#define __G_QSORT_C__
#include "galiasdef.c"
......@@ -26,8 +26,8 @@
#include "config.h"
#include "galias.h"
#include "glib.h"
#include "galias.h"
G_LOCK_DEFINE_STATIC (queue_memchunk);
......@@ -1001,3 +1001,6 @@ g_queue_insert_sorted (GQueue *queue,
else
g_queue_push_tail (queue, data);
}
#define __G_QUEUE_C__
#include "galiasdef.c"
......@@ -47,9 +47,9 @@
#include <unistd.h>
#endif
#include "galias.h"
#include "glib.h"
#include "gthreadinit.h"
#include "galias.h"
#ifdef G_OS_WIN32
#include <process.h> /* For getpid() */
......@@ -635,3 +635,6 @@ g_random_set_seed (guint32 seed)
G_UNLOCK (global_random);
}
#define __G_RAND_C__
#include "galiasdef.c"
......@@ -32,8 +32,8 @@
#include <stdarg.h>
#include <string.h>
#include "galias.h"
#include "glib.h"
#include "galias.h"
typedef struct _GRealTuples GRealTuples;
......@@ -452,3 +452,6 @@ g_relation_print (GRelation *relation)
}
}
#define __G_REL_C__
#include "galiasdef.c"
......@@ -42,9 +42,9 @@
#include <unistd.h>
#endif
#include "galias.h"
#include "glib.h"
#include "gprintfint.h"
#include "galias.h"
#ifdef G_OS_WIN32
#include <io.h> /* For _read() */
......@@ -1763,3 +1763,6 @@ g_scanner_get_token_ll (GScanner *scanner,
*token_p = token;
*value_p = value;
}
#define __G_SCANNER_C__
#include "galiasdef.c"
......@@ -24,8 +24,8 @@
#include <string.h>
#include "galias.h"
#include "glib.h"
#include "galias.h"
#ifdef _
#warning "FIXME remove gettext hack"
......@@ -671,3 +671,6 @@ g_shell_parse_argv (const gchar *command_line,
return FALSE;
}
#define __G_SHELL_C__
#include "galiasdef.c"
......@@ -30,8 +30,8 @@
#include "config.h"
#include "galias.h"