Fixed BSD compile [ElBarto]

This commit is contained in:
R. Belmont 2010-12-06 14:39:18 +00:00
parent 3219f252bd
commit 1d37415a4a
4 changed files with 30 additions and 4 deletions

View File

@ -51,7 +51,9 @@
#include "xmlfile.h"
#include <ctype.h>
#include <zlib.h>
#ifdef SDLMAME_FREEBSD
# undef tolower
#endif
/***************************************************************************

View File

@ -140,6 +140,7 @@ ifeq ($(TARGETOS),freebsd)
BASE_TARGETOS = unix
SYNC_IMPLEMENTATION = tc
DEFS += -DNO_AFFINITY_NP
LIBS += -lutil
# /usr/local/include is not considered a system include directory
# on FreeBSD. GL.h resides there and throws warnings
CCOMFLAGS += -isystem /usr/local/include
@ -151,6 +152,13 @@ endif
ifeq ($(TARGETOS),openbsd)
BASE_TARGETOS = unix
SYNC_IMPLEMENTATION = ntc
LIBS += -lutil
endif
ifeq ($(TARGETOS),netbsd)
BASE_TARGETOS = unix
SYNC_IMPLEMENTATION = ntc
LIBS += -lutil
endif
ifeq ($(TARGETOS),solaris)

View File

@ -45,8 +45,14 @@
#elif defined(__linux__)
#define SDLMAME_LINUX 1
#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__)
#define SDLMAME_BSD 1
#elif defined(__FreeBSD__)
#define SDLMAME_FREEBSD 1
#elif defined(__DragonFly__)
#define SDLMAME_DRAGONFLY 1
#elif defined(__OpenBSD__)
#define SDLMAME_OPENBSD 1
#elif defined(__NetBSD__)
#define SDLMAME_NETBSD 1
#endif
// fix for Ubuntu 8.10

View File

@ -14,7 +14,17 @@
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <pty.h>
#if defined(SDLMAME_FREEBSD) || defined(SDLMAME_DRAGONFLY)
# include <termios.h>
# include <libutil.h>
#elif defined(SDLMAME_NETBSD)
# include <util.h>
#elif defined(SDLMAME_OPENBSD)
# include <termios.h>
# include <util.h>
#elif defined(SDLMAME_LINUX)
# include <pty.h>
#endif
#include "sdlfile.h"