summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2009-11-12 12:17:10 (GMT)
committerChristian Pointner <equinox@helsinki.at>2009-11-12 12:17:10 (GMT)
commitb1b45ac9f2e1c77f5f107f9959a8a6ba4759d99d (patch)
tree0c0e7dfe4a8721509cb45ecf724e9dde8be6afa9
parente03626e843d042ba464a05f284d9561c5560039c (diff)
fixed include guards
small makefile cleanups
-rw-r--r--Makefile24
-rw-r--r--client_list.h4
-rw-r--r--command_queue.h4
-rw-r--r--daemon.h4
-rw-r--r--datatypes.h4
-rw-r--r--key_value_storage.h4
-rw-r--r--log.h4
-rw-r--r--log_targets.h5
-rw-r--r--options.h4
-rw-r--r--sig_handler.c2
-rw-r--r--sig_handler.h6
-rw-r--r--string_list.h4
-rw-r--r--utils.h4
13 files changed, 38 insertions, 35 deletions
diff --git a/Makefile b/Makefile
index eb5f1a5..1686450 100644
--- a/Makefile
+++ b/Makefile
@@ -26,14 +26,14 @@ endif
EXECUTABLE := switchctl
OBJ := log.o \
- sig_handler.o \
- options.o \
- string_list.o \
- key_value_storage.o \
- command_queue.o \
- client_list.o \
- utils.o \
- switchctl.o
+ sig_handler.o \
+ options.o \
+ string_list.o \
+ key_value_storage.o \
+ command_queue.o \
+ client_list.o \
+ utils.o \
+ switchctl.o
SRC := $(OBJ:%.o=%.c)
@@ -43,10 +43,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/client_list.h b/client_list.h
index 58756a7..ba888ae 100644
--- a/client_list.h
+++ b/client_list.h
@@ -19,8 +19,8 @@
* along with rhctl. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _CLIENT_LIST_H_
-#define _CLIENT_LIST_H_
+#ifndef RHCTL_client_list_h_INCLUDED
+#define RHCTL_client_list_h_INCLUDED
#include "datatypes.h"
diff --git a/command_queue.h b/command_queue.h
index d77a6f6..dbd2091 100644
--- a/command_queue.h
+++ b/command_queue.h
@@ -19,8 +19,8 @@
* along with door_daemon. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _COMMAND_QUEUE_H_
-#define _COMMAND_QUEUE_H_
+#ifndef RHCTL_command_queue_h_INCLUDED
+#define RHCTL_command_queue_h_INCLUDED
#include <sys/time.h>
diff --git a/daemon.h b/daemon.h
index afe1a27..599ecec 100644
--- a/daemon.h
+++ b/daemon.h
@@ -33,8 +33,8 @@
* along with uAnytun. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _DAEMON_H_
-#define _DAEMON_H_
+#ifndef UANYUTN_daemon_h_INCLUDED
+#define UANYUTN_daemon_h_INCLUDED
#include <poll.h>
#include <fcntl.h>
diff --git a/datatypes.h b/datatypes.h
index cb8ed44..e0d1774 100644
--- a/datatypes.h
+++ b/datatypes.h
@@ -19,8 +19,8 @@
* along with rhctl. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _DATATYPES_H_
-#define _DATATYPES_H_
+#ifndef RHCTL_datatypes_h_INCLUDED
+#define RHCTL_datatypes_h_INCLUDED
#include <stdint.h>
#include <arpa/inet.h>
diff --git a/key_value_storage.h b/key_value_storage.h
index 0fc4e00..bf7a493 100644
--- a/key_value_storage.h
+++ b/key_value_storage.h
@@ -19,8 +19,8 @@
* along with rhctl. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _KEY_VALUE_STORAGE_H_
-#define _KEY_VALUE_STORAGE_H_
+#ifndef RHCTL_key_value_storage_h_INCLUDED
+#define RHCTL_key_value_storage_h_INCLUDED
#include "string_list.h"
diff --git a/log.h b/log.h
index fc97549..513f506 100644
--- a/log.h
+++ b/log.h
@@ -33,8 +33,8 @@
* along with uAnytun. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _LOG_H_
-#define _LOG_H_
+#ifndef UANYUTN_log_h_INCLUDED
+#define UANYUTN_log_h_INCLUDED
#define MSG_LENGTH_MAX 150
diff --git a/log_targets.h b/log_targets.h
index ca2d762..563d04c 100644
--- a/log_targets.h
+++ b/log_targets.h
@@ -33,6 +33,9 @@
* along with uAnytun. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef UANYUTN_log_targets_h_INCLUDED
+#define UANYUTN_log_targets_h_INCLUDED
+
#include <time.h>
static char* get_time_formatted()
@@ -356,3 +359,5 @@ log_target_t* log_target_stderr_new()
return tmp;
}
+
+#endif
diff --git a/options.h b/options.h
index 4d070da..4be144a 100644
--- a/options.h
+++ b/options.h
@@ -19,8 +19,8 @@
* along with rhctl. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _OPTIONS_H_
-#define _OPTIONS_H_
+#ifndef RHCTL_options_h_INCLUDED
+#define RHCTL_options_h_INCLUDED
#include "string_list.h"
#include "key_value_storage.h"
diff --git a/sig_handler.c b/sig_handler.c
index 8be2de3..ca2e18f 100644
--- a/sig_handler.c
+++ b/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/sig_handler.h b/sig_handler.h
index 733531d..d88fed2 100644
--- a/sig_handler.h
+++ b/sig_handler.h
@@ -33,10 +33,8 @@
* along with uAnytun. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _SIG_HANDLER_H_
-#define _SIG_HANDLER_H_
-
-#include <signal.h>
+#ifndef UANYUTN_sig_handler_h_INCLUDED
+#define UANYUTN_sig_handler_h_INCLUDED
int signal_init();
int signal_handle();
diff --git a/string_list.h b/string_list.h
index ed4ef13..df5ca75 100644
--- a/string_list.h
+++ b/string_list.h
@@ -33,8 +33,8 @@
* along with uAnytun. If not, see <http://www.gnu.org/licenses/>.
*/
-#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_;
diff --git a/utils.h b/utils.h
index 806a4d4..39dae46 100644
--- a/utils.h
+++ b/utils.h
@@ -19,8 +19,8 @@
* along with rhctl. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _UTILS_H_
-#define _UTILS_H_
+#ifndef RHCTL_utils_h_INCLUDED
+#define RHCTL_utils_h_INCLUDED
#include "options.h"
#include <termios.h>