Browse Source

[trac602] clean up rest of includes that lead to locks.h

ie. make sure no headers lead to it unintentionally (i.e.2 headers should not include asiolink.h, but the specific subparts we need) and cc files that include asiolink.h should include config.h first

needed to rename the terribly named src/bin/auth/config.h for this
Jelte Jansen 14 years ago
parent
commit
48846bf7b7

+ 1 - 1
src/bin/auth/Makefile.am

@@ -39,7 +39,7 @@ pkglibexec_PROGRAMS = b10-auth
 b10_auth_SOURCES = query.cc query.h
 b10_auth_SOURCES += auth_srv.cc auth_srv.h
 b10_auth_SOURCES += change_user.cc change_user.h
-b10_auth_SOURCES += config.cc config.h
+b10_auth_SOURCES += auth_config.cc auth_config.h
 b10_auth_SOURCES += command.cc command.h
 b10_auth_SOURCES += common.h
 b10_auth_SOURCES += statistics.cc statistics.h

+ 1 - 1
src/bin/auth/config.cc

@@ -29,7 +29,7 @@
 #include <datasrc/zonetable.h>
 
 #include <auth/auth_srv.h>
-#include <auth/config.h>
+#include <auth/auth_config.h>
 #include <auth/common.h>
 
 using namespace std;

src/bin/auth/config.h → src/bin/auth/auth_config.h


+ 1 - 1
src/bin/auth/auth_srv.cc

@@ -52,7 +52,7 @@
 #include <xfr/xfrout_client.h>
 
 #include <auth/common.h>
-#include <auth/config.h>
+#include <auth/auth_config.h>
 #include <auth/auth_srv.h>
 #include <auth/query.h>
 #include <auth/statistics.h>

+ 9 - 1
src/bin/auth/auth_srv.h

@@ -23,8 +23,16 @@
 
 #include <cc/data.h>
 #include <config/ccsession.h>
+#include <dns/message.h>
+#include <dns/buffer.h>
+
+#include <asiolink/io_message.h>
+#include <asiolink/io_service.h>
+#include <asiolink/dns_server.h>
+#include <asiolink/dns_lookup.h>
+#include <asiolink/dns_answer.h>
+#include <asiolink/simple_callback.h>
 
-#include <asiolink/asiolink.h>
 #include <auth/statistics.h>
 
 namespace isc {

+ 1 - 1
src/bin/auth/benchmarks/Makefile.am

@@ -10,7 +10,7 @@ noinst_PROGRAMS = query_bench
 query_bench_SOURCES = query_bench.cc
 query_bench_SOURCES += ../query.h  ../query.cc
 query_bench_SOURCES += ../auth_srv.h ../auth_srv.cc
-query_bench_SOURCES += ../config.h ../config.cc
+query_bench_SOURCES += ../auth_config.h ../auth_config.cc
 query_bench_SOURCES += ../statistics.h ../statistics.cc
 
 query_bench_LDADD = $(top_builddir)/src/lib/dns/libdns++.la

+ 3 - 1
src/bin/auth/benchmarks/query_bench.cc

@@ -12,6 +12,8 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
+#include <config.h>
+
 #include <stdlib.h>
 
 #include <iostream>
@@ -31,7 +33,7 @@
 #include <xfr/xfrout_client.h>
 
 #include <auth/auth_srv.h>
-#include <auth/config.h>
+#include <auth/auth_config.h>
 #include <auth/query.h>
 
 #include <asiolink/asiolink.h>

+ 3 - 1
src/bin/auth/main.cc

@@ -12,6 +12,8 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
+#include <config.h>
+
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/select.h>
@@ -37,7 +39,7 @@
 
 #include <auth/spec_config.h>
 #include <auth/common.h>
-#include <auth/config.h>
+#include <auth/auth_config.h>
 #include <auth/command.h>
 #include <auth/change_user.h>
 #include <auth/auth_srv.h>

+ 1 - 1
src/bin/auth/tests/Makefile.am

@@ -22,7 +22,7 @@ run_unittests_SOURCES += $(top_srcdir)/src/lib/dns/tests/unittest_util.cc
 run_unittests_SOURCES += ../auth_srv.h ../auth_srv.cc
 run_unittests_SOURCES += ../query.h ../query.cc
 run_unittests_SOURCES += ../change_user.h ../change_user.cc
-run_unittests_SOURCES += ../config.h ../config.cc
+run_unittests_SOURCES += ../config.h ../auth_config.cc
 run_unittests_SOURCES += ../command.h ../command.cc
 run_unittests_SOURCES += ../statistics.h ../statistics.cc
 run_unittests_SOURCES += auth_srv_unittest.cc

+ 3 - 1
src/bin/auth/tests/command_unittest.cc

@@ -12,6 +12,8 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
+#include <config.h>
+
 #include <cassert>
 #include <cstdlib>
 #include <string>
@@ -32,7 +34,7 @@
 #include <datasrc/memory_datasrc.h>
 
 #include <auth/auth_srv.h>
-#include <auth/config.h>
+#include <auth/auth_config.h>
 #include <auth/command.h>
 
 #include <asiolink/asiolink.h>

+ 1 - 1
src/bin/auth/tests/config_unittest.cc

@@ -26,7 +26,7 @@
 #include <xfr/xfrout_client.h>
 
 #include <auth/auth_srv.h>
-#include <auth/config.h>
+#include <auth/auth_config.h>
 #include <auth/common.h>
 
 #include <testutils/mockups.h>

+ 2 - 0
src/bin/resolver/main.cc

@@ -12,6 +12,8 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
+#include <config.h>
+
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/select.h>

+ 10 - 2
src/bin/resolver/resolver.h

@@ -21,8 +21,16 @@
 
 #include <cc/data.h>
 #include <config/ccsession.h>
-
-#include <asiolink/asiolink.h>
+#include <dns/message.h>
+#include <dns/buffer.h>
+
+#include <asiolink/io_message.h>
+#include <asiolink/io_service.h>
+#include <asiolink/dns_server.h>
+#include <asiolink/dns_service.h>
+#include <asiolink/dns_lookup.h>
+#include <asiolink/dns_answer.h>
+#include <asiolink/simple_callback.h>
 
 #include <resolve/resolver_interface.h>
 

+ 2 - 0
src/bin/resolver/tests/resolver_config_unittest.cc

@@ -12,6 +12,8 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
+#include <config.h>
+
 #include <string>
 
 #include <gtest/gtest.h>

+ 3 - 1
src/lib/resolve/resolver_callback.h

@@ -15,9 +15,11 @@
 #ifndef _ISC_RESOLVER_CALLBACK_H
 #define _ISC_RESOLVER_CALLBACK_H 1
 
-#include <asiolink/asiolink.h>
+#include <asiolink/dns_server.h>
 #include <dns/message.h>
 
+#include <resolve/resolver_interface.h>
+
 namespace isc {
 namespace resolve {
 

+ 1 - 1
src/lib/resolve/tests/resolver_callback_unittest.cc

@@ -13,8 +13,8 @@
 // PERFORMANCE OF THIS SOFTWARE.
 
 #include <gtest/gtest.h>
+#include <asiolink/dns_server.h>
 #include <resolve/resolver_callback.h>
-#include <asiolink/asiolink.h>
 
 using namespace isc::resolve;
 

+ 2 - 0
src/lib/testutils/srv_test.cc

@@ -12,6 +12,8 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
+#include <config.h>
+
 #include <netinet/in.h>
 
 #include <dns/message.h>