diff --git a/BasiliskII/src/CrossPlatform/sigsegv.cpp b/BasiliskII/src/CrossPlatform/sigsegv.cpp index 645ac73a..c297a0dd 100644 --- a/BasiliskII/src/CrossPlatform/sigsegv.cpp +++ b/BasiliskII/src/CrossPlatform/sigsegv.cpp @@ -281,6 +281,13 @@ static void powerpc_decode_instruction(instruction_t *instruction, unsigned int #define SIGSEGV_REGISTER_FILE (SIGSEGV_REGISTER_TYPE *)SIGSEGV_CONTEXT_REGS #define SIGSEGV_SKIP_INSTRUCTION ix86_skip_instruction #endif +#if defined(__x86_64__) +#include +#define SIGSEGV_CONTEXT_REGS (((ucontext_t *)scp)->uc_mcontext.gregs) +#define SIGSEGV_FAULT_INSTRUCTION SIGSEGV_CONTEXT_REGS[REG_RIP] +#define SIGSEGV_REGISTER_FILE (SIGSEGV_REGISTER_TYPE *)SIGSEGV_CONTEXT_REGS +#define SIGSEGV_SKIP_INSTRUCTION ix86_skip_instruction +#endif #endif #if defined(__FreeBSD__) || defined(__OpenBSD__) #if (defined(i386) || defined(__i386__)) @@ -893,6 +900,24 @@ enum { X86_REG_EBP = EBP, X86_REG_ESI = ESI, X86_REG_EDI = EDI +#elif defined(__x86_64__) + X86_REG_R8 = REG_R8, + X86_REG_R9 = REG_R9, + X86_REG_R10 = REG_R10, + X86_REG_R11 = REG_R11, + X86_REG_R12 = REG_R12, + X86_REG_R13 = REG_R13, + X86_REG_R14 = REG_R14, + X86_REG_R15 = REG_R15, + X86_REG_EDI = EDI, + X86_REG_ESI = ESI, + X86_REG_EBP = EBP, + X86_REG_EBX = EBX, + X86_REG_EDX = EDX, + X86_REG_EAX = EAX, + X86_REG_ECX = ECX, + X86_REG_ESP = ESP, + X86_REG_EIP = REG_RIP #endif }; #endif diff --git a/BasiliskII/src/Unix/configure.ac b/BasiliskII/src/Unix/configure.ac index 0791cb46..427410a0 100755 --- a/BasiliskII/src/Unix/configure.ac +++ b/BasiliskII/src/Unix/configure.ac @@ -774,8 +774,11 @@ netbsd*) ETHERSRC=ether_unix.cpp ;; solaris*) - AUDIOSRC=Solaris/audio_solaris.cpp DEFINES="$DEFINES -DBSD_COMP -D_POSIX_PTHREAD_SEMANTICS" +dnl Needed for sys/socket.h + LIBS="$LIBS -lsocket -lnsl" +dnl Needed for SDL2 + CXXFLAGS="$CXXFLAGS -std=c++11" ;; irix*) AUDIOSRC=Irix/audio_irix.cpp diff --git a/BasiliskII/src/Unix/ether_unix.cpp b/BasiliskII/src/Unix/ether_unix.cpp index db2a143b..19c95d4b 100644 --- a/BasiliskII/src/Unix/ether_unix.cpp +++ b/BasiliskII/src/Unix/ether_unix.cpp @@ -66,7 +66,7 @@ #include #include -#if defined(__FreeBSD__) || defined(sgi) || (defined(__APPLE__) && defined(__MACH__)) +#if defined(__FreeBSD__) || defined (__sun__) || defined(sgi) || (defined(__APPLE__) && defined(__MACH__)) #include #endif diff --git a/BasiliskII/src/Unix/serial_unix.cpp b/BasiliskII/src/Unix/serial_unix.cpp index 0f28ec7c..bafc14e3 100644 --- a/BasiliskII/src/Unix/serial_unix.cpp +++ b/BasiliskII/src/Unix/serial_unix.cpp @@ -21,12 +21,18 @@ #include "sysdeps.h" #include + +#ifdef HAVE_SYS_FILIO_H +#include +#endif + #include #include #include #include #include #include + #ifdef __linux__ #include #include diff --git a/BasiliskII/src/Unix/sshpty.c b/BasiliskII/src/Unix/sshpty.c index fc0bf2ea..18865900 100644 --- a/BasiliskII/src/Unix/sshpty.c +++ b/BasiliskII/src/Unix/sshpty.c @@ -74,7 +74,12 @@ RCSID("$OpenBSD: sshpty.c,v 1.4 2001/12/19 07:18:56 deraadt Exp $"); #define fatal(x) do { printf("Fatal error: %s", x); return 0; } while(0) #endif /* not in BasiliskII */ +#ifdef __sun__ +#define mysig_t sig_atomic_t +#else #define mysig_t sig_t +#endif + #define mysignal signal #include diff --git a/SheepShaver/src/CrossPlatform/sigsegv.cpp b/SheepShaver/src/CrossPlatform/sigsegv.cpp index b1ed17eb..c42ec9df 100644 --- a/SheepShaver/src/CrossPlatform/sigsegv.cpp +++ b/SheepShaver/src/CrossPlatform/sigsegv.cpp @@ -281,6 +281,13 @@ static void powerpc_decode_instruction(instruction_t *instruction, unsigned int #define SIGSEGV_REGISTER_FILE (SIGSEGV_REGISTER_TYPE *)SIGSEGV_CONTEXT_REGS #define SIGSEGV_SKIP_INSTRUCTION ix86_skip_instruction #endif +#if defined(__x86_64__) +#include +#define SIGSEGV_CONTEXT_REGS (((ucontext_t *)scp)->uc_mcontext.gregs) +#define SIGSEGV_FAULT_INSTRUCTION SIGSEGV_CONTEXT_REGS[REG_RIP] +#define SIGSEGV_REGISTER_FILE (SIGSEGV_REGISTER_TYPE *)SIGSEGV_CONTEXT_REGS +#define SIGSEGV_SKIP_INSTRUCTION ix86_skip_instruction +#endif #endif #if defined(__FreeBSD__) || defined(__OpenBSD__) #if (defined(i386) || defined(__i386__)) @@ -893,6 +900,24 @@ enum { X86_REG_EBP = EBP, X86_REG_ESI = ESI, X86_REG_EDI = EDI +#elif defined(__x86_64__) + X86_REG_R8 = REG_R8, + X86_REG_R9 = REG_R9, + X86_REG_R10 = REG_R10, + X86_REG_R11 = REG_R11, + X86_REG_R12 = REG_R12, + X86_REG_R13 = REG_R13, + X86_REG_R14 = REG_R14, + X86_REG_R15 = REG_R15, + X86_REG_EDI = EDI, + X86_REG_ESI = ESI, + X86_REG_EBP = EBP, + X86_REG_EBX = EBX, + X86_REG_EDX = EDX, + X86_REG_EAX = EAX, + X86_REG_ECX = ECX, + X86_REG_ESP = ESP, + X86_REG_EIP = REG_RIP #endif }; #endif diff --git a/SheepShaver/src/Unix/configure.ac b/SheepShaver/src/Unix/configure.ac index 6fd59033..b9e49639 100755 --- a/SheepShaver/src/Unix/configure.ac +++ b/SheepShaver/src/Unix/configure.ac @@ -46,7 +46,7 @@ AC_ARG_WITH(gtk, [ --with-gtk use GTK user interface [d esac], [WANT_GTK="gtk2 gtk"]) AC_ARG_WITH(mon, [ --with-mon use mon as debugger [default=yes]], [WANT_MON=$withval], [WANT_MON=no]) -AC_ARG_WITH(dgcc, [ --with-dgcc=COMPILER use C++ COMPILER to compile synthetic opcodes or 'precompiled'], [DYNGEN_CC=$withval]) +AC_ARG_WITH(dgcc, [ --with-dgcc=COMPILER use C++ COMPILER to compile synthetic opcodes or 'precompiled'], [DYNGEN_CC=$withval], [DYNGEN_CC=precompiled]) AC_ARG_WITH(bincue, AS_HELP_STRING([--with-bincue], [Allow cdrom image files in bin/cue mode])) @@ -656,6 +656,12 @@ netbsd*) EXTRASYSSRCS="paranoia.cpp NetBSD/sheepthreads.c ppc_asm.S" fi ;; +solaris*) +dnl Needed for sys/socket.h + LDFLAGS="$LDFLAGS -lsocket -lnsl" +dnl Needed for SDL2 + CXXFLAGS="$CXXFLAGS -std=c++11" + ;; darwin*) ETHERSRC=ether_unix.cpp if [[ "x$EMULATED_PPC" = "xno" ]]; then diff --git a/SheepShaver/src/Unix/prefs_editor_gtk.cpp b/SheepShaver/src/Unix/prefs_editor_gtk.cpp index 03821908..da55d731 100644 --- a/SheepShaver/src/Unix/prefs_editor_gtk.cpp +++ b/SheepShaver/src/Unix/prefs_editor_gtk.cpp @@ -29,6 +29,10 @@ #include #include +#ifdef __sun__ +#include +#endif + #include #include "user_strings.h"