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

29
deps/jamlib/Makefile.sunos vendored Normal file
View File

@@ -0,0 +1,29 @@
CC = gcc $(CPPFLAGS) $(CFLAGS) -D__LINUX__ $(LDFLAGS) -Wall
AR = ar -ru
RM = rm -f
OBJS = crc32.o mbase.o message.o lastread.o subpack.o structrw.o
jamlib.a : $(OBJS)
$(AR) jamlib.a $(OBJS)
crc32.o: crc32.c jam.h
$(CC) -c crc32.c -o crc32.o
mbase.o: mbase.c jam.h
$(CC) -c mbase.c -o mbase.o
message.o: message.c jam.h
$(CC) -c message.c -o message.o
lastread.o: lastread.c jam.h
$(CC) -c lastread.c -o lastread.o
subpack.o: subpack.c jam.h
$(CC) -c subpack.c -o subpack.o
structrw.o: structrw.c jam.h
$(CC) -c structrw.c -o structrw.o
clean:
$(RM) *.o *.a

3
deps/jamlib/mbase.c vendored
View File

@@ -85,6 +85,9 @@
#if defined( __LINUX__ )
#include <sys/file.h>
#include <unistd.h>
#ifdef __sun
#include <fcntl.h>
#endif
#endif
#define OS_ERROR_OFFSET 10000

View File

View File

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