After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 158870 - <config.h>
<config.h>
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
1.5.x
Other All
: Low minor
: Medium fix
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2004-11-21 02:41 UTC by Morten Welinder
Modified: 2006-01-14 07:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
adds config.h (26.80 KB, patch)
2006-01-07 00:40 UTC, Luis Menina
none Details | Review

Description Morten Welinder 2004-11-21 02:41:31 UTC
Most of these files should include config.h first.  In practical terms
there will be potential problems when they use stat/open/fopen and
friends, bit it is easier always to include config.h

./pango/pango-coverage.c
./pango/pangofc-fontmap.c
./pango/glyphstring.c
./pango/ellipsize.c
./pango/pangofc-decoder.c
./pango/pango-glyph-item.c
./pango/shape.c
./pango/reorder-items.c
./pango/pango-layout.c
./pango/mini-fribidi/fribidi_char_type.c
./pango/mini-fribidi/fribidi.c
./pango/mini-fribidi/fribidi_types.c
./pango/mini-fribidi/fribidi_get_type.c
./pango/pangowin32-fontcache.c
./pango/pango-item.c
./pango/pangoft2-render.c
./pango/fonts.c
./pango/pangoxft-render.c
./pango/pango-fontmap.c
./pango/pango-fontset.c
./pango/pango-tabs.c
./pango/opentype/otlbuffer.c
./pango/opentype/pango-ot-info.c
./pango/opentype/disasm.c
./pango/opentype/ottest.c
./pango/opentype/ftxgdef.c
./pango/opentype/ftxgpos.c
./pango/opentype/ftxgsub.c
./pango/opentype/ftxopen.c
./pango/opentype/pango-ot-ruleset.c
./pango/opentype/pango-ot-buffer.c
./pango/pango-attributes.c
./pango/pangoxft-fontmap.c
./pango/pango-engine.c
./pango/pango-script.c
./pango/pango-markup.c
./pango/pangox-fontcache.c
./pango/pangox-fontmap.c
./pango/pango-context.c
./pango/pangofc-font.c
./pango/break.c
./pango/pango-renderer.c
./pango/mapping.c
./pango/pango-color.c
./tools/gen-script-for-lang.c
./modules/thai/thai-fc.c
./modules/thai/thai-ot.c
./modules/basic/basic-x.c
./modules/basic/basic-fc.c
./modules/indic/mprefixups.c
./modules/indic/indic-ot-class-tables.c
./modules/indic/indic-fc.c
./modules/indic/indic-ot.c
./modules/arabic/arabic-fc.c
./modules/arabic/arabic-ot.c
./modules/hangul/hangul-fc.c
./modules/hebrew/hebrew-shaper.c
./modules/hebrew/hebrew-fc.c
Comment 1 Behdad Esfahbod 2005-09-26 12:34:03 UTC
The recommended way to do it is:

#if HAVE_CONFIG_H
# include <config.h>
#endif

in every C file and usually before any other include.  Do we want that?
Comment 2 Owen Taylor 2005-09-26 13:07:01 UTC
#ifdef HAVE_CONFIG_H is just noise in my estimation. A project shouldn't be
optionally compilable either way. I don't have any problem with adding
#include <config.h> in all files; we do that for GLib/GTK+.

Comment 3 Luis Menina 2006-01-07 00:40:01 UTC
Created attachment 56898 [details] [review]
adds config.h

Followed Owen's advice: no #ifdef HAVE_CONFIG_H
Comment 4 Behdad Esfahbod 2006-01-14 07:01:24 UTC
Thanks. Applied after some cleaning up and fixing new files, etc...
Now on all .c files have #include <config.h> as the first include, except for generated sources.

2006-01-14  Behdad Esfahbod  <behdad@gnome.org>

        * */*.c, */*/*.c: Make sure #include <config.h> is the first include
        in the file. (bug #158870, based on patch by Luis Menina)