Modified to support compilation under Visual C++(r)

thanks to kitutou
origin
ob1kenewb 23 years ago
parent 1c88370563
commit ba710ea584

@ -1,4 +1,4 @@
/* $Id: bomberclone.h,v 1.11 2003/05/06 20:48:53 stpohle Exp $ */ /* $Id: bomberclone.h,v 1.12 2003/05/06 22:33:40 ob1kenewb Exp $ */
/* bomberclone.h */ /* bomberclone.h */
#ifndef _BOMBERCLONE_H_ #ifndef _BOMBERCLONE_H_
@ -11,12 +11,14 @@
#include <fcntl.h> #include <fcntl.h>
#include <time.h> #include <time.h>
#include <ctype.h> #include <ctype.h>
#include <dirent.h>
#include <sys/stat.h> #include <sys/stat.h>
#ifdef _WIN32 #ifdef _WIN32
#include <winsock.h> #include <winsock.h>
#define IS_DIR(a) ((a & _S_IFDIR) == _S_IFDIR) #include "../confdefs.h"
#define IS_REG(a) ((a & _S_IFREG) == _S_IFREG) #include <glib.h>
#include <sys/stat.h>
#define S_ISDIR(a) ((a & _S_IFDIR) == _S_IFDIR)
#define S_ISREG(a) ((a & _S_IFREG) == _S_IFREG)
#else #else
#include <sys/time.h> #include <sys/time.h>
#include <sys/socket.h> #include <sys/socket.h>
@ -25,9 +27,10 @@
#include <arpa/inet.h> #include <arpa/inet.h>
#include <unistd.h> #include <unistd.h>
#include <sys/types.h> #include <sys/types.h>
#include <dirent.h>
#include "../config.h"
#endif #endif
#include <SDL.h> #include <SDL.h>
#include "../config.h"
#include "gfx.h" #include "gfx.h"
#include "network.h" #include "network.h"
#include "sysfunc.h" #include "sysfunc.h"

@ -2,7 +2,9 @@
#include "bomberclone.h" #include "bomberclone.h"
#include "network.h" #include "network.h"
#include "gfx.h" #include "gfx.h"
#ifndef _WIN32
#include "../config.h" #include "../config.h"
#endif
_bomberclone bman; // Holds GameData _bomberclone bman; // Holds GameData
Uint32 timestamp; // timestamp Uint32 timestamp; // timestamp

@ -120,7 +120,7 @@ networkmenu_options ()
break; break;
case (2): case (2):
#ifndef _win32 #ifndef _WIN32
if (bman.net_ai_family == PF_INET) if (bman.net_ai_family == PF_INET)
bman.net_ai_family = PF_INET6; bman.net_ai_family = PF_INET6;
else else

@ -1,4 +1,4 @@
/* $Id: udp.c,v 1.4 2003/05/06 00:03:23 ob1kenewb Exp $ */ /* $Id: udp.c,v 1.5 2003/05/06 22:33:40 ob1kenewb Exp $ */
/* udp.c code for the network /* udp.c code for the network
File Version 0.2 File Version 0.2
*/ */
@ -7,18 +7,19 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/time.h>
#include <time.h> #include <time.h>
#ifdef _WIN32 #ifdef _WIN32
#include <winsock.h> #include <winsock.h>
#include <io.h>
#else #else
#include <sys/socket.h> #include <sys/socket.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <netdb.h> #include <netdb.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <unistd.h>
#include <sys/time.h>
#endif #endif
#ifdef _WIN32 #ifdef _WIN32

Loading…
Cancel
Save