[xiph-cvs] cvs commit: libshout/src shout_private.h

Brendan brendan at xiph.org
Mon Mar 17 17:15:12 PST 2003



brendan     03/03/17 20:15:12

  Modified:    .        configure.in
               src      shout_private.h
  Log:
  Move uint type checking into config.h from shout_private.h
  Guard config.h against multiple inclusion.

Revision  Changes    Path
1.33      +23 -1     libshout/configure.in

Index: configure.in
===================================================================
RCS file: /usr/local/cvsroot/libshout/configure.in,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- configure.in	18 Mar 2003 00:16:45 -0000	1.32
+++ configure.in	18 Mar 2003 01:15:11 -0000	1.33
@@ -1,5 +1,5 @@
 # Process this file with autoconf to produce a configure script.
-# $Id: configure.in,v 1.32 2003/03/18 00:16:45 brendan Exp $
+# $Id: configure.in,v 1.33 2003/03/18 01:15:11 brendan Exp $
 
 m4_define(libshout_major, 2)
 m4_define(libshout_minor, 0)
@@ -12,6 +12,10 @@
 AC_PREREQ(2.52)
 AC_CONFIG_SRCDIR([src/shout.c])
 AM_CONFIG_HEADER(config.h)
+# config.h guard
+AH_TOP([#ifndef __CONFIG_H__
+#define __CONFIG_H__ 1])
+AH_BOTTOM([#endif])
 
 AC_DEFINE([LIBSHOUT_MAJOR], libshout_major, [Shout library major version])
 AC_DEFINE([LIBSHOUT_MINOR], libshout_minor, [Shout library minor version])
@@ -69,6 +73,24 @@
    AC_CHECK_SIZEOF(int)
    AC_CHECK_SIZEOF(long)
    AC_CHECK_SIZEOF(long long)])
+AH_VERBATIM([X_HAVE_C99_INTTYPES],
+  [#ifndef HAVE_C99_INTTYPES
+#  if SIZEOF_SHORT == 4
+typedef unsigned short uint32_t;
+#  elif SIZEOF_INT == 4
+typedef unsigned int uint32_t;
+#  elif SIZEOF_LONG == 4
+typedef unsigned long uint32_t;
+#  endif
+#  if SIZEOF_INT == 8
+typedef unsigned int uint64_t;
+#  elif SIZEOF_LONG == 8
+typedef unsigned long uint64_t;
+#  elif SIZEOF_LONG_LONG == 8
+typedef unsigned long long uint64_t;
+#  endif
+#endif])
+
 AC_CHECK_TYPES([socklen_t],,,
   [#if HAVE_SYS_TYPES_H
 # include <sys/types.h>

<p><p>1.11      +4 -17     libshout/src/shout_private.h

Index: shout_private.h
===================================================================
RCS file: /usr/local/cvsroot/libshout/src/shout_private.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- shout_private.h	9 Mar 2003 22:56:45 -0000	1.10
+++ shout_private.h	18 Mar 2003 01:15:12 -0000	1.11
@@ -3,6 +3,10 @@
 #ifndef __LIBSHOUT_SHOUT_PRIVATE_H__
 #define __LIBSHOUT_SHOUT_PRIVATE_H__
 
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include <shout/shout.h>
 #include <net/sock.h>
 #include <timing/timing.h>
@@ -13,23 +17,6 @@
 #  include <stdint.h>
 #elif defined (HAVE_INTTYPES_H)
 #  include <inttypes.h>
-#endif
-
-#ifndef HAVE_C99_INTTYPES
-#  if SIZEOF_SHORT == 4
-typedef unsigned short uint32_t;
-#  elif SIZEOF_INT == 4
-typedef unsigned int uint32_t;
-#  elif SIZEOF_LONG == 4
-typedef unsigned long uint32_t;
-#  endif
-#  if SIZEOF_INT == 8
-typedef unsigned int uint64_t;
-#  elif SIZEOF_LONG == 8
-typedef unsigned long uint64_t;
-#  elif SIZEOF_LONG_LONG == 8
-typedef unsigned long long uint64_t;
-#  endif
 #endif
 
 #define LIBSHOUT_DEFAULT_HOST "localhost"

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list