From a3372b49bfe167e93c41847284e57cae07d6cd8f Mon Sep 17 00:00:00 2001 From: Bradley Bell Date: Fri, 28 Feb 2003 23:34:15 +0000 Subject: [PATCH] MinGW compiles with network enabled again, but still doesn't work --- ChangeLog | 7 ++++++- arch/win32/Makefile.am | 4 ++-- arch/win32/ipx_drv.h | 11 ++++++++++- arch/win32/ipx_win.c | 6 ++++-- arch/win32/mingw_init.c | 6 ------ arch/win32/winnet.c | 5 +---- configure.ac | 8 ++++---- 7 files changed, 27 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8923e61f..1f9bc6ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ -2003-02-28 Bradley Bell +2003-02-28 Bradley Bell + + * configure.ac, arch/win32/Makefile.am, arch/win32/ipx_drv.h, + arch/win32/ipx_win.c, arch/win32/mingw_init.c, + arch/win32/winnet.c: MinGW compiles with network enabled again, + but still doesn't work * NEWS: Updated diff --git a/arch/win32/Makefile.am b/arch/win32/Makefile.am index 04ebce31..3ee8c61e 100644 --- a/arch/win32/Makefile.am +++ b/arch/win32/Makefile.am @@ -5,12 +5,12 @@ noinst_LIBRARIES = libarch_win32.a INCLUDES = -I$(top_srcdir)/arch/include -I$(top_srcdir)/include -I$(top_srcdir)/main -I$(srcdir)/include if USE_NETWORK -NETWORK_SRCS = winnet.c ipx_win.c ipx_udp.c +NETWORK_SRCS = winnet.c ipx_win.c endif libarch_win32_a_SOURCES = ${NETWORK_SRCS} findfile.c mingw_init.c -EXTRA_libarch_win32_a_SOURCES = winnet.c ipx_win.c ipx_udp.c +EXTRA_libarch_win32_a_SOURCES = winnet.c ipx_win.c EXTRA_DIST = ${EXTRA_SUBDIRS} \ d1x.ico d1x.rc d3d.ico debug.cpp descent.ico digi.c findfile.c glinit.c gr.c \ diff --git a/arch/win32/ipx_drv.h b/arch/win32/ipx_drv.h index e29b95c2..0f7f1bac 100644 --- a/arch/win32/ipx_drv.h +++ b/arch/win32/ipx_drv.h @@ -16,7 +16,16 @@ #define IPX_MANUAL_ADDRESS #include -#include "pstypes.h" + +typedef unsigned char ubyte; +typedef unsigned short ushort; +typedef unsigned int uint; + +#ifdef __GNUC__ +# define __pack__ __attribute__((packed)) +#else +# define __pack__ +#endif #define MAX_PACKET_DATA 1500 diff --git a/arch/win32/ipx_win.c b/arch/win32/ipx_win.c index 14515228..bd061176 100644 --- a/arch/win32/ipx_win.c +++ b/arch/win32/ipx_win.c @@ -1,4 +1,4 @@ -/* $Id: ipx_win.c,v 1.4 2002-08-31 03:16:35 btb Exp $ */ +/* $Id: ipx_win.c,v 1.5 2003-02-28 23:34:15 btb Exp $ */ /* * @@ -16,10 +16,12 @@ #include #include #include +#include #include "ipx_drv.h" -#include "mono.h" +#define _do_mprintf(n, format, args...) printf(format, ## args) +#define mprintf(args) _do_mprintf args //#define n_printf(format, args...) mprintf((1, format, ## args)) diff --git a/arch/win32/mingw_init.c b/arch/win32/mingw_init.c index 5d66e16d..377c432c 100644 --- a/arch/win32/mingw_init.c +++ b/arch/win32/mingw_init.c @@ -1,13 +1,7 @@ /* - * $Source: /cvs/cvsroot/d2x/arch/win32/mingw_init.c,v $ - * $Revision: 1.1 $ - * $Author: bradleyb $ - * $Date: 2001-10-19 09:01:56 $ * * mingw_init.c - Basically same as linux init.c * - * $Log: not supported by cvs2svn $ - * */ #ifdef HAVE_CONFIG_H diff --git a/arch/win32/winnet.c b/arch/win32/winnet.c index 0bab5883..5b4b4075 100644 --- a/arch/win32/winnet.c +++ b/arch/win32/winnet.c @@ -1,4 +1,4 @@ -/* $Id: winnet.c,v 1.4 2002-08-31 03:16:35 btb Exp $ */ +/* $Id: winnet.c,v 1.5 2003-02-28 23:34:15 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -27,10 +27,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include #include -#include "pstypes.h" -#include "config.h" #include "args.h" - #include "ipx_drv.h" extern struct ipx_driver ipx_win; diff --git a/configure.ac b/configure.ac index a6cbcb7f..bec9747a 100644 --- a/configure.ac +++ b/configure.ac @@ -247,10 +247,10 @@ if test x$enable_network != xno; then AC_MSG_WARN([OS X detected. disabling network]) enable_network="no"; fi - if test x$MINGW32 = xyes; then - AC_MSG_WARN([MINGW detected. disabling network]) - enable_network="no"; - fi +# if test x$MINGW32 = xyes; then +# AC_MSG_WARN([MINGW detected. disabling network]) +# enable_network="no"; +# fi fi if test x$enable_network != xno; then AC_DEFINE(NETWORK,,[Define if you want a network build]) -- 2.39.2