From 0925b30990cbaa485318b13822023de6a8060e50 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 21 Oct 2014 14:08:48 +0200 Subject: use ISO C11 standard and move includes to header file --- Makefile | 2 +- pacredir.c | 30 ------------------------------ pacredir.h | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 31 deletions(-) diff --git a/Makefile b/Makefile index 8f32499..e3a7728 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ INSTALL := install CP := cp RM := rm SED := sed -CFLAGS += -O2 -Wall -Werror +CFLAGS += -std=c11 -O2 -Wall -Werror CFLAGS += -lpthread CFLAGS += $(shell pkg-config --libs --cflags libcurl) CFLAGS += $(shell pkg-config --libs --cflags avahi-client) diff --git a/pacredir.c b/pacredir.c index 850b2a8..7d76f23 100644 --- a/pacredir.c +++ b/pacredir.c @@ -5,36 +5,6 @@ * of the GNU General Public License, incorporated herein by reference. */ -/* glibc headers */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* Avahi headers */ -#include -#include -#include - -/* various headers needing linker options */ -#include -#include -#include -#include - -/* compile time configuration */ -#include "arch.h" -#include "config.h" -#include "version.h" - /* define structs and functions */ #include "pacredir.h" diff --git a/pacredir.h b/pacredir.h index eb54769..b30786e 100644 --- a/pacredir.h +++ b/pacredir.h @@ -8,6 +8,39 @@ #ifndef _PACREDIR_H #define _PACREDIR_H +#define _GNU_SOURCE + +/* glibc headers */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* Avahi headers */ +#include +#include +#include + +/* various headers needing linker options */ +#include +#include +#include +#include + +/* compile time configuration */ +#include "arch.h" +#include "config.h" +#include "version.h" + + /* services */ struct services { /* network port */ -- cgit v1.2.3-70-g09d2