From 629238875b234aaa1a33b0eefc76bd89b8cb3a54 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 12 Nov 2009 12:24:42 +0000 Subject: [PATCH] fixed include guards cleaned Makefile --- door_daemon/Makefile | 20 ++++++++++---------- door_daemon/client_list.h | 4 ++-- door_daemon/command_queue.h | 4 ++-- door_daemon/daemon.h | 4 ++-- door_daemon/datatypes.h | 4 ++-- door_daemon/log.h | 4 ++-- door_daemon/log_targets.h | 5 +++++ door_daemon/options.h | 4 ++-- door_daemon/sig_handler.c | 2 +- door_daemon/sig_handler.h | 6 ++---- door_daemon/string_list.h | 4 ++-- 11 files changed, 32 insertions(+), 29 deletions(-) diff --git a/door_daemon/Makefile b/door_daemon/Makefile index fd857a9..95ba1aa 100644 --- a/door_daemon/Makefile +++ b/door_daemon/Makefile @@ -26,12 +26,12 @@ endif EXECUTABLE := door_daemon OBJ := log.o \ - sig_handler.o \ - options.o \ - string_list.o \ - command_queue.o \ - client_list.o \ - door_daemon.o + sig_handler.o \ + options.o \ + string_list.o \ + command_queue.o \ + client_list.o \ + door_daemon.o SRC := $(OBJ:%.o=%.c) @@ -41,10 +41,10 @@ SRC := $(OBJ:%.o=%.c) all: $(EXECUTABLE) %.d: %.c - @set -e; rm -f $@; \ - $(CC) -MM $(CFLAGS) $< > $@.$$$$; \ - sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ - rm -f $@.$$$$; echo '(re)building $@' + @set -e; rm -f $@; \ + $(CC) -MM $(CFLAGS) $< > $@.$$$$; \ + sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ + rm -f $@.$$$$; echo '(re)building $@' ifneq ($(MAKECMDGOALS),distclean) -include $(SRC:%.c=%.d) diff --git a/door_daemon/client_list.h b/door_daemon/client_list.h index 8e2ff7c..819362b 100644 --- a/door_daemon/client_list.h +++ b/door_daemon/client_list.h @@ -19,8 +19,8 @@ * along with door_daemon. If not, see . */ -#ifndef _CLIENT_LIST_H_ -#define _CLIENT_LIST_H_ +#ifndef DOOR_DAEMON_client_list_h_INCLUDED +#define DOOR_DAEMON_client_list_h_INCLUDED #include "datatypes.h" diff --git a/door_daemon/command_queue.h b/door_daemon/command_queue.h index 9d1ccc6..707b4c3 100644 --- a/door_daemon/command_queue.h +++ b/door_daemon/command_queue.h @@ -19,8 +19,8 @@ * along with door_daemon. If not, see . */ -#ifndef _COMMAND_QUEUE_H_ -#define _COMMAND_QUEUE_H_ +#ifndef DOOR_DAEMON_command_queue_h_INCLUDED +#define DOOR_DAEMON_command_queue_h_INCLUDED #include diff --git a/door_daemon/daemon.h b/door_daemon/daemon.h index afe1a27..599ecec 100644 --- a/door_daemon/daemon.h +++ b/door_daemon/daemon.h @@ -33,8 +33,8 @@ * along with uAnytun. If not, see . */ -#ifndef _DAEMON_H_ -#define _DAEMON_H_ +#ifndef UANYUTN_daemon_h_INCLUDED +#define UANYUTN_daemon_h_INCLUDED #include #include diff --git a/door_daemon/datatypes.h b/door_daemon/datatypes.h index d916946..cfac0c4 100644 --- a/door_daemon/datatypes.h +++ b/door_daemon/datatypes.h @@ -19,8 +19,8 @@ * along with door_daemon. If not, see . */ -#ifndef _DATATYPES_H_ -#define _DATATYPES_H_ +#ifndef DOOR_DAEMON_datatypes_h_INCLUDED +#define DOOR_DAEMON_datatypes_h_INCLUDED #include #include diff --git a/door_daemon/log.h b/door_daemon/log.h index fc97549..513f506 100644 --- a/door_daemon/log.h +++ b/door_daemon/log.h @@ -33,8 +33,8 @@ * along with uAnytun. If not, see . */ -#ifndef _LOG_H_ -#define _LOG_H_ +#ifndef UANYUTN_log_h_INCLUDED +#define UANYUTN_log_h_INCLUDED #define MSG_LENGTH_MAX 150 diff --git a/door_daemon/log_targets.h b/door_daemon/log_targets.h index ca2d762..563d04c 100644 --- a/door_daemon/log_targets.h +++ b/door_daemon/log_targets.h @@ -33,6 +33,9 @@ * along with uAnytun. If not, see . */ +#ifndef UANYUTN_log_targets_h_INCLUDED +#define UANYUTN_log_targets_h_INCLUDED + #include static char* get_time_formatted() @@ -356,3 +359,5 @@ log_target_t* log_target_stderr_new() return tmp; } + +#endif diff --git a/door_daemon/options.h b/door_daemon/options.h index 3a0a9cf..2a76da7 100644 --- a/door_daemon/options.h +++ b/door_daemon/options.h @@ -19,8 +19,8 @@ * along with door_daemon. If not, see . */ -#ifndef _OPTIONS_H_ -#define _OPTIONS_H_ +#ifndef DOOR_DAEMON_options_h_INCLUDED +#define DOOR_DAEMON_options_h_INCLUDED #include "string_list.h" diff --git a/door_daemon/sig_handler.c b/door_daemon/sig_handler.c index 8be2de3..ca2e18f 100644 --- a/door_daemon/sig_handler.c +++ b/door_daemon/sig_handler.c @@ -121,7 +121,7 @@ int signal_handle() int return_value = 0; int sig; - for(sig=1; sig < _NSIG; ++sig) { + for(sig=1; sig < NSIG; ++sig) { if(sigismember(&set, sig)) { switch(sig) { case SIGINT: log_printf(NOTICE, "SIG-Int caught, exitting"); return_value = 1; break; diff --git a/door_daemon/sig_handler.h b/door_daemon/sig_handler.h index 733531d..d88fed2 100644 --- a/door_daemon/sig_handler.h +++ b/door_daemon/sig_handler.h @@ -33,10 +33,8 @@ * along with uAnytun. If not, see . */ -#ifndef _SIG_HANDLER_H_ -#define _SIG_HANDLER_H_ - -#include +#ifndef UANYUTN_sig_handler_h_INCLUDED +#define UANYUTN_sig_handler_h_INCLUDED int signal_init(); int signal_handle(); diff --git a/door_daemon/string_list.h b/door_daemon/string_list.h index ed4ef13..df5ca75 100644 --- a/door_daemon/string_list.h +++ b/door_daemon/string_list.h @@ -33,8 +33,8 @@ * along with uAnytun. If not, see . */ -#ifndef _STRING_LIST_H_ -#define _STRING_LIST_H_ +#ifndef UANYUTN_string_list_h_INCLUDED +#define UANYUTN_string_list_h_INCLUDED struct string_list_element_struct { char* string_; -- 1.7.10.4