From 926ce51a2821cccdc78caebdcbb5f93ede5d0696 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Mon, 12 Jan 2004 04:15:47 +0000 Subject: [PATCH] Make sure everybody wraps #include "config.h" in #ifdef HAVE_CONFIG_H Original commit message from CVS: * ext/ffmpeg/gstffmpeg.c: * ext/ffmpeg/gstffmpegcodecmap.c: * ext/ffmpeg/gstffmpegdec.c: * ext/ffmpeg/gstffmpegenc.c: * ext/ffmpeg/gstffmpegprotocol.c: * ext/gdk_pixbuf/gstgdkanimation.c: * ext/jpeg/gstjpeg.c: * ext/libpng/gstpng.c: * ext/mpeg2dec/perftest.c: * ext/speex/gstspeex.c: * gst-libs/gst/resample/dtos.c: * gst/intfloat/gstintfloatconvert.c: * gst/oneton/gstoneton.c: * gst/rtjpeg/RTjpeg.c: * gst/rtp/gstrtp.c: * sys/dxr3/dxr3init.c: * sys/glsink/gstgl_nvimage.c: * sys/glsink/gstgl_pdrimage.c: * sys/glsink/gstglsink.c: * testsuite/gst-lint: Make sure everybody wraps #include "config.h" in #ifdef HAVE_CONFIG_H --- ChangeLog | 24 ++++++++++++++++++++++++ gst-libs/gst/resample/dtos.c | 4 +++- tests/old/testsuite/gst-lint | 35 +++++++++++++++++++++++------------ testsuite/gst-lint | 35 +++++++++++++++++++++++------------ 4 files changed, 73 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1457ec2b60..787cde8369 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,27 @@ +2004-01-11 David Schleef + + * ext/ffmpeg/gstffmpeg.c: + * ext/ffmpeg/gstffmpegcodecmap.c: + * ext/ffmpeg/gstffmpegdec.c: + * ext/ffmpeg/gstffmpegenc.c: + * ext/ffmpeg/gstffmpegprotocol.c: + * ext/gdk_pixbuf/gstgdkanimation.c: + * ext/jpeg/gstjpeg.c: + * ext/libpng/gstpng.c: + * ext/mpeg2dec/perftest.c: + * ext/speex/gstspeex.c: + * gst-libs/gst/resample/dtos.c: + * gst/intfloat/gstintfloatconvert.c: + * gst/oneton/gstoneton.c: + * gst/rtjpeg/RTjpeg.c: + * gst/rtp/gstrtp.c: + * sys/dxr3/dxr3init.c: + * sys/glsink/gstgl_nvimage.c: + * sys/glsink/gstgl_pdrimage.c: + * sys/glsink/gstglsink.c: + * testsuite/gst-lint: + Make sure everybody wraps #include "config.h" in #ifdef HAVE_CONFIG_H + 2004-01-11 David Schleef * ext/alsa/gstalsasrc.c: (gst_alsa_src_set_caps): diff --git a/gst-libs/gst/resample/dtos.c b/gst-libs/gst/resample/dtos.c index 7c0deadc1c..268c401adc 100644 --- a/gst-libs/gst/resample/dtos.c +++ b/gst-libs/gst/resample/dtos.c @@ -17,6 +17,9 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include +#endif #include #include @@ -25,7 +28,6 @@ /*#include */ #include -#include diff --git a/tests/old/testsuite/gst-lint b/tests/old/testsuite/gst-lint index 097268d41a..95c9e1adb7 100755 --- a/tests/old/testsuite/gst-lint +++ b/tests/old/testsuite/gst-lint @@ -25,6 +25,7 @@ sub check_copyright(); sub check_license(); sub check_buffer_alloc(); sub check_bad_includes(); +sub check_begin_decls(); sub check_c99_comments(); sub check_carriage_returns(); sub check_printf_lld(); @@ -55,27 +56,34 @@ foreach $filename () { print "I: $filename\n"; - check_copyright(); - check_license(); - - check_buffer_alloc(); + # important stuff check_bad_includes(); - check_c99_comments(); - check_carriage_returns(); check_printf_lld(); - check_glibisms(); - #check_indentation(); check_gst_props_set(); check_deprecated(); check_config_h(); + check_old_typefind(); + check_old_plugin(); + check_caps(); + + # less important stuff + +if (0) { + check_copyright(); + check_license(); + + check_gnuc_const(); + check_begin_decls(); + check_buffer_alloc(); + check_c99_comments(); + check_carriage_returns(); + check_glibisms(); + #check_indentation(); check_varargs_functions(); check_debugging(); - check_old_typefind(); check_bad_casts(); - check_old_plugin(); check_signal_new(); - check_gnuc_const(); - check_caps(); +} } open FIND, "find . -name \"Makefile.am\" -print|"; @@ -148,7 +156,10 @@ sub check_bad_includes() if (grep { /^#include\s+/; } @lines) { print "E: bad header: malloc.h\n" } +} +sub check_begin_decls() +{ # # Prefer "G_BEGIN_DECLS" to 'extern "C" {' # diff --git a/testsuite/gst-lint b/testsuite/gst-lint index 097268d41a..95c9e1adb7 100755 --- a/testsuite/gst-lint +++ b/testsuite/gst-lint @@ -25,6 +25,7 @@ sub check_copyright(); sub check_license(); sub check_buffer_alloc(); sub check_bad_includes(); +sub check_begin_decls(); sub check_c99_comments(); sub check_carriage_returns(); sub check_printf_lld(); @@ -55,27 +56,34 @@ foreach $filename () { print "I: $filename\n"; - check_copyright(); - check_license(); - - check_buffer_alloc(); + # important stuff check_bad_includes(); - check_c99_comments(); - check_carriage_returns(); check_printf_lld(); - check_glibisms(); - #check_indentation(); check_gst_props_set(); check_deprecated(); check_config_h(); + check_old_typefind(); + check_old_plugin(); + check_caps(); + + # less important stuff + +if (0) { + check_copyright(); + check_license(); + + check_gnuc_const(); + check_begin_decls(); + check_buffer_alloc(); + check_c99_comments(); + check_carriage_returns(); + check_glibisms(); + #check_indentation(); check_varargs_functions(); check_debugging(); - check_old_typefind(); check_bad_casts(); - check_old_plugin(); check_signal_new(); - check_gnuc_const(); - check_caps(); +} } open FIND, "find . -name \"Makefile.am\" -print|"; @@ -148,7 +156,10 @@ sub check_bad_includes() if (grep { /^#include\s+/; } @lines) { print "E: bad header: malloc.h\n" } +} +sub check_begin_decls() +{ # # Prefer "G_BEGIN_DECLS" to 'extern "C" {' #