aboutsummaryrefslogtreecommitdiff
path: root/send+dump
diff options
context:
space:
mode:
authorjdl <x75@users.sourceforge.net>2004-02-13 00:34:33 +0000
committerjdl <x75@users.sourceforge.net>2004-02-13 00:34:33 +0000
commitaca0c3c63a600a68ac2921d0cc2cb8eb1a4f293d (patch)
treebb64de89978b6a39f4c4d57543f03f9597de3a65 /send+dump
parent729fd1a89907541a76926f14198c714009dc4595 (diff)
fixed some OSX stuff
svn path=/trunk/externals/OSCx/; revision=1319
Diffstat (limited to 'send+dump')
-rw-r--r--send+dump/Makefile9
-rw-r--r--send+dump/dumpOSC.c9
-rw-r--r--send+dump/htmsocket.c5
3 files changed, 17 insertions, 6 deletions
diff --git a/send+dump/Makefile b/send+dump/Makefile
index 7521258..a2d1180 100644
--- a/send+dump/Makefile
+++ b/send+dump/Makefile
@@ -1,7 +1,11 @@
LIBOSCDIR = ../libOSC
LIBOSC = ${LIBOSCDIR}/libOSC.a
-CFLAGS= -O2 -I$(LIBOSCDIR) -Wall
-DEFS= -Dunix
+# for eg. linux
+# DEFS= -Dunix
+# for MAC OSX, should be DARWIN
+DEFS=-Dunix -DMACOSX
+
+CFLAGS= -O2 -I$(LIBOSCDIR) $(DEFS) -Wall
DUMPOBJS=dumpOSC.o
@@ -19,6 +23,7 @@ dumpUDP: dumpUDP.o
${LIBOSC}:
echo "You need to go to " ${LIBOSCDIR} " and do a make."
+ (cd ../libOSC ; make)
clean:
rm -f sendOSC dumpOSC *.o
diff --git a/send+dump/dumpOSC.c b/send+dump/dumpOSC.c
index fc53fd5..0837586 100644
--- a/send+dump/dumpOSC.c
+++ b/send+dump/dumpOSC.c
@@ -83,8 +83,10 @@ Technologies, University of California, Berkeley.
#include <signal.h>
#include <grp.h>
#include <sys/file.h>
-#include <sys/prctl.h>
-#include <bits/sigset.h>
+#ifndef MACOSX
+ #include <sys/prctl.h>
+ #include <bits/sigset.h>
+#endif
#ifdef NEED_SCHEDCTL_AND_LOCK
#include <sys/schedctl.h>
@@ -632,8 +634,9 @@ printf("polldev %d\n", polldevs[j].fd);
printf("nfds %d\n", nfds);
*/
caught_sigint = 0;
+#ifndef MACOSX
sigset(SIGINT, catch_sigint); /* set sig handler */
-
+#endif
while(!caught_sigint)
{
diff --git a/send+dump/htmsocket.c b/send+dump/htmsocket.c
index 38b51b6..1788cc3 100644
--- a/send+dump/htmsocket.c
+++ b/send+dump/htmsocket.c
@@ -38,6 +38,7 @@ University of California, Berkeley.
#include <stdio.h>
+#include <strings.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -61,7 +62,9 @@ University of California, Berkeley.
#include <sys/file.h>
#include <sys/time.h>
#include <sys/types.h>
-#include <sys/prctl.h>
+#ifndef MACOSX
+ #include <sys/prctl.h>
+#endif
#include <stdlib.h>