aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2013-01-22 17:31:49 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2013-01-22 17:31:49 +0000
commit469238676dd466a55b3808461e262f5645f888d1 (patch)
tree97c9e3f508baf64ff204fb99cd12a625231c259c
parent886e1012372ea48f4946f40ad9dee577389b76f2 (diff)
use HAVE_UNISTD_H to determine when to include unistd.h
svn path=/trunk/externals/miXed/; revision=16960
-rw-r--r--Makefile.common8
-rw-r--r--cyclone/Makefile.libdir10
-rw-r--r--cyclone/shadow/dummies.c2
-rw-r--r--shared/common/port.c2
4 files changed, 11 insertions, 11 deletions
diff --git a/Makefile.common b/Makefile.common
index 3ceb6bd..2921ed4 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -48,9 +48,9 @@ LFLAGS = -Wl,--export-dynamic -shared
# FIXME strict-aliasing
OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing -fPIC
ifeq ($(MY_NAME),krzYszcz)
-DEFINES = -DUNIX -DKRZYSZCZ
+DEFINES = -DUNIX -DHAVE_UNISTD_H -DKRZYSZCZ
else
-DEFINES = -DUNIX
+DEFINES = -DUNIX -DHAVE_UNISTD_H
endif
endif
@@ -60,7 +60,7 @@ CC = gcc
X_SUFFIX = dll
# OPT_CFLAGS gets overridden in Pd-extended builds for optimization
# flags, so stick -mms-bitfieds here so that it doesn't get overridden
-DEFINES = -mms-bitfields -DNT -DMSW
+DEFINES = -mms-bitfields
OPT_CFLAGS = -funroll-loops
LFLAGS = -shared -L$(PD_DIR) -L$(PD_DIR)/../bin/ -lpd
endif
@@ -68,7 +68,7 @@ endif
ifeq ($(OS_NAME),Darwin)
CC = gcc
X_SUFFIX = pd_darwin
-DEFINES = -DUNIX -DMACOSX
+DEFINES = -DUNIX -DHAVE_UNISTD_H
OPT_CFLAGS = -O2 -funroll-loops -fomit-frame-pointer
# perhaps "-undefined suppress" would be a better choice, when we go dynamic
# with our own common code? (not likely to happen soon...)
diff --git a/cyclone/Makefile.libdir b/cyclone/Makefile.libdir
index 920c080..9b6d756 100644
--- a/cyclone/Makefile.libdir
+++ b/cyclone/Makefile.libdir
@@ -41,7 +41,7 @@ ifeq ($(UNAME),Darwin)
else
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4
endif
- CFLAGS += -DUNIX $(FAT_FLAGS) -fPIC -I/sw/include
+ CFLAGS += -DUNIX -DHAVE_UNISTD_H $(FAT_FLAGS) -fPIC -I/sw/include
LDFLAGS += $(FAT_FLAGS) -bundle -undefined dynamic_lookup -L/sw/lib
# if the 'pd' binary exists, check the linking against it to aid with stripping
LDFLAGS += $(shell test -e $(PD_PATH)/bin/pd && echo -bundle_loader $(PD_PATH)/bin/pd)
@@ -57,7 +57,7 @@ ifeq ($(UNAME),Linux)
OS = linux
PD_PATH = /usr
OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer
- CFLAGS += -DUNIX -fPIC
+ CFLAGS += -DUNIX -DHAVE_UNISTD_H -fPIC
LDFLAGS += -rdynamic -shared -fPIC
LIBS += -lc
STRIP = strip --strip-unneeded -R .note -R .comment
@@ -69,7 +69,7 @@ ifeq ($(UNAME),GNU)
OS = linux
PD_PATH = /usr
OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer
- CFLAGS += -DUNIX -fPIC
+ CFLAGS += -DUNIX -DHAVE_UNISTD_H -fPIC
LDFLAGS += -rdynamic -shared -fPIC
LIBS += -lc
STRIP = strip --strip-unneeded -R .note -R .comment
@@ -81,7 +81,7 @@ ifeq ($(UNAME),GNU/kFreeBSD)
OS = linux
PD_PATH = /usr
OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer
- CFLAGS += -DUNIX -fPIC
+ CFLAGS += -DUNIX -DHAVE_UNISTD_H -fPIC
LDFLAGS += -rdynamic -shared -fPIC
LIBS += -lc
STRIP = strip --strip-unneeded -R .note -R .comment
@@ -93,7 +93,7 @@ ifeq (CYGWIN,$(findstring CYGWIN,$(UNAME)))
OS = cygwin
PD_PATH = $(cygpath $(PROGRAMFILES))/pd
OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer
- CFLAGS += -DUNIX
+ CFLAGS += -DUNIX -DHAVE_UNISTD_H
LDFLAGS += -Wl,--export-dynamic -shared -L"$(PD_PATH)/src" -L"$(PD_PATH)/bin"
LIBS += -lc -lpd
STRIP = strip --strip-unneeded -R .note -R .comment
diff --git a/cyclone/shadow/dummies.c b/cyclone/shadow/dummies.c
index 18ce3e8..1d18753 100644
--- a/cyclone/shadow/dummies.c
+++ b/cyclone/shadow/dummies.c
@@ -3,7 +3,7 @@
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
#include <string.h>
-#ifdef UNIX
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef _WIN32
diff --git a/shared/common/port.c b/shared/common/port.c
index 6fdcaef..79a8885 100644
--- a/shared/common/port.c
+++ b/shared/common/port.c
@@ -7,7 +7,7 @@
/* LATER quoting */
/* LATER rethink inlet/inlet~ case */
-#ifdef UNIX
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef _WIN32