mingw build fixes again (including mostly working in sid: got some link issues)

This commit is contained in:
Bill Currie 2001-09-25 06:18:30 +00:00
parent 8b15be4ced
commit 06da30ac89
8 changed files with 39 additions and 10 deletions

View file

@ -37,7 +37,7 @@ struct {
#define freelook (in_mlook.state & 1 || in_freelook->int_val) #define freelook (in_mlook.state & 1 || in_freelook->int_val)
void IN_UpdateGrab (cvar_t *); void IN_UpdateGrab (struct cvar_s *);
void IN_Init (void); void IN_Init (void);
void IN_Init_Cvars (void); void IN_Init_Cvars (void);

View file

@ -34,6 +34,10 @@
#ifdef USE_INTEL_ASM #ifdef USE_INTEL_ASM
#ifdef WIN32
# undef PIC //no such thing in win32
#endif
.text .text
.extern C(snd_scaletable) .extern C(snd_scaletable)

View file

@ -35,6 +35,10 @@
#ifdef USE_INTEL_ASM #ifdef USE_INTEL_ASM
#ifdef WIN32
# undef PIC //no such thing in win32
#endif
.data .data
.align 4 .align 4

View file

@ -37,6 +37,10 @@
#ifdef USE_INTEL_ASM #ifdef USE_INTEL_ASM
#ifdef WIN32
# undef PIC
#endif
.text .text
#define temp0 0 #define temp0 0
#define temp1 4 #define temp1 4

View file

@ -88,6 +88,7 @@ qw_server_LDFLAGS= $(common_ldflags)
qw_server_DEPENDENCIES= libqfnet.la $(ASM) $(qf_server_LIBS) qw_server_DEPENDENCIES= libqfnet.la $(ASM) $(qf_server_LIBS)
qw_master_SOURCES= master.c qw_master_SOURCES= master.c
qw_master_LDADD= $(NET_LIBS)
qw_master_LDFLAGS= $(common_ldflags) qw_master_LDFLAGS= $(common_ldflags)
qf_client_LIBS= $(top_builddir)/libs/video/targets/libQFjs.la \ qf_client_LIBS= $(top_builddir)/libs/video/targets/libQFjs.la \

View file

@ -41,6 +41,9 @@
#ifdef HAVE_ARPA_INET_H #ifdef HAVE_ARPA_INET_H
# include <arpa/inet.h> # include <arpa/inet.h>
#endif #endif
#ifdef HAVE_WINSOCK_H
# include <winsock.h>
#endif
#include <sys/types.h> #include <sys/types.h>
#include <time.h> #include <time.h>
@ -302,18 +305,20 @@ QW_Master (struct sockaddr_in *addr)
int int
main (int argc, char **argv) main (int argc, char **argv)
{ {
int c;
struct sockaddr_in addr; struct sockaddr_in addr;
short port = htons (27000);
addr.sin_family = AF_INET; #ifndef WIN32 //FIXME
addr.sin_addr.s_addr = INADDR_ANY; int c;
addr.sin_port = htons (27000);
while ((c = getopt (argc, argv, "p:")) != -1) { while ((c = getopt (argc, argv, "p:")) != -1) {
if (c == 'p') { if (c == 'p') {
addr.sin_port = htons (atoi (optarg)); port = htons (atoi (optarg));
} }
} }
#endif
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = INADDR_ANY;
addr.sin_port = port;
QW_Master (&addr); QW_Master (&addr);
return 0; return 0;
} }

View file

@ -38,6 +38,9 @@
#ifdef HAVE_ARPA_INET_H #ifdef HAVE_ARPA_INET_H
# include <arpa/inet.h> # include <arpa/inet.h>
#endif #endif
#ifdef HAVE_WINSOCK_H
# include <winsock.h>
#endif
#include <stdarg.h> #include <stdarg.h>
#include <stdlib.h> #include <stdlib.h>
@ -1108,8 +1111,14 @@ SV_PrintIP (byte *ip)
static char buf[INET6_ADDRSTRLEN]; static char buf[INET6_ADDRSTRLEN];
if (!inet_ntop (AF_INET6, ip, buf, INET6_ADDRSTRLEN)) if (!inet_ntop (AF_INET6, ip, buf, INET6_ADDRSTRLEN))
#else #else
# ifdef WIN32
static char buf[16];
strcpy (buf, inet_ntoa (*(struct in_addr*)ip));
if (0)
# else
static char buf[INET_ADDRSTRLEN]; static char buf[INET_ADDRSTRLEN];
if (!inet_ntop (AF_INET, ip, buf, INET_ADDRSTRLEN)) if (!inet_ntop (AF_INET, ip, buf, INET_ADDRSTRLEN))
# endif
#endif #endif
Sys_Error ("SV_CleanIPList: inet_ntop_failed. wtf?\n"); Sys_Error ("SV_CleanIPList: inet_ntop_failed. wtf?\n");
return buf; return buf;

View file

@ -1,5 +1,7 @@
#!/bin/sh #!/bin/sh
HOST_CC=gcc
PATH=/usr/local/cross-tools/bin:/usr/local/cross-tools/i386-mingw32msvc/bin:$PATH \ PATH=$PATH:/usr/local/cross-tools/bin:/usr/local/cross-tools/i386-mingw32msvc/bin
make $* export HOST_CC
export PATH
make $*