Bug 505227 - Don't use config_win32.h on MinGW in liboggz. r+cpearce,sr+doublec
authorJacek Caban <jacek@codeweavers.com>
Mon, 20 Jul 2009 16:01:52 +0200
changeset 30764 a677f3cdfaf3540778e5ca9d1745cea97a3286e9
parent 30763 a5d741a123275d6b5bafd9bd8669f591445a5a25
child 30765 935b2a87e42fdcf7e6ad7078dc888497a4857204
push idunknown
push userunknown
push dateunknown
bugs505227
milestone1.9.2a1pre
Bug 505227 - Don't use config_win32.h on MinGW in liboggz. r+cpearce,sr+doublec
media/liboggz/endian.patch
media/liboggz/include/oggz/config.h
media/liboggz/include/oggz/config_gcc.h
media/liboggz/include/oggz/config_win32.h
media/liboggz/src/liboggz/dirac.c
media/liboggz/src/liboggz/metric_internal.c
media/liboggz/src/liboggz/oggz.c
media/liboggz/src/liboggz/oggz_auto.c
media/liboggz/src/liboggz/oggz_byteorder.h
media/liboggz/src/liboggz/oggz_comments.c
media/liboggz/src/liboggz/oggz_compat.h
media/liboggz/src/liboggz/oggz_dlist.c
media/liboggz/src/liboggz/oggz_io.c
media/liboggz/src/liboggz/oggz_read.c
media/liboggz/src/liboggz/oggz_seek.c
media/liboggz/src/liboggz/oggz_stream.c
media/liboggz/src/liboggz/oggz_table.c
media/liboggz/src/liboggz/oggz_vector.c
media/liboggz/src/liboggz/oggz_write.c
media/liboggz/update.sh
--- a/media/liboggz/endian.patch
+++ b/media/liboggz/endian.patch
@@ -1,13 +1,12 @@
 diff --git a/media/liboggz/include/oggz/config.h b/media/liboggz/include/oggz/config.h
 index d645685..19d20f5 100644
---- a/media/liboggz/include/oggz/config.h
-+++ b/media/liboggz/include/oggz/config.h
+--- a/media/liboggz/include/oggz/config_gcc.h
++++ b/media/liboggz/include/oggz/config_gcc.h
 @@ -126,3 +126,8 @@
  /* Define to `unsigned int' if <sys/types.h> does not define. */
  /* #undef size_t */
- #undef DEBUG
 +
 +#include "prcpucfg.h"
 +#ifdef IS_BIG_ENDIAN
 +#define WORDS_BIGENDIAN
 +#endif
--- a/media/liboggz/include/oggz/config.h
+++ b/media/liboggz/include/oggz/config.h
@@ -1,154 +1,6 @@
-/* config.h.  Generated from config.h.in by configure.  */
-/* config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* Define if building universal (internal helper macro) */
-/* #undef AC_APPLE_UNIVERSAL_BUILD */
-
-/* Define if the compiler implements enums as signed values. */
-/* #undef ALLOW_SIGNED_ENUMS */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* Define to 1 if you have the <fcntl.h> header file. */
-#define HAVE_FCNTL_H 1
-
-/* Define to 1 if you have the 'getopt_long' function */
-#define HAVE_GETOPT_LONG /**/
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the `memmove' function. */
-#define HAVE_MEMMOVE 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if your system has a GNU libc compatible `realloc' function,
-   and to 0 otherwise. */
-#define HAVE_REALLOC 1
-
-/* Define to 1 if the system has the type `ssize_t'. */
-#define HAVE_SSIZE_T 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
-   */
-#define LT_OBJDIR ".libs/"
-
-/* Define to build experimental code */
-/* #undef OGGZ_CONFIG_EXPERIMENTAL */
-
-/* Do not build reading support */
-#define OGGZ_CONFIG_READ 1
-
-/* Do not build writing support */
-#define OGGZ_CONFIG_WRITE 1
-
-/* Set to maximum allowed value of sf_count_t type. */
-#define OGGZ_OFF_MAX 0x7FFFFFFFFFFFFFFFLL
-
-/* Define if <ogg/ogg.h> is const-correct */
-#define OGG_H_CONST_CORRECT /**/
-
-/* Name of package */
-#define PACKAGE "liboggz"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT ""
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME ""
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING ""
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME ""
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION ""
-
-/* The size of `loff_t', as computed by sizeof. */
-#define SIZEOF_LOFF_T 8
-
-/* The size of `off64_t', as computed by sizeof. */
-#define SIZEOF_OFF64_T 0
-
-/* The size of `off_t', as computed by sizeof. */
-#define SIZEOF_OFF_T 8
-
-/* Set to sizeof (long) if unknown. */
-#define SIZEOF_OGGZ_OFF_T 8
-
-/* The size of `ssize_t', as computed by sizeof. */
-#define SIZEOF_SSIZE_T 4
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Version number of package */
-#define VERSION "0.9.9"
-
-/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
-   significant byte first (like Motorola and SPARC, unlike Intel). */
-#if defined AC_APPLE_UNIVERSAL_BUILD
-# if defined __BIG_ENDIAN__
-#  define WORDS_BIGENDIAN 1
-# endif
+#if defined(WIN32) && !defined(__GNUC__)
+#include "config_win32.h"
 #else
-# ifndef WORDS_BIGENDIAN
-/* #  undef WORDS_BIGENDIAN */
-# endif
+#include "config_gcc.h"
 #endif
-
-/* Number of bits in a file offset, on hosts where this is settable. */
-#define _FILE_OFFSET_BITS 64
-
-/* Define to make fseeko etc. visible, on some hosts. */
-#define _LARGEFILE_SOURCE 1
-
-/* Define for large files, on AIX-style hosts. */
-/* #undef _LARGE_FILES */
-
-/* Some systems need _XOPEN_SOURCE for timezone */
-/* #undef _XOPEN_SOURCE */
-
-/* Define to empty if `const' does not conform to ANSI C. */
-/* #undef const */
-
-/* Define to `long int' if <sys/types.h> does not define. */
-/* #undef off_t */
-
-/* Define to rpl_realloc if the replacement function should be used. */
-/* #undef realloc */
-
-/* Define to `unsigned int' if <sys/types.h> does not define. */
-/* #undef size_t */
 #undef DEBUG
-
-#include "prcpucfg.h"
-#ifdef IS_BIG_ENDIAN
-#define WORDS_BIGENDIAN
-#endif
new file mode 100644
--- /dev/null
+++ b/media/liboggz/include/oggz/config_gcc.h
@@ -0,0 +1,153 @@
+/* config.h.  Generated from config.h.in by configure.  */
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define if building universal (internal helper macro) */
+/* #undef AC_APPLE_UNIVERSAL_BUILD */
+
+/* Define if the compiler implements enums as signed values. */
+/* #undef ALLOW_SIGNED_ENUMS */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the 'getopt_long' function */
+#define HAVE_GETOPT_LONG /**/
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `memmove' function. */
+#define HAVE_MEMMOVE 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if your system has a GNU libc compatible `realloc' function,
+   and to 0 otherwise. */
+#define HAVE_REALLOC 1
+
+/* Define to 1 if the system has the type `ssize_t'. */
+#define HAVE_SSIZE_T 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#define LT_OBJDIR ".libs/"
+
+/* Define to build experimental code */
+/* #undef OGGZ_CONFIG_EXPERIMENTAL */
+
+/* Do not build reading support */
+#define OGGZ_CONFIG_READ 1
+
+/* Do not build writing support */
+#define OGGZ_CONFIG_WRITE 1
+
+/* Set to maximum allowed value of sf_count_t type. */
+#define OGGZ_OFF_MAX 0x7FFFFFFFFFFFFFFFLL
+
+/* Define if <ogg/ogg.h> is const-correct */
+#define OGG_H_CONST_CORRECT /**/
+
+/* Name of package */
+#define PACKAGE "liboggz"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME ""
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING ""
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION ""
+
+/* The size of `loff_t', as computed by sizeof. */
+#define SIZEOF_LOFF_T 8
+
+/* The size of `off64_t', as computed by sizeof. */
+#define SIZEOF_OFF64_T 0
+
+/* The size of `off_t', as computed by sizeof. */
+#define SIZEOF_OFF_T 8
+
+/* Set to sizeof (long) if unknown. */
+#define SIZEOF_OGGZ_OFF_T 8
+
+/* The size of `ssize_t', as computed by sizeof. */
+#define SIZEOF_SSIZE_T 4
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Version number of package */
+#define VERSION "0.9.9"
+
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+   significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+#  define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+/* #  undef WORDS_BIGENDIAN */
+# endif
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#define _FILE_OFFSET_BITS 64
+
+#include "prcpucfg.h"
+#ifdef IS_BIG_ENDIAN
+#define WORDS_BIGENDIAN
+#endif
+
+/* Define to make fseeko etc. visible, on some hosts. */
+#define _LARGEFILE_SOURCE 1
+
+/* Define for large files, on AIX-style hosts. */
+/* #undef _LARGE_FILES */
+
+/* Some systems need _XOPEN_SOURCE for timezone */
+/* #undef _XOPEN_SOURCE */
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to `long int' if <sys/types.h> does not define. */
+/* #undef off_t */
+
+/* Define to rpl_realloc if the replacement function should be used. */
+/* #undef realloc */
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+/* #undef size_t */
--- a/media/liboggz/include/oggz/config_win32.h
+++ b/media/liboggz/include/oggz/config_win32.h
@@ -130,10 +130,9 @@
 #undef realloc
 
 /* Define to `unsigned' if <sys/types.h> does not define. */
 #undef size_t
 
 /* Define for MSVC as <stdint.h> is unavailable there */
 typedef unsigned char uint8_t;
 
-#define inline __inline // MSVC
-#undef DEBUG
+#define inline __inline // MSVC
\ No newline at end of file
--- a/media/liboggz/src/liboggz/dirac.c
+++ b/media/liboggz/src/liboggz/dirac.c
@@ -1,17 +1,13 @@
 /*
   dirac.c
 */
 
-#ifdef WIN32
-#include "config_win32.h"
-#else
-#include "config.h"
-#endif
+#include "config.h"
 
 #ifdef HAVE_STDINT_H
 #include <stdint.h>
 #endif
 
 #include "dirac.h"
 
 
--- a/media/liboggz/src/liboggz/metric_internal.c
+++ b/media/liboggz/src/liboggz/metric_internal.c
@@ -25,21 +25,17 @@
    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-#ifdef WIN32
-#include "config_win32.h"
-#else
 #include "config.h"
-#endif
 
 #include "oggz_private.h"
 
 #include <oggz/oggz_stream.h>
 
 static ogg_int64_t
 oggz_metric_dirac (OGGZ * oggz, long serialno,
                    ogg_int64_t granulepos, void * user_data)
--- a/media/liboggz/src/liboggz/oggz.c
+++ b/media/liboggz/src/liboggz/oggz.c
@@ -25,21 +25,17 @@
    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-#ifdef WIN32
-#include "config_win32.h"
-#else
 #include "config.h"
-#endif
 
 #include <assert.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 
 #ifdef HAVE_UNISTD_H
--- a/media/liboggz/src/liboggz/oggz_auto.c
+++ b/media/liboggz/src/liboggz/oggz_auto.c
@@ -31,21 +31,17 @@
 */
 
 /*
  * oggz_auto.c
  *
  * Conrad Parker <conrad@annodex.net>
  */
 
-#ifdef WIN32
-#include "config_win32.h"
-#else
 #include "config.h"
-#endif
 
 #include <stdlib.h>
 #include <string.h>
 
 #include "oggz_private.h"
 #include "oggz_byteorder.h"
 #include "dirac.h"
 
--- a/media/liboggz/src/liboggz/oggz_byteorder.h
+++ b/media/liboggz/src/liboggz/oggz_byteorder.h
@@ -28,21 +28,17 @@
    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
 #ifndef __OGGZ_BYTEORDER_H__
 #define __OGGZ_BYTEORDER_H__
 
-#ifdef WIN32
-#include "config_win32.h"
-#else
 #include "config.h"
-#endif
 
 #ifdef _UNUSED_
 static  unsigned short
 _le_16 (unsigned short s)
 {
   unsigned short ret=s;
 #ifdef WORDS_BIGENDIAN
   ret = (s>>8) & 0x00ffU;
--- a/media/liboggz/src/liboggz/oggz_comments.c
+++ b/media/liboggz/src/liboggz/oggz_comments.c
@@ -25,21 +25,17 @@
    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-#ifdef WIN32
-#include "config_win32.h"
-#else
 #include "config.h"
-#endif
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <limits.h> /* ULONG_MAX */
 #ifndef WIN32
 #include <strings.h>
 #endif
--- a/media/liboggz/src/liboggz/oggz_compat.h
+++ b/media/liboggz/src/liboggz/oggz_compat.h
@@ -25,19 +25,15 @@
    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-#ifdef WIN32
-#include "config_win32.h"
-#else
 #include "config.h"
-#endif
 
 #ifndef WIN32
 #  define oggz_stat_regular(mode) (S_ISREG((mode)) || S_ISLNK((mode)))
 #else
 #  define oggz_stat_regular(mode) ((mode) & S_IFREG)
 #endif
--- a/media/liboggz/src/liboggz/oggz_dlist.c
+++ b/media/liboggz/src/liboggz/oggz_dlist.c
@@ -25,21 +25,17 @@
    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-#ifdef WIN32
-#include "config_win32.h"
-#else
 #include "config.h"
-#endif
 #include <stdlib.h>
 
 #include "oggz_dlist.h"
 #include "oggz_macros.h"
 
 typedef struct OggzDListElem {
   struct OggzDListElem  * next;
   struct OggzDListElem  * prev;
--- a/media/liboggz/src/liboggz/oggz_io.c
+++ b/media/liboggz/src/liboggz/oggz_io.c
@@ -31,21 +31,17 @@
 */
 
 /*
  * oggz_io.c
  *
  * Conrad Parker <conrad@annodex.net>
  */
 
-#ifdef WIN32
-#include "config_win32.h"
-#else
 #include "config.h"
-#endif
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
 
 #include "oggz_compat.h"
 #include "oggz_private.h"
--- a/media/liboggz/src/liboggz/oggz_read.c
+++ b/media/liboggz/src/liboggz/oggz_read.c
@@ -31,21 +31,17 @@
 */
 
 /*
  * oggz_read.c
  *
  * Conrad Parker <conrad@annodex.net>
  */
 
-#ifdef WIN32
-#include "config_win32.h"
-#else
 #include "config.h"
-#endif
 
 #if OGGZ_CONFIG_READ
 
 #include <assert.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
--- a/media/liboggz/src/liboggz/oggz_seek.c
+++ b/media/liboggz/src/liboggz/oggz_seek.c
@@ -31,21 +31,17 @@
 */
 
 /*
  * oggz_seek.c
  *
  * Conrad Parker <conrad@annodex.net>
  */
 
-#ifdef WIN32
-#include "config_win32.h"
-#else
 #include "config.h"
-#endif
 
 #if OGGZ_CONFIG_READ
 
 #include <assert.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
--- a/media/liboggz/src/liboggz/oggz_stream.c
+++ b/media/liboggz/src/liboggz/oggz_stream.c
@@ -25,21 +25,17 @@
    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-#ifdef WIN32
-#include "config_win32.h"
-#else
 #include "config.h"
-#endif
 
 #include "oggz_private.h"
 
 int
 oggz_stream_set_content (OGGZ * oggz, long serialno, int content)
 {
   oggz_stream_t * stream;
 
--- a/media/liboggz/src/liboggz/oggz_table.c
+++ b/media/liboggz/src/liboggz/oggz_table.c
@@ -25,21 +25,17 @@
    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-#ifdef WIN32
-#include "config_win32.h"
-#else
 #include "config.h"
-#endif
 
 #include <stdlib.h>
 #include "oggz_macros.h"
 #include "oggz_vector.h"
 
 typedef struct _OggzTable OggzTable;
 
 struct _OggzTable {
--- a/media/liboggz/src/liboggz/oggz_vector.c
+++ b/media/liboggz/src/liboggz/oggz_vector.c
@@ -25,21 +25,17 @@
    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-#ifdef WIN32
-#include "config_win32.h"
-#else
 #include "config.h"
-#endif
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
 #include "oggz_macros.h"
 
 typedef int (*OggzFunc) (void * data);
--- a/media/liboggz/src/liboggz/oggz_write.c
+++ b/media/liboggz/src/liboggz/oggz_write.c
@@ -25,21 +25,17 @@
    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-#ifdef WIN32
-#include "config_win32.h"
-#else
 #include "config.h"
-#endif
 
 #if OGGZ_CONFIG_WRITE
 
 #include <assert.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
--- a/media/liboggz/update.sh
+++ b/media/liboggz/update.sh
@@ -1,53 +1,58 @@
 # Usage: cp $1/update.sh <liboggz_src_directory>
 #
 # Copies the needed files from a directory containing the original
 # liboggz source that we need for the Mozilla HTML5 media support.
-cp $1/config.h ./include/oggz/config.h
-echo "#undef DEBUG" >>./include/oggz/config.h
+cp $1/config.h ./include/oggz/config_gcc.h
 cp $1/win32/config.h ./include/oggz/config_win32.h
-echo >>./include/oggz/config_win32.h
-echo "#undef DEBUG" >>./include/oggz/config_win32.h
+cat >./include/oggz/config.h <<EOF
+#if defined(WIN32) && !defined(__GNUC__)
+#include "config_win32.h"
+#else
+#include "config_gcc.h"
+#endif
+#undef DEBUG
+EOF
 cp $1/include/oggz/oggz_write.h ./include/oggz/oggz_write.h
 cp $1/include/oggz/oggz_io.h ./include/oggz/oggz_io.h
 cp $1/include/oggz/oggz_seek.h ./include/oggz/oggz_seek.h
 cp $1/include/oggz/oggz_comments.h ./include/oggz/oggz_comments.h
 cp $1/include/oggz/oggz_read.h ./include/oggz/oggz_read.h
 cp $1/include/oggz/oggz_off_t.h ./include/oggz/oggz_off_t.h
 cp $1/include/oggz/oggz_table.h ./include/oggz/oggz_table.h
 cp $1/include/oggz/oggz.h ./include/oggz/oggz.h
 cp $1/include/oggz/oggz_constants.h ./include/oggz/oggz_constants.h
 cp $1/include/oggz/oggz_deprecated.h ./include/oggz/oggz_deprecated.h
 cp $1/include/oggz/oggz_stream.h ./include/oggz/oggz_stream.h
 cp $1/COPYING ./COPYING
 cp $1/README ./README
 cp $1/ChangeLog ./ChangeLog
-sed s/\#include\ \"config.h\"/\#ifdef\ WIN32\\n\#include\ \"config_win32.h\"\\n\#else\\n\#include\ \"config.h\"\\n\#endif/g $1/src/liboggz/oggz_write.c >./src/liboggz/oggz_write.c
-sed s/\#include\ \"config.h\"/\#ifdef\ WIN32\\n\#include\ \"config_win32.h\"\\n\#else\\n\#include\ \"config.h\"\\n\#endif/g $1/src/liboggz/oggz_table.c >./src/liboggz/oggz_table.c
-sed s/\#include\ \"config.h\"/\#ifdef\ WIN32\\n\#include\ \"config_win32.h\"\\n\#else\\n\#include\ \"config.h\"\\n\#endif/g $1/src/liboggz/oggz_dlist.c >./src/liboggz/oggz_dlist.c
-sed s/\#include\ \"config.h\"/\#ifdef\ WIN32\\n\#include\ \"config_win32.h\"\\n\#else\\n\#include\ \"config.h\"\\n\#endif/g $1/src/liboggz/oggz_auto.c >./src/liboggz/oggz_auto.c
+cp $1/src/liboggz/oggz_write.c ./src/liboggz/oggz_write.c
+cp $1/src/liboggz/oggz_table.c ./src/liboggz/oggz_table.c
+cp $1/src/liboggz/oggz_dlist.c ./src/liboggz/oggz_dlist.c
+cp $1/src/liboggz/oggz_auto.c ./src/liboggz/oggz_auto.c
 cp $1/src/liboggz/oggz_private.h ./src/liboggz/oggz_private.h
-sed s/\#include\ \"config.h\"/\#ifdef\ WIN32\\n\#include\ \"config_win32.h\"\\n\#else\\n\#include\ \"config.h\"\\n\#endif/g $1/src/liboggz/oggz.c >./src/liboggz/oggz.c
-sed s/\#include\ \"config.h\"/\#ifdef\ WIN32\\n\#include\ \"config_win32.h\"\\n\#else\\n\#include\ \"config.h\"\\n\#endif/g $1/src/liboggz/oggz_compat.h >./src/liboggz/oggz_compat.h
-sed s/\#include\ \"config.h\"/\#ifdef\ WIN32\\n\#include\ \"config_win32.h\"\\n\#else\\n\#include\ \"config.h\"\\n\#endif/g $1/src/liboggz/oggz_read.c >./src/liboggz/oggz_read.c
+cp $1/src/liboggz/oggz.c ./src/liboggz/oggz.c
+cp $1/src/liboggz/oggz_compat.h ./src/liboggz/oggz_compat.h
+cp $1/src/liboggz/oggz_read.c ./src/liboggz/oggz_read.c
 cp $1/src/liboggz/oggz_macros.h ./src/liboggz/oggz_macros.h
-sed s/\#include\ \"config.h\"/\#ifdef\ WIN32\\n\#include\ \"config_win32.h\"\\n\#else\\n\#include\ \"config.h\"\\n\#endif/g $1/src/liboggz/oggz_comments.c >./src/liboggz/oggz_comments.c
-sed s/\#include\ \"config.h\"/\#ifdef\ WIN32\\n\#include\ \"config_win32.h\"\\n\#else\\n\#include\ \"config.h\"\\n\#endif/g $1/src/liboggz/oggz_byteorder.h >./src/liboggz/oggz_byteorder.h
-sed s/\#include\ \"config.h\"/\#ifdef\ WIN32\\n\#include\ \"config_win32.h\"\\n\#else\\n\#include\ \"config.h\"\\n\#endif/g $1/src/liboggz/oggz_stream.c >./src/liboggz/oggz_stream.c
+cp $1/src/liboggz/oggz_comments.c ./src/liboggz/oggz_comments.c
+cp $1/src/liboggz/oggz_byteorder.h ./src/liboggz/oggz_byteorder.h
+cp $1/src/liboggz/oggz_stream.c ./src/liboggz/oggz_stream.c
 cp $1/src/liboggz/oggz_stream_private.h ./src/liboggz/oggz_stream_private.h
 cp $1/src/liboggz/oggz_vector.h ./src/liboggz/oggz_vector.h
 cp $1/src/liboggz/oggz_auto.h ./src/liboggz/oggz_auto.h
-sed s/\#include\ \"config.h\"/\#ifdef\ WIN32\\n\#include\ \"config_win32.h\"\\n\#else\\n\#include\ \"config.h\"\\n\#endif/g $1/src/liboggz/oggz_io.c >./src/liboggz/oggz_io.c
-sed s/\#include\ \"config.h\"/\#ifdef\ WIN32\\n\#include\ \"config_win32.h\"\\n\#else\\n\#include\ \"config.h\"\\n\#endif/g $1/src/liboggz/oggz_vector.c >./src/liboggz/oggz_vector.c
-sed s/\#include\ \"config.h\"/\#ifdef\ WIN32\\n\#include\ \"config_win32.h\"\\n\#else\\n\#include\ \"config.h\"\\n\#endif/g $1/src/liboggz/oggz_seek.c >./src/liboggz/oggz_seek.c
+cp $1/src/liboggz/oggz_io.c ./src/liboggz/oggz_io.c
+cp $1/src/liboggz/oggz_vector.c ./src/liboggz/oggz_vector.c
+cp $1/src/liboggz/oggz_seek.c ./src/liboggz/oggz_seek.c
 cp $1/src/liboggz/oggz_dlist.h ./src/liboggz/oggz_dlist.h
-sed s/\#include\ \"config.h\"/\#ifdef\ WIN32\\n\#include\ \"config_win32.h\"\\n\#else\\n\#include\ \"config.h\"\\n\#endif/g $1/src/liboggz/metric_internal.c >./src/liboggz/metric_internal.c
+cp $1/src/liboggz/metric_internal.c ./src/liboggz/metric_internal.c
 cp $1/src/liboggz/dirac.h ./src/liboggz/dirac.h
-sed s/\#include\ \"config.h\"/\#ifdef\ WIN32\\n\#include\ \"config_win32.h\"\\n\#else\\n\#include\ \"config.h\"\\n\#endif/g $1/src/liboggz/dirac.c >./src/liboggz/dirac.c
+cp $1/src/liboggz/dirac.c ./src/liboggz/dirac.c
 cp $1/AUTHORS ./AUTHORS
 patch -p3 <wince.patch
 patch -p3 <endian.patch
 patch -p3 <bounded_seek.patch
 patch -p3 <key_frame_seek.patch
 patch -p3 <offset_next.patch
 patch -p3 <bug487519.patch
 patch -p3 <bug496063.patch