aboutsummaryrefslogtreecommitdiff
path: root/send+dump
diff options
context:
space:
mode:
authorjdl <x75@users.sourceforge.net>2002-10-20 16:01:10 +0000
committerjdl <x75@users.sourceforge.net>2002-10-20 16:01:10 +0000
commit749a6ec63a8f257c2b54511f1d7a5467ea4c38d9 (patch)
treecc19243d19b5a825456ac009b36d0765c4241dc3 /send+dump
parent32277d1a5af19be53733fe77949e4efda17cdd7e (diff)
reduce warnings pass #1
svn path=/trunk/externals/OSCx/; revision=179
Diffstat (limited to 'send+dump')
-rw-r--r--send+dump/Makefile9
-rw-r--r--send+dump/dumpOSC.c5
-rw-r--r--send+dump/htmsocket.c6
-rw-r--r--send+dump/sendOSC.c6
4 files changed, 16 insertions, 10 deletions
diff --git a/send+dump/Makefile b/send+dump/Makefile
index 7b14a43..7521258 100644
--- a/send+dump/Makefile
+++ b/send+dump/Makefile
@@ -1,6 +1,7 @@
LIBOSCDIR = ../libOSC
LIBOSC = ${LIBOSCDIR}/libOSC.a
-CFLAGS= -O2 -I$(LIBOSCDIR)
+CFLAGS= -O2 -I$(LIBOSCDIR) -Wall
+DEFS= -Dunix
DUMPOBJS=dumpOSC.o
@@ -8,13 +9,13 @@ DUMPOBJS=dumpOSC.o
both: sendOSC dumpOSC
sendOSC: sendOSC.o htmsocket.o ${LIBOSC}
- ${CC} -o sendOSC sendOSC.o htmsocket.o ${LIBOSC}
+ ${CC} ${CFLAGS} ${DEFS} -o sendOSC sendOSC.o htmsocket.o ${LIBOSC}
dumpOSC: ${DUMPOBJS}
- ${CC} -o $@ ${DUMPOBJS}
+ ${CC} ${CFLAGS} ${DEFS} -o $@ ${DUMPOBJS}
dumpUDP: dumpUDP.o
- ${CC} -o dumpUDP dumpUDP.o
+ ${CC} ${CFLAGS} ${DEFS} -o dumpUDP dumpUDP.o
${LIBOSC}:
echo "You need to go to " ${LIBOSCDIR} " and do a make."
diff --git a/send+dump/dumpOSC.c b/send+dump/dumpOSC.c
index 143a994..083aed0 100644
--- a/send+dump/dumpOSC.c
+++ b/send+dump/dumpOSC.c
@@ -84,6 +84,7 @@ Technologies, University of California, Berkeley.
#include <grp.h>
#include <sys/file.h>
#include <sys/prctl.h>
+#include <bits/sigset.h>
#ifdef NEED_SCHEDCTL_AND_LOCK
#include <sys/schedctl.h>
@@ -172,7 +173,7 @@ static int initudp(int chan)
}
static void closeudp(int sockfd) {
- close(sockfd);
+ close(sockfd);
}
static Boolean catchupflag=FALSE;
@@ -692,7 +693,7 @@ printf("polldev %d\n", polldevs[j].fd);
}
}
} /* End of while(!caught_sigint) */
-
+ closeudp(sockfd);
out: ;
}
diff --git a/send+dump/htmsocket.c b/send+dump/htmsocket.c
index e4f447f..cb00d4f 100644
--- a/send+dump/htmsocket.c
+++ b/send+dump/htmsocket.c
@@ -93,8 +93,8 @@ void *OpenHTMSocket(char *host, int portnumber)
return 0;
if(!host)
{
- char *mktemp(char *);
- int clilen;
+ // char *mkstemp(char *);
+ int clilen;
o->len = sizeof(ucl_addr);
/*
* Fill in the structure "userv_addr" with the address of the
@@ -124,7 +124,7 @@ void *OpenHTMSocket(char *host, int portnumber)
ucl_addr.sun_family = AF_UNIX;
strcpy(ucl_addr.sun_path, UNIXDG_TMP);
- mktemp(ucl_addr.sun_path);
+ mkstemp(ucl_addr.sun_path);
clilen = sizeof(ucl_addr.sun_family) + strlen(ucl_addr.sun_path);
if (bind(sockfd, (struct sockaddr *) &ucl_addr, clilen) < 0)
diff --git a/send+dump/sendOSC.c b/send+dump/sendOSC.c
index db188dd..d37a539 100644
--- a/send+dump/sendOSC.c
+++ b/send+dump/sendOSC.c
@@ -55,6 +55,10 @@ compiling:
/* #include <bstring.h> */
#include <string.h>
+#ifdef unix
+ #include <ctype.h>
+ #include <netinet/in.h>
+#endif
typedef struct {
enum {INT, FLOAT, STRING} type;
@@ -88,7 +92,7 @@ static int exitStatus = 0;
static int useTypeTags = 1;
-main(int argc, char *argv[]) {
+int main(int argc, char *argv[]) {
int portnumber;
char *hostname = 0;
void *htmsocket;