Update of /cvsroot/pure-data/externals/pdogg/oggamp~ In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23207/oggamp~
Modified Files: oggamp~.c Log Message: fixes for MinGW
Index: oggamp~.c =================================================================== RCS file: /cvsroot/pure-data/externals/pdogg/oggamp~/oggamp~.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** oggamp~.c 27 Nov 2005 07:11:07 -0000 1.5 --- oggamp~.c 12 Dec 2005 06:39:05 -0000 1.6 *************** *** 43,47 **** #include <fcntl.h> #include <pthread.h> ! #ifdef UNIX #include <sys/socket.h> #include <netinet/in.h> --- 43,51 ---- #include <fcntl.h> #include <pthread.h> ! #ifdef WIN32 ! #include <io.h> /* for 'write' in pute-function only */ ! #include <winsock.h> ! #include <winbase.h> ! #else #include <sys/socket.h> #include <netinet/in.h> *************** *** 52,71 **** #include <unistd.h> #define SOCKET_ERROR -1 - #else - #include <io.h> /* for 'write' in pute-function only */ - #include <winsock.h> - #include <winbase.h> #endif
! #ifdef NT #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif
! #ifdef UNIX ! #define sys_closesocket close ! #endif ! #ifdef NT #define sys_closesocket closesocket #endif
--- 56,70 ---- #include <unistd.h> #define SOCKET_ERROR -1 #endif
! #ifdef _MSC_VER #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif
! #ifdef WIN32 #define sys_closesocket closesocket + #else + #define sys_closesocket close #endif