Commit 2b12535e authored by Albert Gräf's avatar Albert Gräf
Browse files

fix HAVE_UNISTD_H glitches

parent 19bc01e8
......@@ -36,7 +36,7 @@
#ifdef DL_OPEN
# include <dlfcn.h>
#endif
#ifdef UNISTD
#ifdef HAVE_UNISTD_H
# include <stdlib.h>
# include <unistd.h>
#endif
......
......@@ -121,7 +121,7 @@ dnl This should be fixed so Pd can use ALSA shared libraries where appropriate.
LDFLAGS="$LDFLAGS -static"
fi
EXT=pd_linux
CPPFLAGS="-DHAVE_LIBDL -DPA_USE_OSS -DUNIX -DUNISTD -fno-strict-aliasing"
CPPFLAGS="-DHAVE_LIBDL -DPA_USE_OSS -DUNIX -DHAVE_UNISTD_H -fno-strict-aliasing"
dnl No OSS on hurd
if test `uname -s` = "GNU";
then
......
......@@ -14,7 +14,7 @@
#include <fcntl.h>
#include <stdlib.h>
#ifdef UNISTD
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef MSW
......@@ -519,7 +519,7 @@ static char *(usagemessage[]) = {
"-send \"msg...\" -- send a message at startup, after patches are loaded\n",
"-noprefs -- suppress loading preferences on startup\n",
"-console -- open the console along with the pd window\n",
#ifdef UNISTD
#ifdef HAVE_UNISTD_H
"-rt or -realtime -- use real-time priority\n",
"-nrt -- don't use real-time priority\n",
#endif
......@@ -996,7 +996,7 @@ int sys_argparse(int argc, char **argv)
sys_noautopatch = 0;
argc--; argv++;
}
#ifdef UNISTD
#ifdef HAVE_UNISTD_H
else if (!strcmp(*argv, "-rt") || !strcmp(*argv, "-realtime"))
{
sys_hipriority = 1;
......
......@@ -14,7 +14,7 @@
#define DEBUG(x)
#include <stdlib.h>
#ifdef UNISTD
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#include <sys/stat.h>
#endif
......@@ -360,7 +360,7 @@ int sys_trytoopenone(const char *dir, const char *name, const char* ext,
if ((fd=open(dirresult,O_RDONLY | MSWOPENFLAG(bin))) >= 0)
{
/* in unix, further check that it's not a directory */
#ifdef UNISTD
#ifdef HAVE_UNISTD_H
struct stat statbuf;
int ok = ((fstat(fd, &statbuf) >= 0) &&
!S_ISDIR(statbuf.st_mode));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment