From 37d19f15523b6fe4d1fef2329abe421221b3d4b3 Mon Sep 17 00:00:00 2001 From: "Sven M. Hallberg" Date: Wed, 20 Aug 2014 14:44:21 +0200 Subject: [PATCH] move public headers into their own directory --- Makefile.am | 33 ++++++++-------- configure.ac | 5 ++- examples/Makefile.am | 6 +-- include/Makefile.am | 38 ++++++++++++++++++ {avahi => include/avahi}/address.h | 0 {avahi => include/avahi}/alternative.h | 0 {avahi => include/avahi}/cdecl.h | 0 {avahi => include/avahi}/core.h | 0 {avahi => include/avahi}/defs.h | 0 {avahi => include/avahi}/domain.h | 0 {avahi => include/avahi}/error.h | 0 {avahi => include/avahi}/gccmacro.h | 0 {avahi => include/avahi}/llist.h | 0 {avahi => include/avahi}/log.h | 0 {avahi => include/avahi}/lookup.h | 0 {avahi => include/avahi}/malloc.h | 0 {avahi => include/avahi}/publish.h | 0 {avahi => include/avahi}/rlist.h | 0 {avahi => include/avahi}/rr.h | 0 {avahi => include/avahi}/simple-watch.h | 0 {avahi => include/avahi}/strlst.h | 0 {avahi => include/avahi}/thread-watch.h | 0 {avahi => include/avahi}/timeval.h | 0 {avahi => include/avahi}/watch.h | 0 {avahi => src}/Makefile.am | 52 +++++++------------------ {avahi => src}/addr-util.c | 0 {avahi => src}/addr-util.h | 0 {avahi => src}/address.c | 4 +- {avahi => src}/alternative.c | 6 +-- {avahi => src}/announce.c | 2 +- {avahi => src}/announce.h | 2 +- {avahi => src}/browse-dns-server.c | 4 +- {avahi => src}/browse-domain.c | 2 +- {avahi => src}/browse-service-type.c | 2 +- {avahi => src}/browse-service.c | 2 +- {avahi => src}/browse.c | 2 +- {avahi => src}/browse.h | 4 +- {avahi => src}/cache.c | 2 +- {avahi => src}/cache.h | 0 {avahi => src}/dns-srv-rr.h | 0 {avahi => src}/dns.c | 2 +- {avahi => src}/dns.h | 2 +- {avahi => src}/domain-util.c | 2 +- {avahi => src}/domain-util.h | 0 {avahi => src}/domain.c | 8 ++-- {avahi => src}/entry.c | 2 +- {avahi => src}/error.c | 2 +- {avahi => src}/fdutil.c | 0 {avahi => src}/fdutil.h | 0 {avahi => src}/findstatic.pl | 0 {avahi => src}/hashmap.c | 0 {avahi => src}/hashmap.h | 0 {avahi => src}/iface-linux.c | 2 +- {avahi => src}/iface-linux.h | 0 {avahi => src}/iface-none.c | 0 {avahi => src}/iface-pfroute.c | 2 +- {avahi => src}/iface-pfroute.h | 0 {avahi => src}/iface.c | 2 +- {avahi => src}/iface.h | 0 {avahi => src}/internal.h | 2 +- {avahi => src}/log.c | 2 +- {avahi => src}/malloc.c | 2 +- {avahi => src}/multicast-lookup.c | 2 +- {avahi => src}/multicast-lookup.h | 2 +- {avahi => src}/netlink.c | 2 +- {avahi => src}/netlink.h | 0 {avahi => src}/prioq.c | 0 {avahi => src}/prioq.h | 0 {avahi => src}/probe-sched.c | 2 +- {avahi => src}/probe-sched.h | 0 {avahi => src}/querier.c | 2 +- {avahi => src}/querier.h | 0 {avahi => src}/query-sched.c | 2 +- {avahi => src}/query-sched.h | 0 {avahi => src}/resolve-address.c | 0 {avahi => src}/resolve-host-name.c | 2 +- {avahi => src}/resolve-service.c | 2 +- {avahi => src}/response-sched.c | 2 +- {avahi => src}/response-sched.h | 0 {avahi => src}/rlist.c | 4 +- {avahi => src}/rr-util.h | 2 +- {avahi => src}/rr.c | 4 +- {avahi => src}/rrlist.c | 2 +- {avahi => src}/rrlist.h | 2 +- {avahi => src}/server.c | 2 +- {avahi => src}/simple-watch.c | 8 ++-- {avahi => src}/socket.c | 2 +- {avahi => src}/socket.h | 0 {avahi => src}/strlst.c | 6 +-- {avahi => src}/thread-watch.c | 10 ++--- {avahi => src}/timeeventq.c | 2 +- {avahi => src}/timeeventq.h | 0 {avahi => src}/timeval.c | 2 +- {avahi => src}/utf8.c | 0 {avahi => src}/utf8.h | 0 {avahi => src}/util.c | 0 {avahi => src}/util.h | 0 {avahi => src}/wide-area.c | 2 +- {avahi => src}/wide-area.h | 2 +- tests/Makefile.am | 4 +- tests/avahi-test.c | 2 +- tests/dns-spin-test.c | 2 +- tests/dns-test.c | 6 +-- tests/hashmap-test.c | 4 +- tests/prioq-test.c | 2 +- tests/timeeventq-test.c | 4 +- tests/utf8-test.c | 2 +- 107 files changed, 152 insertions(+), 138 deletions(-) create mode 100644 include/Makefile.am rename {avahi => include/avahi}/address.h (100%) rename {avahi => include/avahi}/alternative.h (100%) rename {avahi => include/avahi}/cdecl.h (100%) rename {avahi => include/avahi}/core.h (100%) rename {avahi => include/avahi}/defs.h (100%) rename {avahi => include/avahi}/domain.h (100%) rename {avahi => include/avahi}/error.h (100%) rename {avahi => include/avahi}/gccmacro.h (100%) rename {avahi => include/avahi}/llist.h (100%) rename {avahi => include/avahi}/log.h (100%) rename {avahi => include/avahi}/lookup.h (100%) rename {avahi => include/avahi}/malloc.h (100%) rename {avahi => include/avahi}/publish.h (100%) rename {avahi => include/avahi}/rlist.h (100%) rename {avahi => include/avahi}/rr.h (100%) rename {avahi => include/avahi}/simple-watch.h (100%) rename {avahi => include/avahi}/strlst.h (100%) rename {avahi => include/avahi}/thread-watch.h (100%) rename {avahi => include/avahi}/timeval.h (100%) rename {avahi => include/avahi}/watch.h (100%) rename {avahi => src}/Makefile.am (75%) rename {avahi => src}/addr-util.c (100%) rename {avahi => src}/addr-util.h (100%) rename {avahi => src}/address.c (98%) rename {avahi => src}/alternative.c (97%) rename {avahi => src}/announce.c (99%) rename {avahi => src}/announce.h (98%) rename {avahi => src}/browse-dns-server.c (99%) rename {avahi => src}/browse-domain.c (99%) rename {avahi => src}/browse-service-type.c (99%) rename {avahi => src}/browse-service.c (99%) rename {avahi => src}/browse.c (99%) rename {avahi => src}/browse.h (96%) rename {avahi => src}/cache.c (99%) rename {avahi => src}/cache.h (100%) rename {avahi => src}/dns-srv-rr.h (100%) rename {avahi => src}/dns.c (99%) rename {avahi => src}/dns.h (99%) rename {avahi => src}/domain-util.c (99%) rename {avahi => src}/domain-util.h (100%) rename {avahi => src}/domain.c (99%) rename {avahi => src}/entry.c (99%) rename {avahi => src}/error.c (99%) rename {avahi => src}/fdutil.c (100%) rename {avahi => src}/fdutil.h (100%) rename {avahi => src}/findstatic.pl (100%) rename {avahi => src}/hashmap.c (100%) rename {avahi => src}/hashmap.h (100%) rename {avahi => src}/iface-linux.c (99%) rename {avahi => src}/iface-linux.h (100%) rename {avahi => src}/iface-none.c (100%) rename {avahi => src}/iface-pfroute.c (99%) rename {avahi => src}/iface-pfroute.h (100%) rename {avahi => src}/iface.c (99%) rename {avahi => src}/iface.h (100%) rename {avahi => src}/internal.h (99%) rename {avahi => src}/log.c (98%) rename {avahi => src}/malloc.c (99%) rename {avahi => src}/multicast-lookup.c (99%) rename {avahi => src}/multicast-lookup.h (98%) rename {avahi => src}/netlink.c (99%) rename {avahi => src}/netlink.h (100%) rename {avahi => src}/prioq.c (100%) rename {avahi => src}/prioq.h (100%) rename {avahi => src}/probe-sched.c (99%) rename {avahi => src}/probe-sched.h (100%) rename {avahi => src}/querier.c (99%) rename {avahi => src}/querier.h (100%) rename {avahi => src}/query-sched.c (99%) rename {avahi => src}/query-sched.h (100%) rename {avahi => src}/resolve-address.c (100%) rename {avahi => src}/resolve-host-name.c (99%) rename {avahi => src}/resolve-service.c (99%) rename {avahi => src}/response-sched.c (99%) rename {avahi => src}/response-sched.h (100%) rename {avahi => src}/rlist.c (96%) rename {avahi => src}/rr-util.h (99%) rename {avahi => src}/rr.c (99%) rename {avahi => src}/rrlist.c (99%) rename {avahi => src}/rrlist.h (98%) rename {avahi => src}/server.c (99%) rename {avahi => src}/simple-watch.c (99%) rename {avahi => src}/socket.c (99%) rename {avahi => src}/socket.h (100%) rename {avahi => src}/strlst.c (99%) rename {avahi => src}/thread-watch.c (96%) rename {avahi => src}/timeeventq.c (99%) rename {avahi => src}/timeeventq.h (100%) rename {avahi => src}/timeval.c (99%) rename {avahi => src}/utf8.c (100%) rename {avahi => src}/utf8.h (100%) rename {avahi => src}/util.c (100%) rename {avahi => src}/util.h (100%) rename {avahi => src}/wide-area.c (99%) rename {avahi => src}/wide-area.h (98%) diff --git a/Makefile.am b/Makefile.am index 116bb5f..26ce6bd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -40,26 +40,27 @@ EXTRA_DIST = \ SUBDIRS = \ m4 \ - avahi \ + src \ + include \ tests \ examples DX_INPUT = \ - $(srcdir)/avahi/address.h \ - $(srcdir)/avahi/malloc.h \ - $(srcdir)/avahi/strlst.h \ - $(srcdir)/avahi/alternative.h \ - $(srcdir)/avahi/defs.h \ - $(srcdir)/avahi/error.h \ - $(srcdir)/avahi/domain.h \ - $(srcdir)/avahi/watch.h \ - $(srcdir)/avahi/simple-watch.h \ - $(srcdir)/avahi/thread-watch.h \ - $(srcdir)/avahi/core.h \ - $(srcdir)/avahi/lookup.h \ - $(srcdir)/avahi/publish.h \ - $(srcdir)/avahi/rr.h \ - $(srcdir)/avahi/log.h + $(srcdir)/include/avahi/address.h \ + $(srcdir)/include/avahi/malloc.h \ + $(srcdir)/include/avahi/strlst.h \ + $(srcdir)/include/avahi/alternative.h \ + $(srcdir)/include/avahi/defs.h \ + $(srcdir)/include/avahi/error.h \ + $(srcdir)/include/avahi/domain.h \ + $(srcdir)/include/avahi/watch.h \ + $(srcdir)/include/avahi/simple-watch.h \ + $(srcdir)/include/avahi/thread-watch.h \ + $(srcdir)/include/avahi/core.h \ + $(srcdir)/include/avahi/lookup.h \ + $(srcdir)/include/avahi/publish.h \ + $(srcdir)/include/avahi/rr.h \ + $(srcdir)/include/avahi/log.h DX_EXAMPLE_PATH = $(srcdir)/examples DX_EXAMPLE_PATTERNS = *.c diff --git a/configure.ac b/configure.ac index 3849cf4..80cbfb2 100644 --- a/configure.ac +++ b/configure.ac @@ -20,7 +20,7 @@ AC_PREREQ(2.63) AC_INIT([avahi],[0.6.31],[avahi (at) lists (dot) freedesktop (dot) org]) -AC_CONFIG_SRCDIR([avahi/server.c]) +AC_CONFIG_SRCDIR([src/server.c]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax]) @@ -323,7 +323,8 @@ AM_CONDITIONAL([ENABLE_TESTS], [test "x$ENABLE_TESTS" = "xyes"]) # ========================================================================== AC_CONFIG_FILES([ Makefile -avahi/Makefile +src/Makefile +include/Makefile tests/Makefile examples/Makefile m4/Makefile diff --git a/examples/Makefile.am b/examples/Makefile.am index aff7d3c..15718fe 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -15,7 +15,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA. -AM_CFLAGS=-I$(top_srcdir) +AM_CFLAGS=-I$(top_srcdir)/include if ENABLE_TESTS noinst_PROGRAMS = \ @@ -25,8 +25,8 @@ endif core_publish_service_SOURCES = core-publish-service.c core_publish_service_CFLAGS = $(AM_CFLAGS) -core_publish_service_LDADD = $(AM_LDADD) ../avahi/libavahi.la +core_publish_service_LDADD = $(AM_LDADD) ../src/libavahi.la core_browse_services_SOURCES = core-browse-services.c core_browse_services_CFLAGS = $(AM_CFLAGS) -core_browse_services_LDADD = $(AM_LDADD) ../avahi/libavahi.la +core_browse_services_LDADD = $(AM_LDADD) ../src/libavahi.la diff --git a/include/Makefile.am b/include/Makefile.am new file mode 100644 index 0000000..0844c7e --- /dev/null +++ b/include/Makefile.am @@ -0,0 +1,38 @@ +# This file is part of avahi. +# +# avahi is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# avahi is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +# License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with avahi; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA. + +nobase_include_HEADERS = \ + avahi/strlst.h \ + avahi/address.h \ + avahi/alternative.h \ + avahi/domain.h \ + avahi/cdecl.h \ + avahi/defs.h \ + avahi/malloc.h \ + avahi/watch.h \ + avahi/timeval.h \ + avahi/simple-watch.h \ + avahi/thread-watch.h \ + avahi/gccmacro.h \ + avahi/error.h \ + avahi/llist.h \ + avahi/rlist.h \ + avahi/core.h \ + avahi/log.h \ + avahi/rr.h \ + avahi/publish.h \ + avahi/lookup.h diff --git a/avahi/address.h b/include/avahi/address.h similarity index 100% rename from avahi/address.h rename to include/avahi/address.h diff --git a/avahi/alternative.h b/include/avahi/alternative.h similarity index 100% rename from avahi/alternative.h rename to include/avahi/alternative.h diff --git a/avahi/cdecl.h b/include/avahi/cdecl.h similarity index 100% rename from avahi/cdecl.h rename to include/avahi/cdecl.h diff --git a/avahi/core.h b/include/avahi/core.h similarity index 100% rename from avahi/core.h rename to include/avahi/core.h diff --git a/avahi/defs.h b/include/avahi/defs.h similarity index 100% rename from avahi/defs.h rename to include/avahi/defs.h diff --git a/avahi/domain.h b/include/avahi/domain.h similarity index 100% rename from avahi/domain.h rename to include/avahi/domain.h diff --git a/avahi/error.h b/include/avahi/error.h similarity index 100% rename from avahi/error.h rename to include/avahi/error.h diff --git a/avahi/gccmacro.h b/include/avahi/gccmacro.h similarity index 100% rename from avahi/gccmacro.h rename to include/avahi/gccmacro.h diff --git a/avahi/llist.h b/include/avahi/llist.h similarity index 100% rename from avahi/llist.h rename to include/avahi/llist.h diff --git a/avahi/log.h b/include/avahi/log.h similarity index 100% rename from avahi/log.h rename to include/avahi/log.h diff --git a/avahi/lookup.h b/include/avahi/lookup.h similarity index 100% rename from avahi/lookup.h rename to include/avahi/lookup.h diff --git a/avahi/malloc.h b/include/avahi/malloc.h similarity index 100% rename from avahi/malloc.h rename to include/avahi/malloc.h diff --git a/avahi/publish.h b/include/avahi/publish.h similarity index 100% rename from avahi/publish.h rename to include/avahi/publish.h diff --git a/avahi/rlist.h b/include/avahi/rlist.h similarity index 100% rename from avahi/rlist.h rename to include/avahi/rlist.h diff --git a/avahi/rr.h b/include/avahi/rr.h similarity index 100% rename from avahi/rr.h rename to include/avahi/rr.h diff --git a/avahi/simple-watch.h b/include/avahi/simple-watch.h similarity index 100% rename from avahi/simple-watch.h rename to include/avahi/simple-watch.h diff --git a/avahi/strlst.h b/include/avahi/strlst.h similarity index 100% rename from avahi/strlst.h rename to include/avahi/strlst.h diff --git a/avahi/thread-watch.h b/include/avahi/thread-watch.h similarity index 100% rename from avahi/thread-watch.h rename to include/avahi/thread-watch.h diff --git a/avahi/timeval.h b/include/avahi/timeval.h similarity index 100% rename from avahi/timeval.h rename to include/avahi/timeval.h diff --git a/avahi/watch.h b/include/avahi/watch.h similarity index 100% rename from avahi/watch.h rename to include/avahi/watch.h diff --git a/avahi/Makefile.am b/src/Makefile.am similarity index 75% rename from avahi/Makefile.am rename to src/Makefile.am index 5100c20..023abda 100644 --- a/avahi/Makefile.am +++ b/src/Makefile.am @@ -15,51 +15,26 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA. -AM_CFLAGS=-I$(top_srcdir) +AM_CFLAGS=-I$(top_srcdir)/include # This cool debug trap works on i386/gcc only AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")' -avahiincludedir = $(top_srcdir)/avahi - -avahiinclude_HEADERS = \ - strlst.h \ - address.h \ - alternative.h \ - domain.h \ - cdecl.h \ - defs.h \ - malloc.h \ - watch.h \ - timeval.h \ - simple-watch.h \ - thread-watch.h \ - gccmacro.h \ - error.h \ - llist.h \ - rlist.h \ - core.h \ - log.h \ - rr.h \ - publish.h \ - lookup.h - lib_LTLIBRARIES = libavahi.la libavahi_la_SOURCES = \ - malloc.c malloc.h \ - address.c address.h \ - alternative.c alternative.h \ - error.c error.h \ - strlst.c strlst.h \ - domain.c domain.h \ - timeval.c timeval.h \ - simple-watch.c simple-watch.h \ - thread-watch.c thread-watch.h \ - watch.h gccmacro.h \ - rlist.h rlist.c \ + malloc.c \ + address.c \ + alternative.c \ + error.c \ + strlst.c \ + domain.c \ + timeval.c \ + simple-watch.c \ + thread-watch.c \ + rlist.c \ utf8.c utf8.h \ - timeeventq.c timeeventq.h\ + timeeventq.c timeeventq.h \ iface.c iface.h \ server.c internal.h entry.c \ prioq.c prioq.h \ @@ -79,8 +54,7 @@ libavahi_la_SOURCES = \ resolve-service.c \ dns.c dns.h \ rr.c rr.h rr-util.h \ - core.h lookup.h publish.h \ - log.c log.h \ + log.c \ browse-dns-server.c \ fdutil.h fdutil.c \ util.c util.h \ diff --git a/avahi/addr-util.c b/src/addr-util.c similarity index 100% rename from avahi/addr-util.c rename to src/addr-util.c diff --git a/avahi/addr-util.h b/src/addr-util.h similarity index 100% rename from avahi/addr-util.h rename to src/addr-util.h diff --git a/avahi/address.c b/src/address.c similarity index 98% rename from avahi/address.c rename to src/address.c index e8f6148..9471684 100644 --- a/avahi/address.c +++ b/src/address.c @@ -29,8 +29,8 @@ #include #include -#include "address.h" -#include "malloc.h" +#include +#include static size_t address_get_size(const AvahiAddress *a) { assert(a); diff --git a/avahi/alternative.c b/src/alternative.c similarity index 97% rename from avahi/alternative.c rename to src/alternative.c index b3d39f0..85a2b60 100644 --- a/avahi/alternative.c +++ b/src/alternative.c @@ -26,9 +26,9 @@ #include #include -#include "alternative.h" -#include "malloc.h" -#include "domain.h" +#include +#include +#include #include "utf8.h" static void drop_incomplete_utf8(char *c) { diff --git a/avahi/announce.c b/src/announce.c similarity index 99% rename from avahi/announce.c rename to src/announce.c index ac75ad3..48d2abe 100644 --- a/avahi/announce.c +++ b/src/announce.c @@ -27,7 +27,7 @@ #include #include "announce.h" -#include "log.h" +#include #include "rr-util.h" #define AVAHI_ANNOUNCEMENT_JITTER_MSEC 250 diff --git a/avahi/announce.h b/src/announce.h similarity index 98% rename from avahi/announce.h rename to src/announce.h index f57b9d7..19014fb 100644 --- a/avahi/announce.h +++ b/src/announce.h @@ -23,10 +23,10 @@ typedef struct AvahiAnnouncer AvahiAnnouncer; #include +#include #include "iface.h" #include "internal.h" #include "timeeventq.h" -#include "publish.h" typedef enum { AVAHI_PROBING, /* probing phase */ diff --git a/avahi/browse-dns-server.c b/src/browse-dns-server.c similarity index 99% rename from avahi/browse-dns-server.c rename to src/browse-dns-server.c index 579c51b..a937d18 100644 --- a/avahi/browse-dns-server.c +++ b/src/browse-dns-server.c @@ -28,8 +28,8 @@ #include #include "browse.h" -#include "log.h" -#include "rr.h" +#include +#include typedef struct AvahiDNSServerInfo AvahiDNSServerInfo; diff --git a/avahi/browse-domain.c b/src/browse-domain.c similarity index 99% rename from avahi/browse-domain.c rename to src/browse-domain.c index 134c745..097e5d5 100644 --- a/avahi/browse-domain.c +++ b/src/browse-domain.c @@ -28,7 +28,7 @@ #include #include "browse.h" -#include "log.h" +#include struct AvahiSDomainBrowser { int ref; diff --git a/avahi/browse-service-type.c b/src/browse-service-type.c similarity index 99% rename from avahi/browse-service-type.c rename to src/browse-service-type.c index 8eb42da..bbcd7ea 100644 --- a/avahi/browse-service-type.c +++ b/src/browse-service-type.c @@ -28,7 +28,7 @@ #include #include "browse.h" -#include "log.h" +#include struct AvahiSServiceTypeBrowser { AvahiServer *server; diff --git a/avahi/browse-service.c b/src/browse-service.c similarity index 99% rename from avahi/browse-service.c rename to src/browse-service.c index babe7a1..0d3c326 100644 --- a/avahi/browse-service.c +++ b/src/browse-service.c @@ -28,7 +28,7 @@ #include #include "browse.h" -#include "log.h" +#include struct AvahiSServiceBrowser { AvahiServer *server; diff --git a/avahi/browse.c b/src/browse.c similarity index 99% rename from avahi/browse.c rename to src/browse.c index 47d5f23..f9a1848 100644 --- a/avahi/browse.c +++ b/src/browse.c @@ -29,9 +29,9 @@ #include #include #include +#include #include "browse.h" -#include "log.h" #include "querier.h" #include "domain-util.h" #include "rr-util.h" diff --git a/avahi/browse.h b/src/browse.h similarity index 96% rename from avahi/browse.h rename to src/browse.h index 2592b80..d09948b 100644 --- a/avahi/browse.h +++ b/src/browse.h @@ -21,12 +21,12 @@ ***/ #include +#include +#include -#include "core.h" #include "timeeventq.h" #include "internal.h" #include "dns.h" -#include "lookup.h" typedef struct AvahiSRBLookup AvahiSRBLookup; diff --git a/avahi/cache.c b/src/cache.c similarity index 99% rename from avahi/cache.c rename to src/cache.c index fa4a24a..0fcc5a3 100644 --- a/avahi/cache.c +++ b/src/cache.c @@ -27,9 +27,9 @@ #include #include +#include #include "cache.h" -#include "log.h" #include "rr-util.h" static void remove_entry(AvahiCache *c, AvahiCacheEntry *e) { diff --git a/avahi/cache.h b/src/cache.h similarity index 100% rename from avahi/cache.h rename to src/cache.h diff --git a/avahi/dns-srv-rr.h b/src/dns-srv-rr.h similarity index 100% rename from avahi/dns-srv-rr.h rename to src/dns-srv-rr.h diff --git a/avahi/dns.c b/src/dns.c similarity index 99% rename from avahi/dns.c rename to src/dns.c index 84a0df3..2a704cb 100644 --- a/avahi/dns.c +++ b/src/dns.c @@ -34,7 +34,7 @@ #include #include "dns.h" -#include "log.h" +#include AvahiDnsPacket* avahi_dns_packet_new(unsigned mtu) { AvahiDnsPacket *p; diff --git a/avahi/dns.h b/src/dns.h similarity index 99% rename from avahi/dns.h rename to src/dns.h index 52e8d88..e5eb928 100644 --- a/avahi/dns.h +++ b/src/dns.h @@ -20,7 +20,7 @@ USA. ***/ -#include "rr.h" +#include #include "hashmap.h" #define AVAHI_DNS_PACKET_HEADER_SIZE 12 diff --git a/avahi/domain-util.c b/src/domain-util.c similarity index 99% rename from avahi/domain-util.c rename to src/domain-util.c index 7731dd1..15b5ae1 100644 --- a/avahi/domain-util.c +++ b/src/domain-util.c @@ -31,7 +31,7 @@ #include -#include "log.h" +#include #include "domain-util.h" #include "util.h" diff --git a/avahi/domain-util.h b/src/domain-util.h similarity index 100% rename from avahi/domain-util.h rename to src/domain-util.h diff --git a/avahi/domain.c b/src/domain.c similarity index 99% rename from avahi/domain.c rename to src/domain.c index 3b1ab68..42d9e80 100644 --- a/avahi/domain.c +++ b/src/domain.c @@ -31,10 +31,10 @@ #include #include -#include "domain.h" -#include "malloc.h" -#include "error.h" -#include "address.h" +#include +#include +#include +#include #include "utf8.h" /* Read the first label from string *name, unescape "\" and write it to dest */ diff --git a/avahi/entry.c b/src/entry.c similarity index 99% rename from avahi/entry.c rename to src/entry.c index 2fbc45a..4b66c10 100644 --- a/avahi/entry.c +++ b/src/entry.c @@ -39,12 +39,12 @@ #include #include #include +#include #include "internal.h" #include "iface.h" #include "socket.h" #include "browse.h" -#include "log.h" #include "util.h" #include "dns-srv-rr.h" #include "rr-util.h" diff --git a/avahi/error.c b/src/error.c similarity index 99% rename from avahi/error.c rename to src/error.c index 0005f87..419a39f 100644 --- a/avahi/error.c +++ b/src/error.c @@ -21,7 +21,7 @@ #include #endif -#include "error.h" +#include const char *avahi_strerror(int error) { diff --git a/avahi/fdutil.c b/src/fdutil.c similarity index 100% rename from avahi/fdutil.c rename to src/fdutil.c diff --git a/avahi/fdutil.h b/src/fdutil.h similarity index 100% rename from avahi/fdutil.h rename to src/fdutil.h diff --git a/avahi/findstatic.pl b/src/findstatic.pl similarity index 100% rename from avahi/findstatic.pl rename to src/findstatic.pl diff --git a/avahi/hashmap.c b/src/hashmap.c similarity index 100% rename from avahi/hashmap.c rename to src/hashmap.c diff --git a/avahi/hashmap.h b/src/hashmap.h similarity index 100% rename from avahi/hashmap.h rename to src/hashmap.h diff --git a/avahi/iface-linux.c b/src/iface-linux.c similarity index 99% rename from avahi/iface-linux.c rename to src/iface-linux.c index 37a371b..4ee5b16 100644 --- a/avahi/iface-linux.c +++ b/src/iface-linux.c @@ -28,7 +28,7 @@ #include -#include "log.h" +#include #include "iface.h" #include "iface-linux.h" diff --git a/avahi/iface-linux.h b/src/iface-linux.h similarity index 100% rename from avahi/iface-linux.h rename to src/iface-linux.h diff --git a/avahi/iface-none.c b/src/iface-none.c similarity index 100% rename from avahi/iface-none.c rename to src/iface-none.c diff --git a/avahi/iface-pfroute.c b/src/iface-pfroute.c similarity index 99% rename from avahi/iface-pfroute.c rename to src/iface-pfroute.c index 7a885ab..34c90fa 100644 --- a/avahi/iface-pfroute.c +++ b/src/iface-pfroute.c @@ -41,7 +41,7 @@ #include #include -#include "log.h" +#include #include "iface.h" #include "iface-pfroute.h" #include "util.h" diff --git a/avahi/iface-pfroute.h b/src/iface-pfroute.h similarity index 100% rename from avahi/iface-pfroute.h rename to src/iface-pfroute.h diff --git a/avahi/iface.c b/src/iface.c similarity index 99% rename from avahi/iface.c rename to src/iface.c index c17f994..aed4cad 100644 --- a/avahi/iface.c +++ b/src/iface.c @@ -32,13 +32,13 @@ #include #include #include +#include #include "iface.h" #include "dns.h" #include "socket.h" #include "announce.h" #include "util.h" -#include "log.h" #include "multicast-lookup.h" #include "querier.h" diff --git a/avahi/iface.h b/src/iface.h similarity index 100% rename from avahi/iface.h rename to src/iface.h diff --git a/avahi/internal.h b/src/internal.h similarity index 99% rename from avahi/internal.h rename to src/internal.h index 5ddaade..d378a28 100644 --- a/avahi/internal.h +++ b/src/internal.h @@ -26,8 +26,8 @@ typedef struct AvahiEntry AvahiEntry; #include #include #include +#include -#include "core.h" #include "iface.h" #include "prioq.h" #include "timeeventq.h" diff --git a/avahi/log.c b/src/log.c similarity index 98% rename from avahi/log.c rename to src/log.c index d110765..d159c95 100644 --- a/avahi/log.c +++ b/src/log.c @@ -24,7 +24,7 @@ #include #include -#include "log.h" +#include static AvahiLogFunction log_function = NULL; diff --git a/avahi/malloc.c b/src/malloc.c similarity index 99% rename from avahi/malloc.c rename to src/malloc.c index 23b13a9..bfc187c 100644 --- a/avahi/malloc.c +++ b/src/malloc.c @@ -27,7 +27,7 @@ #include #include -#include "malloc.h" +#include #ifndef va_copy #ifdef __va_copy diff --git a/avahi/multicast-lookup.c b/src/multicast-lookup.c similarity index 99% rename from avahi/multicast-lookup.c rename to src/multicast-lookup.c index 21f2545..e1bca37 100644 --- a/avahi/multicast-lookup.c +++ b/src/multicast-lookup.c @@ -29,7 +29,7 @@ #include "internal.h" #include "browse.h" #include "socket.h" -#include "log.h" +#include #include "hashmap.h" #include "multicast-lookup.h" #include "rr-util.h" diff --git a/avahi/multicast-lookup.h b/src/multicast-lookup.h similarity index 98% rename from avahi/multicast-lookup.h rename to src/multicast-lookup.h index 2707666..b7039b1 100644 --- a/avahi/multicast-lookup.h +++ b/src/multicast-lookup.h @@ -20,7 +20,7 @@ USA. ***/ -#include "lookup.h" +#include #include "browse.h" typedef struct AvahiMulticastLookupEngine AvahiMulticastLookupEngine; diff --git a/avahi/netlink.c b/src/netlink.c similarity index 99% rename from avahi/netlink.c rename to src/netlink.c index 8ccca2e..e2f0ceb 100644 --- a/avahi/netlink.c +++ b/src/netlink.c @@ -29,7 +29,7 @@ #include #include "netlink.h" -#include "log.h" +#include struct AvahiNetlink { int fd; diff --git a/avahi/netlink.h b/src/netlink.h similarity index 100% rename from avahi/netlink.h rename to src/netlink.h diff --git a/avahi/prioq.c b/src/prioq.c similarity index 100% rename from avahi/prioq.c rename to src/prioq.c diff --git a/avahi/prioq.h b/src/prioq.h similarity index 100% rename from avahi/prioq.h rename to src/prioq.h diff --git a/avahi/probe-sched.c b/src/probe-sched.c similarity index 99% rename from avahi/probe-sched.c rename to src/probe-sched.c index 4a13b19..a93b369 100644 --- a/avahi/probe-sched.c +++ b/src/probe-sched.c @@ -28,7 +28,7 @@ #include #include "probe-sched.h" -#include "log.h" +#include #include "rr-util.h" #define AVAHI_PROBE_HISTORY_MSEC 150 diff --git a/avahi/probe-sched.h b/src/probe-sched.h similarity index 100% rename from avahi/probe-sched.h rename to src/probe-sched.h diff --git a/avahi/querier.c b/src/querier.c similarity index 99% rename from avahi/querier.c rename to src/querier.c index f4666b6..682d52f 100644 --- a/avahi/querier.c +++ b/src/querier.c @@ -29,7 +29,7 @@ #include #include "querier.h" -#include "log.h" +#include struct AvahiQuerier { AvahiInterface *interface; diff --git a/avahi/querier.h b/src/querier.h similarity index 100% rename from avahi/querier.h rename to src/querier.h diff --git a/avahi/query-sched.c b/src/query-sched.c similarity index 99% rename from avahi/query-sched.c rename to src/query-sched.c index 9c0e7e1..7b059a6 100644 --- a/avahi/query-sched.c +++ b/src/query-sched.c @@ -27,7 +27,7 @@ #include #include "query-sched.h" -#include "log.h" +#include #define AVAHI_QUERY_HISTORY_MSEC 100 #define AVAHI_QUERY_DEFER_MSEC 100 diff --git a/avahi/query-sched.h b/src/query-sched.h similarity index 100% rename from avahi/query-sched.h rename to src/query-sched.h diff --git a/avahi/resolve-address.c b/src/resolve-address.c similarity index 100% rename from avahi/resolve-address.c rename to src/resolve-address.c diff --git a/avahi/resolve-host-name.c b/src/resolve-host-name.c similarity index 99% rename from avahi/resolve-host-name.c rename to src/resolve-host-name.c index a577d48..cf685ad 100644 --- a/avahi/resolve-host-name.c +++ b/src/resolve-host-name.c @@ -29,7 +29,7 @@ #include #include "browse.h" -#include "log.h" +#include #define TIMEOUT_MSEC 5000 diff --git a/avahi/resolve-service.c b/src/resolve-service.c similarity index 99% rename from avahi/resolve-service.c rename to src/resolve-service.c index eaac8bb..6625c28 100644 --- a/avahi/resolve-service.c +++ b/src/resolve-service.c @@ -31,7 +31,7 @@ #include #include "browse.h" -#include "log.h" +#include #define TIMEOUT_MSEC 5000 diff --git a/avahi/response-sched.c b/src/response-sched.c similarity index 99% rename from avahi/response-sched.c rename to src/response-sched.c index 1c8887d..3d73ed4 100644 --- a/avahi/response-sched.c +++ b/src/response-sched.c @@ -27,7 +27,7 @@ #include #include "response-sched.h" -#include "log.h" +#include #include "rr-util.h" /* Local packets are supressed this long after sending them */ diff --git a/avahi/response-sched.h b/src/response-sched.h similarity index 100% rename from avahi/response-sched.h rename to src/response-sched.h diff --git a/avahi/rlist.c b/src/rlist.c similarity index 96% rename from avahi/rlist.c rename to src/rlist.c index 17dcb24..c29b4ee 100644 --- a/avahi/rlist.c +++ b/src/rlist.c @@ -23,8 +23,8 @@ #include -#include "rlist.h" -#include "malloc.h" +#include +#include AvahiRList* avahi_rlist_prepend(AvahiRList *r, void *data) { AvahiRList *n; diff --git a/avahi/rr-util.h b/src/rr-util.h similarity index 99% rename from avahi/rr-util.h rename to src/rr-util.h index 0eebc00..402f936 100644 --- a/avahi/rr-util.h +++ b/src/rr-util.h @@ -20,7 +20,7 @@ USA. ***/ -#include "rr.h" +#include AVAHI_C_DECL_BEGIN diff --git a/avahi/rr.c b/src/rr.c similarity index 99% rename from avahi/rr.c rename to src/rr.c index 0f516fd..efab1ce 100644 --- a/avahi/rr.c +++ b/src/rr.c @@ -32,8 +32,8 @@ #include #include -#include "rr.h" -#include "log.h" +#include +#include #include "util.h" #include "hashmap.h" #include "domain-util.h" diff --git a/avahi/rrlist.c b/src/rrlist.c similarity index 99% rename from avahi/rrlist.c rename to src/rrlist.c index 016edbf..04af0fa 100644 --- a/avahi/rrlist.c +++ b/src/rrlist.c @@ -28,7 +28,7 @@ #include #include "rrlist.h" -#include "log.h" +#include typedef struct AvahiRecordListItem AvahiRecordListItem; diff --git a/avahi/rrlist.h b/src/rrlist.h similarity index 98% rename from avahi/rrlist.h rename to src/rrlist.h index c7b5aba..c6aafe2 100644 --- a/avahi/rrlist.h +++ b/src/rrlist.h @@ -21,7 +21,7 @@ ***/ -#include "rr.h" +#include typedef struct AvahiRecordList AvahiRecordList; diff --git a/avahi/server.c b/src/server.c similarity index 99% rename from avahi/server.c rename to src/server.c index e0a0e44..0d6d993 100644 --- a/avahi/server.c +++ b/src/server.c @@ -37,12 +37,12 @@ #include #include #include +#include #include "internal.h" #include "iface.h" #include "socket.h" #include "browse.h" -#include "log.h" #include "util.h" #include "dns-srv-rr.h" #include "addr-util.h" diff --git a/avahi/simple-watch.c b/src/simple-watch.c similarity index 99% rename from avahi/simple-watch.c rename to src/simple-watch.c index 8df18dd..5fcbfbe 100644 --- a/avahi/simple-watch.c +++ b/src/simple-watch.c @@ -29,10 +29,10 @@ #include #include -#include "llist.h" -#include "malloc.h" -#include "timeval.h" -#include "simple-watch.h" +#include +#include +#include +#include struct AvahiWatch { AvahiSimplePoll *simple_poll; diff --git a/avahi/socket.c b/src/socket.c similarity index 99% rename from avahi/socket.c rename to src/socket.c index 17ab6e5..151625a 100644 --- a/avahi/socket.c +++ b/src/socket.c @@ -45,10 +45,10 @@ #include #endif +#include #include "dns.h" #include "fdutil.h" #include "socket.h" -#include "log.h" #include "addr-util.h" /* this is a portability hack */ diff --git a/avahi/socket.h b/src/socket.h similarity index 100% rename from avahi/socket.h rename to src/socket.h diff --git a/avahi/strlst.c b/src/strlst.c similarity index 99% rename from avahi/strlst.c rename to src/strlst.c index b861cf8..bba4a2d 100644 --- a/avahi/strlst.c +++ b/src/strlst.c @@ -27,9 +27,9 @@ #include #include -#include "strlst.h" -#include "malloc.h" -#include "defs.h" +#include +#include +#include AvahiStringList*avahi_string_list_add_anonymous(AvahiStringList *l, size_t size) { AvahiStringList *n; diff --git a/avahi/thread-watch.c b/src/thread-watch.c similarity index 96% rename from avahi/thread-watch.c rename to src/thread-watch.c index c0cadeb..42e2cdd 100644 --- a/avahi/thread-watch.c +++ b/src/thread-watch.c @@ -31,11 +31,11 @@ #include #include -#include "llist.h" -#include "malloc.h" -#include "timeval.h" -#include "simple-watch.h" -#include "thread-watch.h" +#include +#include +#include +#include +#include struct AvahiThreadedPoll { AvahiSimplePoll *simple_poll; diff --git a/avahi/timeeventq.c b/src/timeeventq.c similarity index 99% rename from avahi/timeeventq.c rename to src/timeeventq.c index 2de3380..d7ae12f 100644 --- a/avahi/timeeventq.c +++ b/src/timeeventq.c @@ -26,9 +26,9 @@ #include #include +#include #include "timeeventq.h" -#include "log.h" struct AvahiTimeEvent { AvahiTimeEventQueue *queue; diff --git a/avahi/timeeventq.h b/src/timeeventq.h similarity index 100% rename from avahi/timeeventq.h rename to src/timeeventq.h diff --git a/avahi/timeval.c b/src/timeval.c similarity index 99% rename from avahi/timeval.c rename to src/timeval.c index cdb0f09..9e92086 100644 --- a/avahi/timeval.c +++ b/src/timeval.c @@ -25,7 +25,7 @@ #include #include -#include "timeval.h" +#include int avahi_timeval_compare(const struct timeval *a, const struct timeval *b) { assert(a); diff --git a/avahi/utf8.c b/src/utf8.c similarity index 100% rename from avahi/utf8.c rename to src/utf8.c diff --git a/avahi/utf8.h b/src/utf8.h similarity index 100% rename from avahi/utf8.h rename to src/utf8.h diff --git a/avahi/util.c b/src/util.c similarity index 100% rename from avahi/util.c rename to src/util.c diff --git a/avahi/util.h b/src/util.h similarity index 100% rename from avahi/util.h rename to src/util.h diff --git a/avahi/wide-area.c b/src/wide-area.c similarity index 99% rename from avahi/wide-area.c rename to src/wide-area.c index ab1369d..ab4c7e4 100644 --- a/avahi/wide-area.c +++ b/src/wide-area.c @@ -34,7 +34,7 @@ #include "internal.h" #include "browse.h" #include "socket.h" -#include "log.h" +#include #include "hashmap.h" #include "wide-area.h" #include "addr-util.h" diff --git a/avahi/wide-area.h b/src/wide-area.h similarity index 98% rename from avahi/wide-area.h rename to src/wide-area.h index b1dc570..8bd01db 100644 --- a/avahi/wide-area.h +++ b/src/wide-area.h @@ -20,7 +20,7 @@ USA. ***/ -#include "lookup.h" +#include #include "browse.h" typedef struct AvahiWideAreaLookupEngine AvahiWideAreaLookupEngine; diff --git a/tests/Makefile.am b/tests/Makefile.am index 5232323..9e05868 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -15,8 +15,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA. -AM_CFLAGS=-I$(top_srcdir) -AM_LDADD=$(top_srcdir)/avahi/libavahi.la +AM_CFLAGS=-I$(top_srcdir)/include +AM_LDADD=$(top_srcdir)/src/libavahi.la # This cool debug trap works on i386/gcc only AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")' diff --git a/tests/avahi-test.c b/tests/avahi-test.c index 31edd0c..50680ab 100644 --- a/tests/avahi-test.c +++ b/tests/avahi-test.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include "../src/dns-srv-rr.h" static AvahiSEntryGroup *group = NULL; static AvahiServer *server = NULL; diff --git a/tests/dns-spin-test.c b/tests/dns-spin-test.c index 51af02d..ebc5dd3 100644 --- a/tests/dns-spin-test.c +++ b/tests/dns-spin-test.c @@ -34,7 +34,7 @@ #include #include -#include +#include "../src/dns.h" #define MAX_CPU_SECONDS 1 diff --git a/tests/dns-test.c b/tests/dns-test.c index 6a63a0c..eba12c8 100644 --- a/tests/dns-test.c +++ b/tests/dns-test.c @@ -30,10 +30,10 @@ #include #include #include - -#include #include -#include + +#include "../src/dns.h" +#include "../src/util.h" int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) { char t[AVAHI_DOMAIN_NAME_MAX], *m; diff --git a/tests/hashmap-test.c b/tests/hashmap-test.c index 7c60aa2..14ba43d 100644 --- a/tests/hashmap-test.c +++ b/tests/hashmap-test.c @@ -26,8 +26,8 @@ #include #include -#include -#include +#include "../src/hashmap.h" +#include "../src/util.h" int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) { unsigned n; diff --git a/tests/prioq-test.c b/tests/prioq-test.c index 9922565..579c75d 100644 --- a/tests/prioq-test.c +++ b/tests/prioq-test.c @@ -28,7 +28,7 @@ #include -#include +#include "../src/prioq.h" #define POINTER_TO_INT(p) ((int) (long) (p)) #define INT_TO_POINTER(i) ((void*) (long) (i)) diff --git a/tests/timeeventq-test.c b/tests/timeeventq-test.c index 5b399b1..dbfc92d 100644 --- a/tests/timeeventq-test.c +++ b/tests/timeeventq-test.c @@ -26,10 +26,10 @@ #include #include - -#include #include +#include "../src/timeeventq.h" + #define POINTER_TO_INT(p) ((int) (long) (p)) #define INT_TO_POINTER(i) ((void*) (long) (i)) diff --git a/tests/utf8-test.c b/tests/utf8-test.c index 56c6fd0..3ef0af3 100644 --- a/tests/utf8-test.c +++ b/tests/utf8-test.c @@ -25,7 +25,7 @@ #include -#include +#include "../src/utf8.h" int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) { -- 2.39.5