Make sure gstprivate.h and/or config.h are always included first, otherwise some...
authorJames Andrewartha <trs80@tartarus.uwa.edu.au>
Thu, 4 May 2006 15:20:14 +0000 (15:20 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Thu, 4 May 2006 15:20:14 +0000 (15:20 +0000)
Original commit message from CVS:
Patch by: James Andrewartha <trs80 at tartarus uwa edu au>
* 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).

17 files changed:
ChangeLog
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

index a8c2e4c..cd96c4f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,29 @@
+2006-05-04  Tim-Philipp Müller  <tim at centricular dot net>
+
+       Patch by: James Andrewartha <trs80 at tartarus uwa edu au>
+
+       * 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  <wim@fluendo.com>
 
        * docs/libs/gstreamer-libs-sections.txt:
index ee8fe3f..53d0df1 100644 (file)
--- a/gst/gst.c
+++ b/gst/gst.c
  * Last reviewed on 2005-11-23 (0.9.5)
  */
 
+#include "gst_private.h"
 #include <stdlib.h>
 #include <stdio.h>
 
-#include "gst_private.h"
 #include "gst-i18n-lib.h"
 #include <locale.h>             /* for LC_ALL */
 
index aa41144..5107dd6 100644 (file)
  * Last reviewed on 2006-03-12 (0.10.5)
  */
 
+#include "gst_private.h"
 #include <errno.h>
 #ifdef HAVE_UNISTD_H
 #  include <unistd.h>
 #endif
 #include <sys/types.h>
 
-#include "gst_private.h"
 #include "gstinfo.h"
 
 #include "gstbus.h"
index ad0d7c4..52cdcf2 100644 (file)
  * Last reviewed on 2006-03-09 (0.10.4)
  */
 
-#include <time.h>
 
 #include "gst_private.h"
+#include <time.h>
 
 #include "gstclock.h"
 #include "gstinfo.h"
index 1df83f8..658f11d 100644 (file)
@@ -75,9 +75,9 @@
  * Last reviewed on 2006-01-24 (0.10.2)
  */
 
-#include <string.h>             /* memcpy */
 
 #include "gst_private.h"
+#include <string.h>             /* memcpy */
 
 #include "gstinfo.h"
 #include "gstevent.h"
index 3d0acad..3ae8f3e 100644 (file)
@@ -31,9 +31,9 @@
  * operations.
  */
 
-#include <string.h>
 
 #include "gst_private.h"
+#include <string.h>
 #include "gstformat.h"
 
 static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
index 01b1db1..bc4c7f4 100644 (file)
@@ -48,9 +48,9 @@
  * Last reviewed on 2005-11-09 (0.9.4)
  */
 
-#include <string.h>             /* memcpy */
 
 #include "gst_private.h"
+#include <string.h>             /* memcpy */
 #include "gsterror.h"
 #include "gstenumtypes.h"
 #include "gstinfo.h"
index 5532c7a..0098c6b 100644 (file)
@@ -29,9 +29,9 @@
  * gst-launch utillity.
  */
 
-#include <string.h>
 
 #include "gst_private.h"
+#include <string.h>
 
 #include "gstparse.h"
 #include "gstinfo.h"
index 94225e4..1f0860d 100644 (file)
@@ -58,9 +58,9 @@
  *
  * Last reviewed on 2006-02-14 (0.10.4)
  */
-#include <string.h>
 
 #include "gst_private.h"
+#include <string.h>
 #include "gstquery.h"
 #include "gstvalue.h"
 #include "gstenumtypes.h"
index 590b10d..1a62f7b 100644 (file)
  * When defining own plugins, use the GST_BOILERPLATE ease gobject creation.
  */
 
+#include "gst_private.h"
 #include <stdio.h>
 #include <string.h>
 
-#include "gst_private.h"
 #include "gstghostpad.h"
 #include "gstutils.h"
 #include "gstinfo.h"
index 9b74e70..1690738 100644 (file)
@@ -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 <config.h>' >> 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 <config.h>' >> 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
+
index 0179224..455a03f 100644 (file)
@@ -92,9 +92,9 @@
  * Last reviewed on 2006-03-07 (0.10.4).
  */
 
-#include <string.h>
 
 #include "gstadapter.h"
+#include <string.h>
 
 /* default size for the assembled data buffer */
 #define DEFAULT_SIZE 16
index 1163bef..10f0396 100644 (file)
  * </refsect2>
  */
 
-#include <stdlib.h>
-#include <string.h>
-
 #ifdef HAVE_CONFIG_H
 #  include "config.h"
 #endif
 
+#include <stdlib.h>
+#include <string.h>
+
 #include "gstbasesrc.h"
 #include "gsttypefindhelper.h"
 #include <gst/gstmarshal.h>
index 232c0a1..6f640ef 100644 (file)
  * base class.
  */
 
-#include <stdlib.h>
-#include <string.h>
-
 #ifdef HAVE_CONFIG_H
 #  include "config.h"
 #endif
 
+#include <stdlib.h>
+#include <string.h>
+
 #include "gstpushsrc.h"
 #include "gsttypefindhelper.h"
 #include <gst/gstmarshal.h>
index 5d9ad8b..0d709d2 100644 (file)
  * typefinding in push mode from a chain function.
  */
 
-#include <stdlib.h>
-#include <string.h>
-
 #ifdef HAVE_CONFIG_H
 #  include "config.h"
 #endif
 
+#include <stdlib.h>
+#include <string.h>
+
 #include "gsttypefindhelper.h"
 
 static gint
index 9084e1c..28cd63a 100644 (file)
  * </refsect2>
  */
 
-#include <stdlib.h>
-#include <string.h>
-
 #ifdef HAVE_CONFIG_H
 #  include "config.h"
 #endif
 
+#include <stdlib.h>
+#include <string.h>
+
 #include "gstfakesrc.h"
 #include <gst/gstmarshal.h>
 
index cd24d42..58833c1 100644 (file)
  */
 
 
-#include <stdlib.h>
-
 #ifdef HAVE_CONFIG_H
 #  include "config.h"
 #endif
 
+#include <stdlib.h>
+
 #include "../../gst/gst-i18n-lib.h"
 #include "gstidentity.h"
 #include <gst/gstmarshal.h>