Set C standard to C99
Also include strings.h where strcasecmp() is used
This commit is contained in:
parent
b3f8e7118a
commit
d6c3426b84
|
@ -10,7 +10,7 @@ HEAD_COMMIT = `git rev-parse --short HEAD`
|
|||
|
||||
LIBPATH = -L.
|
||||
LDFLAGS += -lz `sh osflags $(TARGETOS) link` $(LIBPATH)
|
||||
CFLAGS += -c -g -Wall -D$(OS) -pedantic `sh osflags $(TARGETOS) cflags` -DGITREVISION=\"$(HEAD_COMMIT)\"
|
||||
CFLAGS += -std=c99 -c -g -Wall -D$(OS) -pedantic `sh osflags $(TARGETOS) cflags` -DGITREVISION=\"$(HEAD_COMMIT)\"
|
||||
|
||||
all: stateos $(CLIENT) $(SERVER)
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/param.h>
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef WINDOWS32
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/param.h>
|
||||
|
|
|
@ -33,7 +33,7 @@ cflags)
|
|||
echo '-Dsocklen_t=int';
|
||||
;;
|
||||
Linux)
|
||||
FLAGS="";
|
||||
FLAGS="-D_GNU_SOURCE"
|
||||
[ -e /usr/include/selinux/selinux.h ] && FLAGS="$FLAGS -DHAVE_SETCON";
|
||||
[ -e /usr/include/systemd/sd-daemon.h ] && FLAGS="$FLAGS -DHAVE_SYSTEMD";
|
||||
echo $FLAGS;
|
||||
|
|
|
@ -6,7 +6,7 @@ OS = `uname | tr "a-z" "A-Z"`
|
|||
|
||||
CHECK_PATH = /usr/local
|
||||
LDFLAGS = -L$(CHECK_PATH)/lib `pkg-config check --libs` -lpthread `sh ../src/osflags $(TARGETOS) link`
|
||||
CFLAGS = -g -Wall -D$(OS) `pkg-config check --cflags` -I../src -I$(CHECK_PATH)/include -pedantic `sh ../src/osflags $(TARGETOS) cflags`
|
||||
CFLAGS = -std=c99 -g -Wall -D$(OS) `pkg-config check --cflags` -I../src -I$(CHECK_PATH)/include -pedantic `sh ../src/osflags $(TARGETOS) cflags`
|
||||
|
||||
all: $(TEST)
|
||||
@LD_LIBRARY_PATH=${CHECK_PATH}/lib ./$(TEST)
|
||||
|
|
Loading…
Reference in New Issue