aboutsummaryrefslogtreecommitdiff
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
parent32277d1a5af19be53733fe77949e4efda17cdd7e (diff)
reduce warnings pass #1
svn path=/trunk/externals/OSCx/; revision=179
-rw-r--r--OSC/OSC-pattern-match.c9
-rw-r--r--OSC/makefile1
-rw-r--r--OSC/routeOSC.c3
-rw-r--r--OSC/sendOSC.c3
-rw-r--r--libOSC/Makefile5
-rw-r--r--libOSC/OSC-client.c4
-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
10 files changed, 36 insertions, 15 deletions
diff --git a/OSC/OSC-pattern-match.c b/OSC/OSC-pattern-match.c
index c3000c1..5e8226d 100644
--- a/OSC/OSC-pattern-match.c
+++ b/OSC/OSC-pattern-match.c
@@ -35,9 +35,14 @@ The OpenSound Control WWW page is
Matt Wright, 3/16/98
Adapted from oscpattern.c, by Matt Wright and Amar Chaudhury
*/
-#ifdef MACOSX
-#include <stdio.h>
+#ifdef UNIX
+ #include <stdio.h>
#endif
+
+// #ifdef MACOSX
+// #include <stdio.h>
+// #endif
+
#include "OSC-common.h"
#include "OSC-pattern-match.h"
diff --git a/OSC/makefile b/OSC/makefile
index 515e7a8..346be68 100644
--- a/OSC/makefile
+++ b/OSC/makefile
@@ -4,6 +4,7 @@ NAME=OSC
EXT=o
LIBS = -lm -lc
LIBOSC = ../libOSC/libOSC.a
+DEFS= -Dunix
# ----------------------- Mac OS X (Darwin) -----------------------
diff --git a/OSC/routeOSC.c b/OSC/routeOSC.c
index 1b3a264..4bd1185 100644
--- a/OSC/routeOSC.c
+++ b/OSC/routeOSC.c
@@ -61,6 +61,9 @@ The OpenSound Control WWW page is
#ifdef MACOSX
#include <stdio.h>
#endif
+#ifdef UNIX
+ #include <stdio.h>
+#endif
/* structure definition of your object */
#define MAX_NUM 20
diff --git a/OSC/sendOSC.c b/OSC/sendOSC.c
index 7c0e228..4eb8e99 100644
--- a/OSC/sendOSC.c
+++ b/OSC/sendOSC.c
@@ -83,6 +83,7 @@ compiling:
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
+ #include <ctype.h>
#endif
///////////////////////
@@ -707,7 +708,7 @@ typedArg ParseToken(char *token) {
int WriteMessage(OSCbuf *buf, char *messageName, int numArgs, typedArg *args) {
int j, returnVal;
- const wmERROR = -1;
+ const int wmERROR = -1;
returnVal = 0;
diff --git a/libOSC/Makefile b/libOSC/Makefile
index 6261b37..fb21a26 100644
--- a/libOSC/Makefile
+++ b/libOSC/Makefile
@@ -1,4 +1,5 @@
-CFLAGS= -O2
+CFLAGS= -O2 -Wall
+DEFS= -Dunix
LIB=libOSC.a
LIBOBJS= ${LIB}(OSC-client.o) ${LIB}(OSC-timetag.o)
@@ -6,7 +7,7 @@ LIBOBJS= ${LIB}(OSC-client.o) ${LIB}(OSC-timetag.o)
all: ${LIBOBJS}
.c.a:
- ${CC} -c ${CFLAGS} $<
+ ${CC} -c ${CFLAGS} ${DEFS} $<
${AR} ${ARFLAGS} $@ $*.o
rm -f $*.o
diff --git a/libOSC/OSC-client.c b/libOSC/OSC-client.c
index 27b07d0..2024d34 100644
--- a/libOSC/OSC-client.c
+++ b/libOSC/OSC-client.c
@@ -64,6 +64,10 @@ University of California, Berkeley.
#include <sys/stat.h>
#endif
+#ifdef unix
+ #include <netinet/in.h>
+ #include <stdio.h>
+#endif
#include "OSC-client.h"
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;