added mingw32 support.. please read the TODO file.. since it's difficult to get it working.

origin
stpohle 17 years ago
parent ff25761e34
commit c4f9a77cf8

10
TODO

@ -1,3 +1,11 @@
$Id: TODO,v 1.46 2007/01/12 22:42:30 stpohle Exp $
$Id: TODO,v 1.47 2009/05/12 20:50:33 stpohle Exp $
- explosions.. sometimes bombs can explode more times, slow networks (very slow)
New Cross Compiling Toolchain is needed..
rm cross-config.cache; LIBS="-static -ltiff -ljpeg -lpng12 -lz -lsmpeg -lSDL -logg -lpthread -lstdc++ -lwinmm" cross-configure.sh

@ -33,9 +33,9 @@ dnl Check for SDL
)
CFLAGS="$SDL_CFLAGS $CFLAGS"
SDL_LIBS="$SDL_LIBS -lpng -ljpeg"
LIBS="$SDL_LIBS $LIBS"
dnl Checks for header files.

@ -1,4 +1,4 @@
/* $Id: udp.c,v 1.15 2006/08/12 12:44:06 stpohle Exp $ */
/* $Id: udp.c,v 1.16 2009/05/12 20:50:34 stpohle Exp $ */
/* udp.c code for the network
File Version 0.2
*/
@ -159,7 +159,7 @@ udp_send (int sock, char *text, int len, struct _sockaddr *sAddr, int ai_family)
/* send udp broadcasted message */
void udp_sendbroadcast (int sock, char *text, int len, struct _sockaddr *sAddr, int ai_family)
{
unsigned char value;
char value;
value = 1;
setsockopt(sock, SOL_SOCKET, SO_BROADCAST, &value, sizeof (value));
@ -258,8 +258,12 @@ udp_server (char *port, int ai_family)
int
udp_get (int sock, char *text, int len, struct _sockaddr *sAddr, int ai_family)
{
unsigned int clen,
msglen;
#ifdef _WIN32
int clen;
#else
unsigned int clen;
#endif
unsigned int msglen;
fd_set sockset;
struct timeval tval;
@ -286,7 +290,6 @@ udp_get (int sock, char *text, int len, struct _sockaddr *sAddr, int ai_family)
msglen = 0;
if (select (sock + 1, &sockset, NULL, NULL, &tval)) {
msglen = recvfrom (sock, text, len, 0, (struct sockaddr *) sAddr, &clen);
if (msglen < 0)
return 0;

Loading…
Cancel
Save