[xiph-cvs] cvs commit: timing timing.c timing.h

Jack Moffitt jack at xiph.org
Sat Oct 20 14:28:10 PDT 2001



jack        01/10/20 14:28:10

  Modified:    .        configure.in
               src      connection.h
               .        timing.c timing.h
  Added:       src      compat.h
  Log:
  Add check for stdint.h, since Solaris doesn't have it.  This is needed
  on Linux for uint64_t, but Solaris defines this in sys/types.h.  Use check
  where appropriate, and also add typedefs for Win32.

Revision  Changes    Path
1.3       +2 -0      icecast/configure.in

Index: configure.in
===================================================================
RCS file: /usr/local/cvsroot/icecast/configure.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- configure.in	2001/09/10 02:55:41	1.2
+++ configure.in	2001/10/20 21:28:08	1.3
@@ -61,6 +61,8 @@
 dnl Checks for header files.
 AC_HEADER_STDC
 
+AC_CHECK_HEADER(stdint.h, AC_DEFINE(HAVE_STDINT_H, 1),,)
+
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
 

1.4       +2 -1      icecast/src/connection.h

Index: connection.h
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/connection.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- connection.h	2001/10/20 06:51:29	1.3
+++ connection.h	2001/10/20 21:28:09	1.4
@@ -1,7 +1,8 @@
 #ifndef __CONNECTION_H__
 #define __CONNECTION_H__
 
-#include <stdint.h>
+#include <sys/types.h>
+#include "compat.h"
 
 typedef struct connection_tag
 {

1.1                  icecast/src/compat.h

Index: compat.h
===================================================================
/* compat.h
 * 
 * This file contains most of the ugliness for header portability
 * and common types across various systems like Win32, Linux and
 * Solaris.
 */

/* Make sure we define 64 bit types */
#ifdef _WIN32
#  define int64_t __int64
#  define uint64_t unsigned __int64
#else
#  ifdef HAVE_STDINT_H
#    include <stdint.h>
#  endif
#endif

1.4       +4 -2      timing/timing.c

Index: timing.c
===================================================================
RCS file: /usr/local/cvsroot/timing/timing.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- timing.c	2001/10/20 05:05:19	1.3
+++ timing.c	2001/10/20 21:28:09	1.4
@@ -3,13 +3,15 @@
 */
 
 #include <stdlib.h>
-#include <stdint.h>
 #include <sys/types.h>
 #include <sys/time.h>
 #include <unistd.h>
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
 
 #ifdef _WIN32
-#include <mmsystem.h>
+# include <mmsystem.h>
 #endif
 
 #include "timing.h"

1.3       +8 -1      timing/timing.h

Index: timing.h
===================================================================
RCS file: /usr/local/cvsroot/timing/timing.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- timing.h	2001/10/20 05:03:24	1.2
+++ timing.h	2001/10/20 21:28:09	1.3
@@ -1,7 +1,14 @@
 #ifndef __TIMING_H__
 #define __TIMING_H__
 
-#include <stdint.h>
+#include <sys/types.h>
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef _WIN32
+typedef int64_t __int64;
+typedef uint64_t unsigned __int64;
+#endif
 
 uint64_t timing_get_time(void);
 void timing_sleep(uint64_t sleeptime);

--- >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