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)
void IN_UpdateGrab (cvar_t *);
void IN_UpdateGrab (struct cvar_s *);
void IN_Init (void);
void IN_Init_Cvars (void);

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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