[xiph-commits] r2957 - in liboggz/trunk: . include/oggz src/liboggz
conrad at svn.annodex.net
conrad at svn.annodex.net
Sat Jun 16 04:59:04 PDT 2007
Author: conrad
Date: 2007-06-16 04:59:04 -0700 (Sat, 16 Jun 2007)
New Revision: 2957
Added:
liboggz/trunk/include/oggz/oggz_off_t_generated.h.in
Removed:
liboggz/trunk/include/oggz/oggz_off_t.h.in
liboggz/trunk/include/oggz/oggz_off_t_win32.h
Modified:
liboggz/trunk/configure.ac
liboggz/trunk/include/oggz/Makefile.am
liboggz/trunk/include/oggz/oggz.h
liboggz/trunk/include/oggz/oggz_off_t.h
liboggz/trunk/src/liboggz/oggz_private.h
Log:
Clean up declarations for oggz_off_t:
* Remove redundant copies of PRI_OGGZ_OFF_T definition
* Move win32 defines straight into oggz_off_t.h
* Rename generated file to oggz_off_t_generated.h
This allows user code (and oggz.h) to include <oggz/oggz_off_t.h> without
checking platform availability.
Modified: liboggz/trunk/configure.ac
===================================================================
--- liboggz/trunk/configure.ac 2007-06-16 10:24:33 UTC (rev 2956)
+++ liboggz/trunk/configure.ac 2007-06-16 11:59:04 UTC (rev 2957)
@@ -242,11 +242,21 @@
if test $SIZEOF_OGGZ_OFF_T = 4 ; then
OGGZ_OFF_MAX="0x7FFFFFFF"
+ PRI_OGGZ_OFF_T="l"
+elif test $SIZEOF_OGGZ_OFF_T = 8 ; then
+ PRI_OGGZ_OFF_T="q"
fi
-AC_DEFINE_UNQUOTED([TYPEOF_OGGZ_OFF_T],${TYPEOF_OGGZ_OFF_T}, [Set to long if unknown.])
+dnl The following configured variables are written into the public header
+dnl <oggz/oggz_off_t_generated.h>:
+dnl oggz_off_t (typedef)
+dnl PRI_OGGZ_OFF_T (printf format)
+
+dnl AC_DEFINE_UNQUOTED([TYPEOF_OGGZ_OFF_T],${TYPEOF_OGGZ_OFF_T}, [Set to long if unknown.])
AC_SUBST(TYPEOF_OGGZ_OFF_T)
+AC_SUBST(PRI_OGGZ_OFF_T)
+
AC_DEFINE_UNQUOTED([SIZEOF_OGGZ_OFF_T],${SIZEOF_OGGZ_OFF_T}, [Set to sizeof (long) if unknown.])
AC_SUBST(SIZEOF_OGGZ_OFF_T)
@@ -362,7 +372,7 @@
doc/Doxyfile
include/Makefile
include/oggz/Makefile
-include/oggz/oggz_off_t.h
+include/oggz/oggz_off_t_generated.h
src/Makefile
src/liboggz/Version_script
src/liboggz/Makefile
Modified: liboggz/trunk/include/oggz/Makefile.am
===================================================================
--- liboggz/trunk/include/oggz/Makefile.am 2007-06-16 10:24:33 UTC (rev 2956)
+++ liboggz/trunk/include/oggz/Makefile.am 2007-06-16 11:59:04 UTC (rev 2957)
@@ -1,8 +1,11 @@
## Process this file with automake to produce Makefile.in
+EXTRA_DIST = oggz_off_t_generated.h.in
+
# Include files to install
oggzincludedir = $(includedir)/oggz
oggzinclude_HEADERS = oggz.h oggz_comments.h oggz_constants.h oggz_read.h \
oggz_seek.h oggz_write.h oggz_io.h oggz_table.h oggz_deprecated.h \
- oggz_off_t.h
+ oggz_off_t.h oggz_off_t_generated.h
+BUILT_SOURCES = oggz_off_t_generated.h
Modified: liboggz/trunk/include/oggz/oggz.h
===================================================================
--- liboggz/trunk/include/oggz/oggz.h 2007-06-16 10:24:33 UTC (rev 2956)
+++ liboggz/trunk/include/oggz/oggz.h 2007-06-16 11:59:04 UTC (rev 2957)
@@ -563,18 +563,12 @@
*/
long oggz_serialno_new (OGGZ * oggz);
-/* define appropriate type for oggz_off_t */
-#ifdef _WIN32
-#include <oggz/oggz_off_t_win32.h>
-#else
#include <oggz/oggz_off_t.h>
-#endif
-
-#include <oggz/oggz_comments.h>
#include <oggz/oggz_read.h>
#include <oggz/oggz_seek.h>
#include <oggz/oggz_write.h>
#include <oggz/oggz_io.h>
+#include <oggz/oggz_comments.h>
#include <oggz/oggz_deprecated.h>
#ifdef __cplusplus
Modified: liboggz/trunk/include/oggz/oggz_off_t.h
===================================================================
--- liboggz/trunk/include/oggz/oggz_off_t.h 2007-06-16 10:24:33 UTC (rev 2956)
+++ liboggz/trunk/include/oggz/oggz_off_t.h 2007-06-16 11:59:04 UTC (rev 2957)
@@ -34,44 +34,18 @@
#define __OGGZ_OFF_T_H__
/** \file
- * Support for Large File Sizes on systems supporting 64-bit off_t types.
- *
- * This file is included by all files using loff_t for file
- * position e.g.: \link config.h <config.h> \endlink,
- * except on non-GNU Win32 systems \link ogg_off_t_w32.h \endlink is included
- * instead.
- *
- * This file should never be included directly by user code.
+ * Architecture-dependent type and printf format for file position.
+ * Allows Large File Sizes on systems supporting 64-bit off_t types.
*/
-/**
- * This typedef was determined on the system on which the documentation
- * was generated.
- *
- * To query this on your system, do eg.
- *
- <pre>
- echo "#include <config.h>" | gcc -E - | grep oggz_off_t
- </pre>
- *
- */
-
#ifdef _WIN32
/* MSVC/Borland & Cygwin */
typedef off_t oggz_off_t;
-#else
-
- /* Linux/BSD/etc. */
-# include <sys/types.h>
- typedef loff_t oggz_off_t;
-#endif
+#define PRI_OGGZ_OFF_T "l"
-/* Note: This is an ugly fix for proper display in printf but will work for now */
-#if SIZEOF_OGGZ_OFF_T == 8
-#define PRI_OGGZ_OFF_T "q"
#else
-#define PRI_OGGZ_OFF_T "l"
+#include <oggz/oggz_off_t_generated.h>
#endif
#endif /* __OGGZ_OFF_T__ */
Deleted: liboggz/trunk/include/oggz/oggz_off_t.h.in
===================================================================
--- liboggz/trunk/include/oggz/oggz_off_t.h.in 2007-06-16 10:24:33 UTC (rev 2956)
+++ liboggz/trunk/include/oggz/oggz_off_t.h.in 2007-06-16 11:59:04 UTC (rev 2957)
@@ -1,77 +0,0 @@
-/*
- Copyright (C) 2007 Commonwealth Scientific and Industrial Research
- Organisation (CSIRO) Australia
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- - Neither the name of CSIRO Australia nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- 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.
-*/
-
-#ifndef __OGGZ_OFF_T_H__
-#define __OGGZ_OFF_T_H__
-
-/** \file
- * Support for Large File Sizes on systems supporting 64-bit off_t types.
- *
- * This file is included by all files using @TYPEOF_OGGZ_OFF_T@ for file
- * position e.g.: \link config.h <config.h> \endlink,
- * except on non-GNU Win32 systems \link ogg_off_t_w32.h \endlink is included
- * instead.
- *
- * This file should never be included directly by user code.
- */
-
-/**
- * This typedef was determined on the system on which the documentation
- * was generated.
- *
- * To query this on your system, do eg.
- *
- <pre>
- echo "#include <config.h>" | gcc -E - | grep oggz_off_t
- </pre>
- *
- */
-
-#ifdef _WIN32
- /* MSVC/Borland & Cygwin */
- typedef off_t oggz_off_t;
-#else
-
- /* Linux/BSD/etc. */
-# include <sys/types.h>
- typedef @TYPEOF_OGGZ_OFF_T@ oggz_off_t;
-
-#endif
-
-/* Note: This is an ugly fix for proper display in printf but will work for now */
-#if SIZEOF_OGGZ_OFF_T == 8
-#define PRI_OGGZ_OFF_T "q"
-#else
-#define PRI_OGGZ_OFF_T "l"
-#endif
-
-#endif /* __OGGZ_OFF_T__ */
Copied: liboggz/trunk/include/oggz/oggz_off_t_generated.h.in (from rev 2956, liboggz/trunk/include/oggz/oggz_off_t.h.in)
===================================================================
--- liboggz/trunk/include/oggz/oggz_off_t_generated.h.in (rev 0)
+++ liboggz/trunk/include/oggz/oggz_off_t_generated.h.in 2007-06-16 11:59:04 UTC (rev 2957)
@@ -0,0 +1,66 @@
+/*
+ Copyright (C) 2007 Commonwealth Scientific and Industrial Research
+ Organisation (CSIRO) Australia
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ - Neither the name of CSIRO Australia nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ 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.
+*/
+
+#ifndef __OGGZ_OFF_T_GENERATED_H__
+#define __OGGZ_OFF_T_GENERATED_H__
+
+/** \file
+ * Architecture-dependent type for oggz_off_t.
+ *
+ * This file should never be included directly by user code. Please include
+ * either of <oggz/oggz.h> or <oggz/oggz_off_t.h> instead.
+ *
+ * This file was generated when liboggz was built.
+ *
+ * Note that this file is only generated when using GNU autoconf.
+ * This file is not used on Win32 systems.
+ */
+
+/**
+ * This typedef was determined on the system on which the documentation
+ * was generated.
+ *
+ * To query this on your system, do eg.
+ *
+ <pre>
+ echo "gcc -E oggz.h | grep oggz_off_t
+ </pre>
+ *
+ */
+
+#include <sys/types.h>
+
+typedef @TYPEOF_OGGZ_OFF_T@ oggz_off_t;
+
+#define PRI_OGGZ_OFF_T "@PRI_OGGZ_OFF_T@"
+
+#endif /* __OGGZ_OFF_T_GENERATED__ */
Deleted: liboggz/trunk/include/oggz/oggz_off_t_win32.h
===================================================================
--- liboggz/trunk/include/oggz/oggz_off_t_win32.h 2007-06-16 10:24:33 UTC (rev 2956)
+++ liboggz/trunk/include/oggz/oggz_off_t_win32.h 2007-06-16 11:59:04 UTC (rev 2957)
@@ -1,77 +0,0 @@
-/*
- Copyright (C) 2007 Commonwealth Scientific and Industrial Research
- Organisation (CSIRO) Australia
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- - Neither the name of CSIRO Australia nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- 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.
-*/
-
-#ifndef __OGGZ_OFF_T_H__
-#define __OGGZ_OFF_T_H__
-
-/** \file
- * Support for Large File Sizes on systems supporting 64-bit off_t types.
- *
- * This file is included by all files using @TYPEOF_OGGZ_OFF_T@ for file
- * position e.g.: \link config.h <config.h> \endlink,
- * except on non-GNU Win32 systems \link ogg_off_t_w32.h \endlink is included
- * instead.
- *
- * This file should never be included directly by user code.
- */
-
-/**
- * This typedef was determined on the system on which the documentation
- * was generated.
- *
- * To query this on your system, do eg.
- *
- <pre>
- echo "#include <config.h>" | gcc -E - | grep oggz_off_t
- </pre>
- *
- */
-
-#ifdef _WIN32
- /* MSVC/Borland & Cygwin */
- typedef off_t oggz_off_t;
-#else
-
- /* Linux/BSD/etc. */
- #include <sys/types.h>
- typedef @TYPEOF_OGGZ_OFF_T@ oggz_off_t;
-
-/* Note: This is an ugly fix for proper display in printf but will work for now */
-#if SIZEOF_OGGZ_OFF_T == 8
-#define PRI_OGGZ_OFF_T "q"
-#else
-#define PRI_OGGZ_OFF_T "l"
-#endif
-
-#endif
-
-#endif /* __OGGZ_OFF_T__ */
Modified: liboggz/trunk/src/liboggz/oggz_private.h
===================================================================
--- liboggz/trunk/src/liboggz/oggz_private.h 2007-06-16 10:24:33 UTC (rev 2956)
+++ liboggz/trunk/src/liboggz/oggz_private.h 2007-06-16 11:59:04 UTC (rev 2957)
@@ -38,13 +38,7 @@
#include <ogg/ogg.h>
#include <oggz/oggz_constants.h>
-
-/* define appropriate type for oggz_off_t */
-#ifdef _WIN32
-#include <oggz/oggz_off_t_win32.h>
-#else
#include <oggz/oggz_off_t.h>
-#endif
#include "oggz_macros.h"
#include "oggz_vector.h"
More information about the commits
mailing list