Scope-eye.net Git Repository
/
liskon_frotz.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b427948
)
Identify host OS as Unix if so. Include unistd.h protected by UNIX define.
author
David Griffith
<dave@661.org>
Tue, 23 Jul 2019 10:00:36 +0000
(
03:00
-0700)
committer
David Griffith
<dave@661.org>
Tue, 23 Jul 2019 10:00:36 +0000
(
03:00
-0700)
Makefile
patch
|
blob
|
history
src/sdl/sf_util.c
patch
|
blob
|
history
diff --git
a/Makefile
b/Makefile
index 01766dc0627956d5e466fc7e6b40cafe6e284f16..d766d9daf8e8ebc0939607df6ad01aa53c377045 100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-13,6
+13,8
@@
CFLAGS += -Wall -std=c99 #-Wextra
# Determine if we are compiling on MAC OS X
ifneq ($(OS),Windows_NT)
+ # For now, assume !windows == unix.
+ OS_TYPE ?= unix
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
MACOS = yes
@@
-306,6
+308,9
@@
$(COMMON_DEFINES):
@echo "** Generating $@"
@echo "#ifndef COMMON_DEFINES_H" > $@
@echo "#define COMMON_DEFINES_H" >> $@
+ifeq ($(OS_TYPE), unix)
+ @echo "#define UNIX" >> $@
+endif
ifdef NO_BLORB
@echo "#define NO_BLORB" >> $@
endif
diff --git
a/src/sdl/sf_util.c
b/src/sdl/sf_util.c
index 78d3b121d097264460e0e9a6d0a08ca24cc8ec07..0ec6090bc3580da583957224069cc5266729ddef 100644
(file)
--- a/
src/sdl/sf_util.c
+++ b/
src/sdl/sf_util.c
@@
-14,6
+14,10
@@
#include <io.h>
#endif
+#ifdef UNIX
+#include <unistd.h>
+#endif
+
f_setup_t f_setup;
typedef void (*CLEANFUNC)();