mirror of
https://github.com/holub/mame
synced 2025-04-21 07:52:35 +03:00
NetBSD support [Thomas Klausner]
Not for whatsnew: I added -Wno-conversion unconditionally to disable the warnings Thomas reported. That setting is the default for GCC out-of-the-box but apparently not on NetBSD. As far as I know it shouldn't cause a problem with any GCC version back to at least 4.0.0 so we're safe even on PPC OSX, but do let me know if hilarity ensues.
This commit is contained in:
parent
fdd736acef
commit
28e34ea140
6
makefile
6
makefile
@ -86,6 +86,9 @@ endif
|
||||
ifeq ($(firstword $(filter GNU/kFreeBSD,$(UNAME))),GNU/kFreeBSD)
|
||||
TARGETOS = freebsd
|
||||
endif
|
||||
ifeq ($(firstword $(filter NetBSD,$(UNAME))),NetBSD)
|
||||
TARGETOS = netbsd
|
||||
endif
|
||||
ifeq ($(firstword $(filter OpenBSD,$(UNAME))),OpenBSD)
|
||||
TARGETOS = openbsd
|
||||
endif
|
||||
@ -470,7 +473,8 @@ CCOMFLAGS += \
|
||||
-Wundef \
|
||||
-Wformat-security \
|
||||
-Wwrite-strings \
|
||||
-Wno-sign-compare
|
||||
-Wno-sign-compare \
|
||||
-Wno-conversion
|
||||
|
||||
# warnings only applicable to C compiles
|
||||
CONLYFLAGS += \
|
||||
|
@ -51,7 +51,7 @@
|
||||
#include "xmlfile.h"
|
||||
#include <ctype.h>
|
||||
#include <zlib.h>
|
||||
#if defined(SDLMAME_FREEBSD) || defined(SDLMAME_OS2)
|
||||
#if defined(SDLMAME_FREEBSD) || defined(SDLMAME_NETBSD) || defined(SDLMAME_OS2)
|
||||
# undef tolower
|
||||
#endif
|
||||
|
||||
|
@ -686,6 +686,7 @@ inline void fatalerror_exitcode(running_machine *machine, int exitcode, const ch
|
||||
//**************************************************************************
|
||||
|
||||
// population count
|
||||
#ifndef SDLMAME_NETBSD
|
||||
inline int popcount(UINT32 val)
|
||||
{
|
||||
int count;
|
||||
@ -694,6 +695,7 @@ inline int popcount(UINT32 val)
|
||||
val &= val - 1;
|
||||
return count;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// convert a series of 32 bits into a float
|
||||
|
@ -296,6 +296,10 @@ INLINE astring *astring_assemble_5(astring *dst, const char *src1, const char *s
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef SDLMAME_NETBSD
|
||||
#undef toupper
|
||||
#undef tolower
|
||||
#endif
|
||||
|
||||
/* derived class for C++ */
|
||||
class astring : public astring_base
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// sdlsync.c - SDL core synchronization functions
|
||||
//
|
||||
// Copyright (c) 1996-2010, Nicola Salmoria and the MAME Team.
|
||||
// Copyright (c) 1996-2011, Nicola Salmoria and the MAME Team.
|
||||
// Visit http://mamedev.org for licensing and usage restrictions.
|
||||
//
|
||||
// SDLMAME by Olivier Galibert and R. Belmont
|
||||
@ -20,6 +20,11 @@
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
#ifdef SDLMAME_NETBSD
|
||||
/* for SIGKILL */
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
// standard C headers
|
||||
#include <math.h>
|
||||
#include <unistd.h>
|
||||
|
Loading…
Reference in New Issue
Block a user