Magicka now builds and runs on SunOS

This commit is contained in:
Andrew Pamment
2017-10-20 07:27:58 +10:00
parent 83719955c1
commit 5543f94e01
21 changed files with 405 additions and 25 deletions

12
deps/odoors/ODCom.c vendored
View File

@@ -72,6 +72,9 @@
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#ifdef __sun
#include <sys/filio.h>
#endif
#endif
#include "ODCore.h"
#include "ODGen.h"
@@ -1787,7 +1790,16 @@ no_fossil:
if (isatty(STDIN_FILENO)) {
tcgetattr(STDIN_FILENO,&tio_default);
tio_raw = tio_default;
#ifdef __sun
tio_raw.c_iflag &= ~(IMAXBEL|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
tio_raw.c_oflag &= ~OPOST;
tio_raw.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
tio_raw.c_cflag &= ~(CSIZE|PARENB);
tio_raw.c_cflag |= CS8;
#else
cfmakeraw(&tio_raw);
#endif
tcsetattr(STDIN_FILENO,TCSANOW,&tio_raw);
setvbuf(stdout, NULL, _IONBF, 0);
}

View File

@@ -96,7 +96,7 @@
#define OD_DLL
#endif /* !OD_WIN32_STATIC */
#else /* !WIN32 */
#if defined(__unix__) || defined(__NetBSD__) || defined(__APPLE__)
#if defined(__unix__) || defined(__NetBSD__) || defined(__APPLE__) || defined(__sun)
#define ODPLAT_NIX
#undef ODPLAT_DOS
#undef DIRSEP