From 5deab8d3c31029a0d8c952e34908a9d7dded52eb Mon Sep 17 00:00:00 2001 From: James Andrewartha Date: Thu, 4 May 2006 15:20:14 +0000 Subject: [PATCH] Make sure gstprivate.h and/or config.h are always included first, otherwise some of our defines (like _FILE_OFFSET_BI... Original commit message from CVS: Patch by: James Andrewartha * gst/gst.c: * gst/gstbus.c: * gst/gstclock.c: * gst/gstevent.c: * gst/gstformat.c: * gst/gstmessage.c: * gst/gstparse.c: * gst/gstquery.c: * gst/gstutils.c: * gst/parse/Makefile.am: * libs/gst/base/gstadapter.c: * libs/gst/base/gstbasesrc.c: * libs/gst/base/gstpushsrc.c: * libs/gst/base/gsttypefindhelper.c: * plugins/elements/gstfakesrc.c: * plugins/elements/gstidentity.c: Make sure gstprivate.h and/or config.h are always included first, otherwise some of our defines (like _FILE_OFFSET_BITS) might be redefined in the system headers. Fixes build on opensolaris (#340016). --- ChangeLog | 26 ++++++++++++++++++++++++++ gst/gst.c | 2 +- gst/gstbus.c | 2 +- gst/gstclock.c | 2 +- gst/gstevent.c | 2 +- gst/gstformat.c | 2 +- gst/gstmessage.c | 2 +- gst/gstparse.c | 2 +- gst/gstquery.c | 2 +- gst/gstutils.c | 2 +- gst/parse/Makefile.am | 15 +++++++++++++++ libs/gst/base/gstadapter.c | 2 +- libs/gst/base/gstbasesrc.c | 6 +++--- libs/gst/base/gstpushsrc.c | 6 +++--- libs/gst/base/gsttypefindhelper.c | 6 +++--- plugins/elements/gstfakesrc.c | 6 +++--- plugins/elements/gstidentity.c | 4 ++-- 17 files changed, 65 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index a8c2e4c..cd96c4f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,29 @@ +2006-05-04 Tim-Philipp Müller + + Patch by: James Andrewartha + + * gst/gst.c: + * gst/gstbus.c: + * gst/gstclock.c: + * gst/gstevent.c: + * gst/gstformat.c: + * gst/gstmessage.c: + * gst/gstparse.c: + * gst/gstquery.c: + * gst/gstutils.c: + * gst/parse/Makefile.am: + * libs/gst/base/gstadapter.c: + * libs/gst/base/gstbasesrc.c: + * libs/gst/base/gstpushsrc.c: + * libs/gst/base/gsttypefindhelper.c: + * plugins/elements/gstfakesrc.c: + * plugins/elements/gstidentity.c: + Make sure gstprivate.h and/or config.h are + always included first, otherwise some of our + defines (like _FILE_OFFSET_BITS) might be + redefined in the system headers. Fixes build + on opensolaris (#340016). + 2006-05-04 Wim Taymans * docs/libs/gstreamer-libs-sections.txt: diff --git a/gst/gst.c b/gst/gst.c index ee8fe3f..53d0df1 100644 --- a/gst/gst.c +++ b/gst/gst.c @@ -101,10 +101,10 @@ * Last reviewed on 2005-11-23 (0.9.5) */ +#include "gst_private.h" #include #include -#include "gst_private.h" #include "gst-i18n-lib.h" #include /* for LC_ALL */ diff --git a/gst/gstbus.c b/gst/gstbus.c index aa41144..5107dd6 100644 --- a/gst/gstbus.c +++ b/gst/gstbus.c @@ -66,13 +66,13 @@ * Last reviewed on 2006-03-12 (0.10.5) */ +#include "gst_private.h" #include #ifdef HAVE_UNISTD_H # include #endif #include -#include "gst_private.h" #include "gstinfo.h" #include "gstbus.h" diff --git a/gst/gstclock.c b/gst/gstclock.c index ad0d7c4..52cdcf2 100644 --- a/gst/gstclock.c +++ b/gst/gstclock.c @@ -102,9 +102,9 @@ * Last reviewed on 2006-03-09 (0.10.4) */ -#include #include "gst_private.h" +#include #include "gstclock.h" #include "gstinfo.h" diff --git a/gst/gstevent.c b/gst/gstevent.c index 1df83f8..658f11d 100644 --- a/gst/gstevent.c +++ b/gst/gstevent.c @@ -75,9 +75,9 @@ * Last reviewed on 2006-01-24 (0.10.2) */ -#include /* memcpy */ #include "gst_private.h" +#include /* memcpy */ #include "gstinfo.h" #include "gstevent.h" diff --git a/gst/gstformat.c b/gst/gstformat.c index 3d0acad..3ae8f3e 100644 --- a/gst/gstformat.c +++ b/gst/gstformat.c @@ -31,9 +31,9 @@ * operations. */ -#include #include "gst_private.h" +#include #include "gstformat.h" static GStaticMutex mutex = G_STATIC_MUTEX_INIT; diff --git a/gst/gstmessage.c b/gst/gstmessage.c index 01b1db1..bc4c7f4 100644 --- a/gst/gstmessage.c +++ b/gst/gstmessage.c @@ -48,9 +48,9 @@ * Last reviewed on 2005-11-09 (0.9.4) */ -#include /* memcpy */ #include "gst_private.h" +#include /* memcpy */ #include "gsterror.h" #include "gstenumtypes.h" #include "gstinfo.h" diff --git a/gst/gstparse.c b/gst/gstparse.c index 5532c7a..0098c6b 100644 --- a/gst/gstparse.c +++ b/gst/gstparse.c @@ -29,9 +29,9 @@ * gst-launch utillity. */ -#include #include "gst_private.h" +#include #include "gstparse.h" #include "gstinfo.h" diff --git a/gst/gstquery.c b/gst/gstquery.c index 94225e4..1f0860d 100644 --- a/gst/gstquery.c +++ b/gst/gstquery.c @@ -58,9 +58,9 @@ * * Last reviewed on 2006-02-14 (0.10.4) */ -#include #include "gst_private.h" +#include #include "gstquery.h" #include "gstvalue.h" #include "gstenumtypes.h" diff --git a/gst/gstutils.c b/gst/gstutils.c index 590b10d..1a62f7b 100644 --- a/gst/gstutils.c +++ b/gst/gstutils.c @@ -28,10 +28,10 @@ * When defining own plugins, use the GST_BOILERPLATE ease gobject creation. */ +#include "gst_private.h" #include #include -#include "gst_private.h" #include "gstghostpad.h" #include "gstutils.h" #include "gstinfo.h" diff --git a/gst/parse/Makefile.am b/gst/parse/Makefile.am index 9b74e70..1690738 100644 --- a/gst/parse/Makefile.am +++ b/gst/parse/Makefile.am @@ -19,6 +19,21 @@ noinst_HEADERS = grammar.tab.h grammar.tab.c grammar.tab.h: grammar.y $(BISON_PATH) -d -v -p_gst_parse__yy $(srcdir)/grammar.y -o grammar.tab.c + mv grammar.tab.c grammar.tab_tmp.c; \ + echo '#ifdef HAVE_CONFIG_H' > grammar.tab_tmp2.c; \ + echo '#include ' >> grammar.tab_tmp2.c; \ + echo '#endif' >> grammar.tab_tmp2.c; \ + cat grammar.tab_tmp.c >> grammar.tab_tmp2.c; \ + rm grammar.tab_tmp.c; \ + mv grammar.tab_tmp2.c grammar.tab.c lex._gst_parse_yy.c: parse.l grammar.tab.h $(FLEX_PATH) -P_gst_parse_yy $^ + mv lex._gst_parse_yy.c lex._gst_parse_yy_tmp.c; \ + echo '#ifdef HAVE_CONFIG_H' > lex._gst_parse_yy_tmp2.c; \ + echo '#include ' >> lex._gst_parse_yy_tmp2.c; \ + echo '#endif' >> lex._gst_parse_yy_tmp2.c; \ + cat lex._gst_parse_yy_tmp.c >> lex._gst_parse_yy_tmp2.c; \ + rm lex._gst_parse_yy_tmp.c; \ + mv lex._gst_parse_yy_tmp2.c lex._gst_parse_yy.c + diff --git a/libs/gst/base/gstadapter.c b/libs/gst/base/gstadapter.c index 0179224..455a03f 100644 --- a/libs/gst/base/gstadapter.c +++ b/libs/gst/base/gstadapter.c @@ -92,9 +92,9 @@ * Last reviewed on 2006-03-07 (0.10.4). */ -#include #include "gstadapter.h" +#include /* default size for the assembled data buffer */ #define DEFAULT_SIZE 16 diff --git a/libs/gst/base/gstbasesrc.c b/libs/gst/base/gstbasesrc.c index 1163bef..10f0396 100644 --- a/libs/gst/base/gstbasesrc.c +++ b/libs/gst/base/gstbasesrc.c @@ -165,13 +165,13 @@ * */ -#include -#include - #ifdef HAVE_CONFIG_H # include "config.h" #endif +#include +#include + #include "gstbasesrc.h" #include "gsttypefindhelper.h" #include diff --git a/libs/gst/base/gstpushsrc.c b/libs/gst/base/gstpushsrc.c index 232c0a1..6f640ef 100644 --- a/libs/gst/base/gstpushsrc.c +++ b/libs/gst/base/gstpushsrc.c @@ -44,13 +44,13 @@ * base class. */ -#include -#include - #ifdef HAVE_CONFIG_H # include "config.h" #endif +#include +#include + #include "gstpushsrc.h" #include "gsttypefindhelper.h" #include diff --git a/libs/gst/base/gsttypefindhelper.c b/libs/gst/base/gsttypefindhelper.c index 5d9ad8b..0d709d2 100644 --- a/libs/gst/base/gsttypefindhelper.c +++ b/libs/gst/base/gsttypefindhelper.c @@ -31,13 +31,13 @@ * typefinding in push mode from a chain function. */ -#include -#include - #ifdef HAVE_CONFIG_H # include "config.h" #endif +#include +#include + #include "gsttypefindhelper.h" static gint diff --git a/plugins/elements/gstfakesrc.c b/plugins/elements/gstfakesrc.c index 9084e1c..28cd63a 100644 --- a/plugins/elements/gstfakesrc.c +++ b/plugins/elements/gstfakesrc.c @@ -47,13 +47,13 @@ * */ -#include -#include - #ifdef HAVE_CONFIG_H # include "config.h" #endif +#include +#include + #include "gstfakesrc.h" #include diff --git a/plugins/elements/gstidentity.c b/plugins/elements/gstidentity.c index cd24d42..58833c1 100644 --- a/plugins/elements/gstidentity.c +++ b/plugins/elements/gstidentity.c @@ -22,12 +22,12 @@ */ -#include - #ifdef HAVE_CONFIG_H # include "config.h" #endif +#include + #include "../../gst/gst-i18n-lib.h" #include "gstidentity.h" #include -- 2.7.4