[PD-cvs] externals/maxlib/src netclient.c, 1.12, 1.13 netdist.c, 1.9, 1.10 netrec.c, 1.13, 1.14 netserver.c, 1.14, 1.15
Hans-Christoph Steiner
eighthave at users.sourceforge.net
Mon Dec 12 07:39:41 CET 2005
Update of /cvsroot/pure-data/externals/maxlib/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23340/src
Modified Files:
netclient.c netdist.c netrec.c netserver.c
Log Message:
fixes for MinGW
Index: netserver.c
===================================================================
RCS file: /cvsroot/pure-data/externals/maxlib/src/netserver.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** netserver.c 10 Nov 2005 22:15:07 -0000 1.14
--- netserver.c 12 Dec 2005 06:39:39 -0000 1.15
***************
*** 36,40 ****
#include <stdio.h>
#include <pthread.h>
! #ifdef UNIX
#include <sys/socket.h>
#include <netinet/in.h>
--- 36,44 ----
#include <stdio.h>
#include <pthread.h>
! #ifdef WIN32
! #include <io.h>
! #include <fcntl.h>
! #include <winsock.h>
! #else
#include <sys/socket.h>
#include <netinet/in.h>
***************
*** 46,53 ****
#include <sys/time.h>
#define SOCKET_ERROR -1
- #else
- #include <io.h>
- #include <fcntl.h>
- #include <winsock.h>
#endif
--- 50,53 ----
Index: netrec.c
===================================================================
RCS file: /cvsroot/pure-data/externals/maxlib/src/netrec.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** netrec.c 10 Nov 2005 22:15:07 -0000 1.13
--- netrec.c 12 Dec 2005 06:39:39 -0000 1.14
***************
*** 34,38 ****
#include <string.h>
#include <stdio.h>
! #ifdef UNIX
#include <sys/socket.h>
#include <netinet/in.h>
--- 34,42 ----
#include <string.h>
#include <stdio.h>
! #ifdef WIN32
! #include <io.h>
! #include <fcntl.h>
! #include <winsock.h>
! #else
#include <sys/socket.h>
#include <netinet/in.h>
***************
*** 44,51 ****
#include <sys/time.h>
#define SOCKET_ERROR -1
- #else
- #include <io.h>
- #include <fcntl.h>
- #include <winsock.h>
#endif
--- 48,51 ----
Index: netdist.c
===================================================================
RCS file: /cvsroot/pure-data/externals/maxlib/src/netdist.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** netdist.c 10 Nov 2005 22:15:07 -0000 1.9
--- netdist.c 12 Dec 2005 06:39:39 -0000 1.10
***************
*** 30,34 ****
#include <string.h>
#include <pthread.h>
! #ifdef UNIX
#include <sys/socket.h>
#include <sys/errno.h>
--- 30,36 ----
#include <string.h>
#include <pthread.h>
! #ifdef WIN32
! #include <winsock.h>
! #else
#include <sys/socket.h>
#include <sys/errno.h>
***************
*** 38,43 ****
#include <unistd.h>
#define SOCKET_ERROR -1
- #else
- #include <winsock.h>
#endif
--- 40,43 ----
***************
*** 64,72 ****
static void sys_sockerror(char *s)
{
! #ifdef NT
int err = WSAGetLastError();
if (err == 10054) return;
! #endif
! #ifdef UNIX
int err = errno;
#endif
--- 64,71 ----
static void sys_sockerror(char *s)
{
! #ifdef WIN32
int err = WSAGetLastError();
if (err == 10054) return;
! #else
int err = errno;
#endif
***************
*** 76,84 ****
static void sys_closesocket(int fd) {
! #ifdef UNIX
! close(fd);
! #endif
! #ifdef NT
closesocket(fd);
#endif
}
--- 75,82 ----
static void sys_closesocket(int fd) {
! #ifdef WIN32
closesocket(fd);
+ #else
+ close(fd);
#endif
}
Index: netclient.c
===================================================================
RCS file: /cvsroot/pure-data/externals/maxlib/src/netclient.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** netclient.c 10 Nov 2005 22:15:07 -0000 1.12
--- netclient.c 12 Dec 2005 06:39:39 -0000 1.13
***************
*** 33,37 ****
#include <string.h>
#include <pthread.h>
! #ifdef UNIX
#include <sys/time.h>
#include <sys/socket.h>
--- 33,39 ----
#include <string.h>
#include <pthread.h>
! #ifdef WIN32
! #include <winsock.h>
! #else
#include <sys/time.h>
#include <sys/socket.h>
***************
*** 42,47 ****
#include <unistd.h>
#define SOCKET_ERROR -1
- #else
- #include <winsock.h>
#endif
--- 44,47 ----
More information about the Pd-cvs
mailing list