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)
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)
* along with door_daemon. If not, see <http://www.gnu.org/licenses/>.
*/
-#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"
* along with door_daemon. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _COMMAND_QUEUE_H_
-#define _COMMAND_QUEUE_H_
+#ifndef DOOR_DAEMON_command_queue_h_INCLUDED
+#define DOOR_DAEMON_command_queue_h_INCLUDED
#include <sys/time.h>
* 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>
* along with door_daemon. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _DATATYPES_H_
-#define _DATATYPES_H_
+#ifndef DOOR_DAEMON_datatypes_h_INCLUDED
+#define DOOR_DAEMON_datatypes_h_INCLUDED
#include <stdint.h>
#include <arpa/inet.h>
* 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
* 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()
return tmp;
}
+
+#endif
* along with door_daemon. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _OPTIONS_H_
-#define _OPTIONS_H_
+#ifndef DOOR_DAEMON_options_h_INCLUDED
+#define DOOR_DAEMON_options_h_INCLUDED
#include "string_list.h"
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;
* 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();
* 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_;