From: AceVest Date: Wed, 9 Jul 2014 15:32:23 +0000 (+0800) Subject: add test env in main X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=375877c8f32d25f3db066259a472d579e7d1fd91;p=acecode.git add test env in main --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..17fbe89 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.o +*.out diff --git a/learn/test/main.c b/learn/test/main.c new file mode 100644 index 0000000..8abc499 --- /dev/null +++ b/learn/test/main.c @@ -0,0 +1,17 @@ +/* + * ------------------------------------------------------------------------ + * File Name: main.c + * Author: Zhao Yanbai + * Wed Jul 9 23:28:56 2014 + * Description: none + * ------------------------------------------------------------------------ + */ +#include + +int main(int argc, char *argv[], char *env[]) { + unsigned int i; + for(i=0; env[i]; ++i) + printf("env[%u] %s\n", i, env[i]); + + return 0; +} diff --git a/tools/Makefile b/tools/Makefile index 0a8a0fd..0b5db24 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -11,8 +11,8 @@ DST = /usr/local/bin/ .PHONY:every every: $(BINS) - sudo cp $(BINS) $(DST) - sudo cp $(SCRIPTS) $(DST) + cp $(BINS) $(DST) + cp $(SCRIPTS) $(DST) .PHONY:clean clean: rm $(BINS) -f diff --git a/tools/hack/netpeeper/makefile b/tools/hack/netpeeper/makefile index a3efcd6..47b815c 100644 --- a/tools/hack/netpeeper/makefile +++ b/tools/hack/netpeeper/makefile @@ -15,7 +15,7 @@ OBJS = $(patsubst %.c,%.o,$(SOUCE_FILES)) $(CC) -c $(CFLAGS) $< -o $@ $(TARGET): $(OBJS) - gcc -o $@ $^ -lnids -lnet -lpcap -lgthread-2.0 + gcc -o $@ $^ -lnids -lnet -lpcap -lpthread .PHONY:clean clean: