[PATCH] Clean up `glibconfig.h'
- From: Raja R Harinath <harinath cs umn edu>
- To: gtk-devel-list redhat com
- Cc: ftp-admin gimp org
- Subject: [PATCH] Clean up `glibconfig.h'
- Date: 25 Oct 1998 17:02:05 -600
I have uploaded
glib-rrh-19981025-0.patch.gz
to ftp.gtk.org:/incoming.
The idea of this patch is the same as my previous suggested patch
(glib-rrh-980712-0.patch.gz):
Installed header files should not define/test HAVE_* macros which are
the output of a configure process -- this will prevent unnecessary
interactions with other packages that define/use similar HAVE_* macros.
They should use sanitized macros, and they can depend on header files
that are installed under $exec_prefix to provide the sanitized values.
The basic problem it is trying to fix is that the installed
`glibconfig.h' has a lot of HAVE_* macros.
Another "problem" is that `glib.h' has a lot of nearly identical set
of #defines/typedefs chosen among by some `#ifdef' which use the above
HAVE_* macros. One option is to rename every HAVE_* to G_HAVE_* and be
done with it. Another is to try to precompute the results of the #ifdef
tests and emit only those defines that would have been used originally.
I chose the second option.
This patch is pretty transparent, and requires few modifications of
other packages. I've been using this, and a variant of this, for nearly
4 months and haven't seen many problems. The changes needed in other
packages:
* gdk/gdki18n.h: Use G_HAVE_{WCHAR_H,WCTYPE_H,BROKEN_WCTYPE}
instead of HAVE_*.
* ORBit/src/ORBitutil/basic_types.h: Use G_HAVE_GINT64 instead
of HAVE_GINT64.
Here's the ChangeLog for `glib':
1998-10-25 Raja R Harinath <harinath@cs.umn.edu>
* Makefile.am (glibconfig.h): New rule.
(stamp-gc-h): New rule. Generate `glibconfig.h'.
* configure.in (AM_CONFIG_HEADER): It is now `config.h'.
(HAVE_BROKEN_WCTYPE): On Solaris, look for iswalnum in -lw before
concluding "broken wctype".
(glibconfig.h): Use AC_OUTPUT_COMMANDS to put generation code into
config.status.
* glib.h: Remove a lot of tests and defines. All these have been
moved to `configure.in (glibconfig.h)'.
* gmem.c: Include <config.h>.
* gstrfuncs.c: Likewise.
* gutils.c: Likewise.
- Hari
--
Raja R Harinath ------------------------------ harinath@cs.umn.edu
"When all else fails, read the instructions." -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing." -- Roy L Ash
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]