Merge pull request #5509 from despair86/mame-solaris

Fix Solaris 2.11 (non-Oracle)
This commit is contained in:
R. Belmont 2019-08-19 23:22:26 -04:00 committed by GitHub
commit bd62fd5fa9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 58 additions and 11 deletions

View File

@ -983,9 +983,7 @@ GCC_VERSION := $(shell $(TOOLCHAIN)$(subst @,,$(OVERRIDE_CC)) -dumpversion
else
GCC_VERSION := $(shell $(TOOLCHAIN)$(subst @,,$(CC)) -dumpversion 2> /dev/null)
endif
ifneq ($(OS),solaris)
CLANG_VERSION := $(shell $(TOOLCHAIN)$(subst @,,$(CC)) --version 2> /dev/null | head -n 1 | grep -e 'version [0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?' -o | grep -e '[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?' -o | tail -n 1)
endif
PYTHON_AVAILABLE := $(shell $(PYTHON) --version > /dev/null 2>&1 && echo python)
GIT_AVAILABLE := $(shell git --version > /dev/null 2>&1 && echo git)
endif
@ -1367,11 +1365,10 @@ xcode4-ios: generate
#-------------------------------------------------
# gmake-solaris
#-------------------------------------------------
ifndef CLANG_VERSION
$(PROJECTDIR)/$(MAKETYPE)-solaris/Makefile: makefile $(SCRIPTS) $(GENIE)
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --gcc=solaris --gcc_version=$(GCC_VERSION) $(MAKETYPE)
endif
.PHONY: solaris_x64
solaris_x64: generate $(PROJECTDIR)/$(MAKETYPE)-solaris/Makefile
$(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-solaris config=$(CONFIG)64 precompile
@ -1385,6 +1382,26 @@ solaris_x86: generate $(PROJECTDIR)/$(MAKETYPE)-solaris/Makefile
$(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-solaris config=$(CONFIG)32 precompile
$(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-solaris config=$(CONFIG)32
#-------------------------------------------------
# gmake-solaris-clang
#-------------------------------------------------
ifdef CLANG_VERSION
$(PROJECTDIR)/$(MAKETYPE)-solaris/Makefile: makefile $(SCRIPTS) $(GENIE)
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --gcc=solaris --gcc_version=$(CLANG_VERSION) $(MAKETYPE)
endif
.PHONY: solaris_x64_clang
solaris_x64_clang: generate $(PROJECTDIR)/$(MAKETYPE)-solaris/Makefile
$(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-solaris config=$(CONFIG)64 precompile
$(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-solaris config=$(CONFIG)64
.PHONY: solaris_clang
solaris_clang: solaris_x86_clang
.PHONY: solaris_x86_clang
solaris_x86_clang: generate $(PROJECTDIR)/$(MAKETYPE)-solaris/Makefile
$(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-solaris config=$(CONFIG)32 precompile
$(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-solaris config=$(CONFIG)32
#-------------------------------------------------
# gmake-freebsd

View File

@ -16,6 +16,11 @@ All rights reserved.
*/
#ifdef __sun
#undef SEC
#undef op
#endif
class g65816_disassembler : public util::disasm_interface
{
public:

View File

@ -10,7 +10,9 @@
#ifndef MAME_CPU_LH5801_5801DASM_H
#define MAME_CPU_LH5801_5801DASM_H
#ifdef __sun
#undef SEC
#endif
#pragma once
class lh5801_disassembler : public util::disasm_interface

View File

@ -4,7 +4,9 @@
#ifndef __M7700DS_H__
#define __M7700DS_H__
#ifdef __sun
#undef SEC
#endif
/*
Mitsubishi 7700 CPU Emulator v0.10

View File

@ -17,11 +17,11 @@
#pragma once
#include <limits.h>
#if defined(__sun__) && defined(__svr4__)
#undef REG_SP
#undef REG_PC
#else
#include <limits.h>
#endif
/* ======================================================================== */

View File

@ -7,6 +7,10 @@ http.cpp
HTTP server handling
***************************************************************************/
#ifdef __sun
#define ASIO_DISABLE_DEV_POLL
#define ASIO_HAS_EPOLL
#endif
#include "emu.h"
#include "server_ws_impl.hpp"

View File

@ -267,7 +267,11 @@ public:
// template specializations to enumerate the fundamental atomic types you are allowed to save
ALLOW_SAVE_TYPE_AND_ARRAY(char)
ALLOW_SAVE_TYPE (bool); // std::vector<bool> may be packed internally
#ifdef __sun
ALLOW_SAVE_TYPE_AND_ARRAY(signed char)
#else
ALLOW_SAVE_TYPE_AND_ARRAY(s8)
#endif
ALLOW_SAVE_TYPE_AND_ARRAY(u8)
ALLOW_SAVE_TYPE_AND_ARRAY(s16)
ALLOW_SAVE_TYPE_AND_ARRAY(u16)

View File

@ -3,6 +3,10 @@
/* commands */
#ifdef __sun
#undef SEC
#endif
#define SEC_REQUEST_STATUS (0x20)
#define SEC_REQUEST_MARKET (0x21)
#define SEC_REQEUST_LAST_ERROR (0x22)

View File

@ -29,6 +29,10 @@
#include <pty.h>
#elif defined(__HAIKU__)
#include <bsd/pty.h>
#elif defined(__sun)
#include <sys/types.h>
#include <stropts.h>
#include <sys/conf.h>
#endif
@ -112,7 +116,7 @@ osd_file::error posix_open_ptty(std::uint32_t openflags, osd_file::ptr &file, st
else if (openflags & OPEN_FLAG_READ)
access |= O_RDONLY;
else
return error::INVALID_ACCESS;
return osd_file::error::INVALID_ACCESS;
int const masterfd = ::posix_openpt(access);
if (masterfd < 0)

View File

@ -8,7 +8,7 @@
#include "font_module.h"
#include "modules/osdmodule.h"
#if defined(SDLMAME_UNIX) && !defined(SDLMAME_MACOSX) && !defined(SDLMAME_SOLARIS) && !defined(SDLMAME_HAIKU) && !defined(SDLMAME_ANDROID)
#if defined(SDLMAME_UNIX) && !defined(SDLMAME_MACOSX) && !defined(SDLMAME_HAIKU) && !defined(SDLMAME_ANDROID)
#include "corestr.h"
#include "corealloc.h"

View File

@ -14,6 +14,11 @@
#include "emu.h"
#ifdef __sun
#define ASIO_DISABLE_DEV_POLL
#define ASIO_HAS_EPOLL
#endif
#include <thread>
#include <set>
#include "asio.h"