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

Jack Moffitt jack at xiph.org
Wed Feb 6 17:04:10 PST 2002



jack        02/02/06 17:04:09

  Modified:    src      connection.c logging.h os.h source.c util.c
               .        resolver.c sock.h
               .        thread.c
               .        timing.c timing.h
  Log:
  minor build fixes for win32 courtesy of Oddsock

Revision  Changes    Path
1.7       +2 -0      icecast/src/connection.c

Index: connection.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/connection.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- connection.c	2002/01/21 03:10:37	1.6
+++ connection.c	2002/02/07 01:04:07	1.7
@@ -9,8 +9,10 @@
 #include <sys/socket.h>
 #include <netinet/in.h>
 #else
+#include <winsock2.h>
 #define snprintf _snprintf
 #define strcasecmp stricmp
+#define strncasecmp strnicmp
 #endif
 
 #include "os.h"

<p><p>1.2       +4 -0      icecast/src/logging.h

Index: logging.h
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/logging.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- logging.h	2001/09/10 02:21:49	1.1
+++ logging.h	2002/02/07 01:04:07	1.2
@@ -13,6 +13,10 @@
 ** feel free to add more here if needed. 
 */
 
+#ifdef _WIN32
+#define __FUNCTION__ __FILE__ ":" __LINE__
+#endif
+
 #define ERROR0(y) log_write(errorlog, 1, CATMODULE "/" __FUNCTION__, y)
 #define ERROR1(y, a) log_write(errorlog, 1, CATMODULE "/" __FUNCTION__, y, a)
 #define ERROR2(y, a, b) log_write(errorlog, 1, CATMODULE "/" __FUNCTION__, y, a, b)

<p><p>1.2       +1 -1      icecast/src/os.h

Index: os.h
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/os.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- os.h	2001/09/10 02:21:49	1.1
+++ os.h	2002/02/07 01:04:07	1.2
@@ -8,7 +8,7 @@
 #endif
 
 #ifdef _WIN32
-#define PATH_DEPARATOR "\\"
+#define PATH_SEPARATOR "\\"
 #else
 #define PATH_SEPARATOR "/"
 #endif

<p><p>1.8       +4 -2      icecast/src/source.c

Index: source.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/source.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- source.c	2002/02/04 07:08:52	1.7
+++ source.c	2002/02/07 01:04:07	1.8
@@ -1,15 +1,16 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <unistd.h>
 #include <sys/types.h>
 #include <ogg/ogg.h>
 
 #ifndef _WIN32
+#include <unistd.h>
 #include <sys/time.h>
 #include <sys/socket.h>
 #else
-#include <window.h>
+#include <winsock2.h>
+#include <windows.h>
 #endif
 
 #include "thread.h"
@@ -23,6 +24,7 @@
 #include "client.h"
 #include "stats.h"
 #include "format.h"
+#include "log.h"
 #include "logging.h"
 #include "config.h"
 

<p><p>1.3       +1 -0      icecast/src/util.c

Index: util.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/util.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- util.c	2001/10/20 06:43:04	1.2
+++ util.c	2002/02/07 01:04:07	1.3
@@ -5,6 +5,7 @@
 #include <sys/socket.h>
 #include <unistd.h>
 #else
+#include <winsock2.h>
 #include <windows.h>
 #endif
 

<p><p>1.3       +2 -2      net/resolver.c

Index: resolver.c
===================================================================
RCS file: /usr/local/cvsroot/net/resolver.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- resolver.c	2001/10/20 05:57:28	1.2
+++ resolver.c	2002/02/07 01:04:08	1.3
@@ -8,16 +8,16 @@
 #include <stdio.h>
 #include <sys/types.h>
 #include <stdlib.h>
-#include <netdb.h>
 #include <string.h>
 
 #ifndef _WIN32
+#include <netdb.h>
 #include <sys/socket.h>
 #include <pthread.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #else
-#include <winsock.h>
+#include <winsock2.h>
 #define sethostent(x)
 #endif
 

<p><p>1.3       +2 -3      net/sock.h

Index: sock.h
===================================================================
RCS file: /usr/local/cvsroot/net/sock.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sock.h	2001/10/20 05:57:28	1.2
+++ sock.h	2002/02/07 01:04:08	1.3
@@ -24,10 +24,9 @@
 
 #ifdef _WIN32
 #include <winsock2.h>
-typedef SOCKET sock_t
-#else
-typedef int sock_t;
 #endif
+
+typedef int sock_t;
 
 #define SOCK_ERROR -1
 #define SOCK_BLOCK 0

<p><p>1.6       +7 -0      thread/thread.c

Index: thread.c
===================================================================
RCS file: /usr/local/cvsroot/thread/thread.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- thread.c	2001/10/21 02:04:27	1.5
+++ thread.c	2002/02/07 01:04:09	1.6
@@ -28,6 +28,9 @@
 #ifndef _WIN32
 #include <unistd.h>
 #include <sys/time.h>
+#else
+#include <windows.h>
+#include <winbase.h>
 #endif
 
 #include <pthread.h>
@@ -37,6 +40,10 @@
 #include "log.h"
 #include "thread.h"
 #include "avl.h"
+
+#ifdef _WIN32
+#define __FUNCTION__ __FILE__ ":" __LINE__
+#endif
 
 #define CATMODULE "thread"
 #define LOG_ERROR(y) log_write(_logid, 1, CATMODULE "/" __FUNCTION__, y)

<p><p>1.6       +5 -3      timing/timing.c

Index: timing.c
===================================================================
RCS file: /usr/local/cvsroot/timing/timing.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- timing.c	2001/12/09 08:31:20	1.5
+++ timing.c	2002/02/07 01:04:09	1.6
@@ -4,14 +4,16 @@
 
 #include <stdlib.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 <windows.h>
+#include <mmsystem.h>
+#else
+#include <sys/time.h>
+#include <unistd.h>
 #endif
 
 #include "timing.h"

<p><p>1.4       +4 -3      timing/timing.h

Index: timing.h
===================================================================
RCS file: /usr/local/cvsroot/timing/timing.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- timing.h	2001/10/20 21:28:09	1.3
+++ timing.h	2002/02/07 01:04:09	1.4
@@ -3,11 +3,12 @@
 
 #include <sys/types.h>
 #ifdef HAVE_STDINT_H
-# include <stdint.h>
+#include <stdint.h>
 #endif
+
 #ifdef _WIN32
-typedef int64_t __int64;
-typedef uint64_t unsigned __int64;
+typedef __int64 int64_t;
+typedef unsigned __int64 uint64_t;
 #endif
 
 uint64_t timing_get_time(void);

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