Here we notice Lucas like some weird stuff, first code spell, now de-config.h? Go get a beer and stop doing these things ;-)
On Wednesday, July 11, 2012, Lucas De Marchi wrote: > There's a much better way of doing that: pass "-include" to the > compiler. > --- > > First of all: I know this should be split :-) > > I always found weird to include these 3 lines on every single file. > There's a > much easier way to do this that I find more convenient. If project is > insterested in this I can split it later, otherwise I only wast some > jiffies of > my life with the sed script. > > Makefile.am | 2 ++ > client/main.c | 4 ---- > gdbus/mainloop.c | 4 ---- > gdbus/object.c | 4 ---- > gdbus/polkit.c | 4 ---- > gdbus/watch.c | 4 ---- > gdhcp/client.c | 4 ---- > gdhcp/common.c | 4 ---- > gdhcp/server.c | 4 ---- > gsupplicant/dbus.c | 4 ---- > gsupplicant/supplicant.c | 4 ---- > gweb/giognutls.c | 4 ---- > gweb/gionotls.c | 4 ---- > gweb/gresolv.c | 4 ---- > gweb/gweb.c | 4 ---- > plugins/bluetooth.c | 4 ---- > plugins/dundee.c | 4 ---- > plugins/ethernet.c | 4 ---- > plugins/hh2serial-gps.c | 4 ---- > plugins/iospm.c | 4 ---- > plugins/iwmx.c | 4 ---- > plugins/iwmxsdk.c | 4 ---- > plugins/l2tp.c | 4 ---- > plugins/loopback.c | 4 ---- > plugins/nmcompat.c | 4 ---- > plugins/ofono.c | 4 ---- > plugins/openconnect.c | 4 ---- > plugins/openvpn.c | 4 ---- > plugins/pacrunner.c | 4 ---- > plugins/polkit.c | 4 ---- > plugins/pptp.c | 4 ---- > plugins/tist.c | 4 ---- > plugins/vpn.c | 4 ---- > plugins/vpnc.c | 4 ---- > plugins/wifi.c | 4 ---- > scripts/libppp-plugin.c | 4 ---- > scripts/openconnect-script.c | 4 ---- > scripts/openvpn-script.c | 4 ---- > src/6to4.c | 4 ---- > src/agent.c | 4 ---- > src/bridge.c | 4 ---- > src/clock.c | 4 ---- > src/config.c | 4 ---- > src/connection.c | 4 ---- > src/counter.c | 4 ---- > src/dbus.c | 4 ---- > src/detect.c | 4 ---- > src/device.c | 4 ---- > src/dhcp.c | 3 --- > src/dhcpv6.c | 3 --- > src/dnsproxy.c | 4 ---- > src/error.c | 4 ---- > src/inet.c | 4 ---- > src/ipconfig.c | 4 ---- > src/ippool.c | 4 ---- > src/iptables.c | 4 ---- > src/log.c | 4 ---- > src/main.c | 4 ---- > src/manager.c | 4 ---- > src/nat.c | 4 ---- > src/network.c | 4 ---- > src/notifier.c | 4 ---- > src/ntp.c | 4 ---- > src/plugin.c | 4 ---- > src/provider.c | 4 ---- > src/proxy.c | 4 ---- > src/resolver.c | 4 ---- > src/rfkill.c | 4 ---- > src/rtnl.c | 4 ---- > src/service.c | 4 ---- > src/session.c | 4 ---- > src/stats.c | 4 ---- > src/storage.c | 4 ---- > src/task.c | 4 ---- > src/technology.c | 4 ---- > src/tethering.c | 4 ---- > src/timeserver.c | 4 ---- > src/timezone.c | 4 ---- > src/utsname.c | 4 ---- > src/wispr.c | 4 ---- > src/wpad.c | 4 ---- > tools/addr-test.c | 4 ---- > tools/dbus-test.c | 4 ---- > tools/dhcp-server-test.c | 4 ---- > tools/dhcp-test.c | 4 ---- > tools/polkit-test.c | 4 ---- > tools/resolv-test.c | 4 ---- > tools/stats-tool.c | 4 ---- > tools/supplicant-dbus.c | 4 ---- > tools/supplicant-test.c | 4 ---- > tools/supplicant.c | 4 ---- > tools/tap-test.c | 4 ---- > tools/web-test.c | 4 ---- > tools/wispr.c | 4 ---- > tools/wpad-test.c | 4 ---- > unit/manager-api.c | 4 ---- > unit/session-api.c | 4 ---- > unit/test-ippool.c | 4 ---- > unit/test-nat.c | 4 ---- > unit/test-session.c | 4 ---- > unit/utils.c | 4 ---- > 101 files changed, 2 insertions(+), 398 deletions(-) > > diff --git a/Makefile.am b/Makefile.am > index 9d713ae..f5d1f32 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -1,6 +1,8 @@ > > AM_MAKEFLAGS = --no-print-directory > > +AM_CPPFLAGS = -include $(top_builddir)/config.h > + > includedir = @includedir@/connman > > include_HEADERS = include/types.h include/log.h include/plugin.h \ > diff --git a/client/main.c b/client/main.c > index 4a88d6e..859cdb7 100644 > --- a/client/main.c > +++ b/client/main.c > @@ -19,10 +19,6 @@ > * > */ > > -#ifdef HAVE_CONFIG_H > -#include <config.h> > -#endif > - > #include <stdio.h> > #include <errno.h> > #include <stdlib.h> > diff --git a/gdbus/mainloop.c b/gdbus/mainloop.c > index cff326f..fe34bc5 100644 > --- a/gdbus/mainloop.c > +++ b/gdbus/mainloop.c > @@ -21,10 +21,6 @@ > * > */ > > -#ifdef HAVE_CONFIG_H > -#include <config.h> > -#endif > - > #include <glib.h> > #include <dbus/dbus.h> > > diff --git a/gdbus/object.c b/gdbus/object.c > index 900e7ab..66a470d 100644 > --- a/gdbus/object.c > +++ b/gdbus/object.c > @@ -21,10 +21,6 @@ > * > */ > > -#ifdef HAVE_CONFIG_H > -#include <config.h> > -#endif > - > #include <stdio.h> > #include <string.h> > > diff --git a/gdbus/polkit.c b/gdbus/polkit.c > index 9e95fa3..508937d 100644 > --- a/gdbus/polkit.c > +++ b/gdbus/polkit.c > @@ -21,10 +21,6 @@ > * > */ > > -#ifdef HAVE_CONFIG_H > -#include <config.h> > -#endif > - > #include <errno.h> > > #include <dbus/dbus.h> > diff --git a/gdbus/watch.c b/gdbus/watch.c > index d749176..2b0cead 100644 > --- a/gdbus/watch.c > +++ b/gdbus/watch.c > @@ -21,10 +21,6 @@ > * > */ > > -#ifdef HAVE_CONFIG_H > -#include <config.h> > -#endif > - > #include <stdio.h> > #include <string.h> > > diff --git a/gdhcp/client.c b/gdhcp/client.c > index ec1b2a2..cf4fa2f 100644 > --- a/gdhcp/client.c > +++ b/gdhcp/client.c > @@ -19,10 +19,6 @@ > * > */ > > -#ifdef HAVE_CONFIG_H > -#include <config.h> > -#endif > - > #define _GNU_SOURCE > #include <stdio.h> > #include <errno.h> > diff --git a/gdhcp/common.c b/gdhcp/common.c > index 8d5c284..5f1aec8 100644 > --- a/gdhcp/common.c > +++ b/gdhcp/common.c > @@ -18,10 +18,6 @@ > * > */ > > -#ifdef HAVE_CONFIG_H > -#include <config.h> > -#endif > - > #include <stdio.h> > #include <stdlib.h> > #include <errno.h> > diff --git a/gdhcp/server.c b/gdhcp/server.c > index a342985..5ebed8d 100644 > --- a/gdhcp/server.c > +++ b/gdhcp/server.c > @@ -19,10 +19,6 @@ > * > */ > > -#ifdef HAVE_CONFIG_H > -#include <config.h> > -#endif > - > #include <stdio.h> > #include <errno.h> > #include <unistd.h> > diff --git a/gsupplicant/dbus.c b/gsupplicant/dbus.c > index 0da5fbd..b1c4009 100644 > --- a/gsupplicant/dbus.c > +++ b/gsupplicant/dbus.c > @@ -19,10 +19,6 @@ > * > */ > > -#ifdef HAVE_CONFIG_H > -#include <config.h> > -#endif > - > #include <errno.h> > #include <stdlib.h> > #include <string.h> > diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c > index dffc1d8..ada828c 100644 > --- a/gsupplicant/supplicant.c > +++ b/gsupplicant/supplicant.c > @@ -19,10 +19,6 @@ > * > */ > > -#ifdef HAVE_CONFIG_H > -#include <config.h> > -#endif > - > #include <errno.h> > #include <stdio.h> > #include <stdlib.h> > diff --git a/gweb/giognutls.c b/gweb/giognutls.c > index 47ff8c4..d0f96df 100644 > --- a/gweb/giognutls.c > +++ b/gweb/giognutls.c > @@ -19,10 +19,6 @@ > * > */ > > -#ifdef HAVE_CONFIG_H > -#include <config.h> > -#endif > - > #include <stdio.h> > #include <errno.h> > #include <fcntl.h> > diff --git a/gweb/gionotls.c b/gweb/gionotls.c > index 88db3e4..ad42266 100644 > --- a/gweb/gionotls.c > +++ b/gweb/gionotls.c > @@ -19,10 +19,6 @@ > * > */ > > -#ifdef HAVE_CONFIG_H > -#include <config.h> > -#endif > - > #include "giognutls.h" > > gboolean g_io_channel_supports_tls(void) > diff --git a/gweb/gresolv.c b/gweb/gresolv.c > index e93bf4f..9c83ac7 100644 > --- a/gweb/gresolv.c > +++ b/gweb/gresolv.c > @@ -19,10 +19,6 @@ > * > */ > > -#ifdef HAVE_CONFIG_H > -#include <config.h> > -#endif > - > #include <errno.h> > #include <unistd.h> > #include <stdarg.h> > diff --git a/gweb/gweb.c b/gweb/gweb.c > index 27ed634..2ede236 100644 > --- a/gweb/gweb.c > +++ b/gweb/gweb.c > @@ -19,10 +19,6 @@ > * > */ > > -#ifdef HAVE_CONFIG_H > -#include <config.h> > -#endif > - > #include <stdio.h> > #include <errno.h> > #include <fcntl.h> > diff --git a/plugins/bluetooth.c b/plugins/bluetooth.c > index 6f476e2..77e0320 100644 > --- a/plugins/bluetooth.c > +++ b/plugins/bluetooth.c > @@ -19,10 +19,6 @@ > * > */ > > -#ifdef HAVE_CONFIG_H > -#include <config.h> > -#endif > - > #include <stdio.h> > #include <errno.h> > #include <stdlib.h> > diff --git a/plugins/dundee.c b/plugins/dundee.c > index d0ecdef..939b102 100644 > --- a/plugins/dundee.c > +++ b/plugins/dundee.c > @@ -19,10 +19,6 @@ > * > */ > > -#ifdef HAVE_CONFIG_H > -#include <config.h> > -#endif > - > #include <string.h> > #include <errno.h> > > diff --git a/plugins/ethernet.c b/plugins/ethernet.c > index fbfff63..93a1ff8 100644 > --- a/plugins/ethernet.c > +++ b/plugins/ethernet.c > @@ -19,10 +19,6 @@ > * > */ > > -#ifdef HAVE_CONFIG_H > -#include <config.h> > -#endif > - > #include <errno.h> > #include <net/if.h> > > diff --git a/plugins/hh2serial-gps.c b/plugins/hh2serial-gps.c > index 20521b0..8179f06 100644 > --- a/plugins/hh2serial-gps.c > +++ b/plugins/hh2serial-gps.c > @@ -19,10 +19,6 @@ > * > */ > > -#ifdef HAVE_CONFIG_H > -#include <config.h> > -#endif > - > #include <stdio.h> > #include <errno.h> > > diff --git a/plugins/iospm.c b/plugins/iospm.c > index 1ea56a9..e1257dd 100644 > --- a/plugins/iospm.c > +++ b/plugins/iospm.c > @@ -19,10 +19,6 @@ > * > */ > > -#ifdef HAVE_CONFIG_H > -#include <config.h> > -#endif > - > #define CONNMAN_API_SUBJECT_TO_CHANGE > #include <connman/plugin.h> > #include <connman/notifier.h> > diff --git a/plugins/iwmx.c b/plugins/iwmx.c > index 7c1e792..c54b902 100644 > --- a/plugins/iwmx.c > +++ b/plugins/iwmx.c > @@ -19,10 +19,6 @@ > * > */ > > -#ifdef HAVE_CONFIG_H > -#include <config.h> > -#endif > - > #include <stdio.h> > #include <errno.h> > #include <string.h> > diff --git a/plugins/iwmxsdk.c b/plugins/iwmxsdk.c > index 06de4c3..21449c5 100644 > --- a/plugins/iwmxsdk.c > +++ b/plugins/iwmxsdk.c > @@ -19,10 +19,6 @@ > * > */ > > -#ifdef HAVE_CONFIG_H > -#include <config.h> > -#endif > - > #include <stdio.h> > #include <stdlib.h> > #include <errno.h> > diff --git a/plugins/l2tp.c b/plugins/l2tp.c > index 5a655e6..7cf41bc 100644 > --- a/plugins/l2tp.c > +++ b/plugins/l2tp.c > @@ -20,10 +20,6 @@ > * > */ > > -#ifdef HAVE_CONFIG_H > -#include <config.h> > -#endif > - > #include <string.h> > #include <errno.h> > #include <unistd.h> > diff --git a/plugins/loopback.c b/plugins/loopback.c > index a111eee..155bdd0 100644 > --- a/plugins/loopback.c > +++ b/plugins/loopback.c > @@ -19,10 +19,6 @@ > * > */ > > -#ifdef HAVE_CONFIG_H > -#include <config.h> > -#endif > - > #include <errno.h> > #include <unistd.h> > #include <limits.h> > diff --git a/plugins/nmcompat.c b/plugins/nmcompat.c > index 400389b..65637d0 100644 > --- a/plugins/nmcompat.c > +++ b/plugins/nmcompat.c > @@ -19,10 +19,6 @@ > * > */ > > -#ifdef HAVE_CONFIG_H > -#include <config.h> > -#endif > - > #include <gdbus.h> > > #define CONNMAN_API_SUBJECT_TO_CHANGE > diff --git a/plugins/ofono.c b/plugins/ofono.c > index d9696d7..0ef1296 100644 > --- a/plugins/ofono.c > +++ b/plugins/ofono.c > @@ -21,10 +21,6 @@ > * > */ > > -#ifdef HAVE_CONFIG_H > -#include <config.h> > -#endif > - > #include <errno.h> > #include <stdlib.h> > > diff --git a/plugins/openconnect.c b/plugins/openconnect.c > index 70be7ae..8262c20 100644 > --- a/plugins/openconnect.c > +++ b/plugins/openconnect.c > @@ -19,10 +19,6 @@ > * > */ > > -#ifdef HAVE_CONFIG_H > -#include <config.h> > -#endif > - > #include <stdlib.h> > #include <string.h> > #include <errno.h> > diff --git a/plugins/openvpn.c b/plugins/openvpn.c > index 8df8a3f..17c0919 100644 > --- a/plugins/openvpn.c > +++ b/plugins/openvpn.c > @@ -19,10 +19,6 @@ > * > */ > > -#ifdef HAVE_CONFIG_H > -#include <config.h> > -#endif > - > #include <string.h> > #include <errno.h> > #include <unistd.h> > diff --git a/plugins/pacrunner.c b/plugins/pacrunner.c > index 418dce2..c985285 100644 > --- a/plugins/pacrunner.c > +++ b/plugins/pacrunner.c > @@ -19,10 +19,6 @@ > * > */ > > -#ifdef HAVE_CONFIG_H > -#include <config.h> > -#endif > -- > 1.7.11.1 > > _______________________________________________ > connman mailing list > [email protected] <javascript:;> > http://lists.connman.net/listinfo/connman > -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: [email protected] Skype: gsbarbieri Mobile: +55 (19) 9225-2202 _______________________________________________ connman mailing list [email protected] http://lists.connman.net/listinfo/connman
