Parcourir la source

[2475] Put #include directives in correct order

Also fix some issues from the review.
Stephen Morris il y a 12 ans
Parent
commit
3ba0299ad2
71 fichiers modifiés avec 350 ajouts et 268 suppressions
  1. 4 5
      src/bin/dhcp4/ctrl_dhcp4_srv.cc
  2. 2 2
      src/bin/dhcp4/ctrl_dhcp4_srv.h
  3. 1 1
      src/bin/dhcp4/dhcp4_log.cc
  4. 1 1
      src/bin/dhcp4/dhcp4_log.h
  5. 4 4
      src/bin/dhcp4/dhcp4_srv.cc
  6. 3 1
      src/bin/dhcp4/dhcp4_srv.h
  7. 4 3
      src/bin/dhcp4/main.cc
  8. 8 6
      src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc
  9. 9 7
      src/bin/dhcp4/tests/dhcp4_srv_unittest.cc
  10. 2 2
      src/bin/dhcp4/tests/dhcp4_unittests.cc
  11. 5 4
      src/bin/dhcp6/config_parser.h
  12. 5 5
      src/bin/dhcp6/ctrl_dhcp6_srv.cc
  13. 2 2
      src/bin/dhcp6/ctrl_dhcp6_srv.h
  14. 1 1
      src/bin/dhcp6/dhcp6_log.cc
  15. 2 2
      src/bin/dhcp6/dhcp6_log.h
  16. 2 3
      src/bin/dhcp6/dhcp6_srv.h
  17. 4 3
      src/bin/dhcp6/main.cc
  18. 1 1
      src/bin/dhcp6/tests/config_parser_unittest.cc
  19. 1 1
      src/bin/dhcp6/tests/dhcp6_srv_unittest.cc
  20. 6 4
      src/lib/dhcp/duid.cc
  21. 2 0
      src/lib/dhcp/duid.h
  22. 13 8
      src/lib/dhcp/iface_mgr.cc
  23. 7 5
      src/lib/dhcp/iface_mgr.h
  24. 5 6
      src/lib/dhcp/iface_mgr_linux.cc
  25. 9 7
      src/lib/dhcp/libdhcp++.cc
  26. 4 3
      src/lib/dhcp/libdhcp++.h
  27. 9 8
      src/lib/dhcp/option.cc
  28. 8 6
      src/lib/dhcp/option.h
  29. 9 7
      src/lib/dhcp/option4_addrlst.cc
  30. 11 9
      src/lib/dhcp/option4_addrlst.h
  31. 9 8
      src/lib/dhcp/option6_addrlst.cc
  32. 5 4
      src/lib/dhcp/option6_addrlst.h
  33. 6 6
      src/lib/dhcp/option6_ia.cc
  34. 5 4
      src/lib/dhcp/option6_ia.h
  35. 9 8
      src/lib/dhcp/option6_iaaddr.cc
  36. 5 5
      src/lib/dhcp/option6_iaaddr.h
  37. 3 3
      src/lib/dhcp/option6_int.h
  38. 3 3
      src/lib/dhcp/option6_int_array.h
  39. 3 3
      src/lib/dhcp/option_data_types.h
  40. 1 1
      src/lib/dhcp/option_definition.cc
  41. 8 7
      src/lib/dhcp/option_definition.h
  42. 4 3
      src/lib/dhcp/pkt4.cc
  43. 9 6
      src/lib/dhcp/pkt4.h
  44. 2 2
      src/lib/dhcp/pkt6.cc
  45. 8 5
      src/lib/dhcp/pkt6.h
  46. 9 5
      src/lib/dhcp/tests/duid_unittest.cc
  47. 11 9
      src/lib/dhcp/tests/iface_mgr_unittest.cc
  48. 10 7
      src/lib/dhcp/tests/libdhcp++_unittest.cc
  49. 8 4
      src/lib/dhcp/tests/option4_addrlst_unittest.cc
  50. 8 4
      src/lib/dhcp/tests/option6_addrlst_unittest.cc
  51. 7 5
      src/lib/dhcp/tests/option6_ia_unittest.cc
  52. 7 5
      src/lib/dhcp/tests/option6_iaaddr_unittest.cc
  53. 2 1
      src/lib/dhcp/tests/option6_int_array_unittest.cc
  54. 2 1
      src/lib/dhcp/tests/option6_int_unittest.cc
  55. 3 3
      src/lib/dhcp/tests/option_definition_unittest.cc
  56. 9 7
      src/lib/dhcp/tests/option_unittest.cc
  57. 13 9
      src/lib/dhcp/tests/pkt4_unittest.cc
  58. 9 6
      src/lib/dhcp/tests/pkt6_unittest.cc
  59. 2 1
      src/lib/dhcp/tests/run_unittests.cc
  60. 1 0
      src/lib/dhcpsrv/alloc_engine.cc
  61. 1 1
      src/lib/dhcpsrv/mysql_lease_mgr.h
  62. 6 4
      src/lib/dhcpsrv/tests/addr_utilities_unittest.cc
  63. 1 2
      src/lib/dhcpsrv/tests/alloc_engine_unittest.cc
  64. 3 1
      src/lib/dhcpsrv/tests/cfgmgr_unittest.cc
  65. 2 1
      src/lib/dhcpsrv/tests/lease_mgr_factory_unittest.cc
  66. 2 1
      src/lib/dhcpsrv/tests/lease_mgr_unittest.cc
  67. 2 1
      src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc
  68. 3 2
      src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc
  69. 2 1
      src/lib/dhcpsrv/tests/pool_unittest.cc
  70. 1 1
      src/lib/dhcpsrv/tests/run_unittests.cc
  71. 2 1
      src/lib/dhcpsrv/tests/triplet_unittest.cc

+ 4 - 5
src/bin/dhcp4/ctrl_dhcp4_srv.cc

@@ -14,21 +14,20 @@
 
 #include <config.h>
 
-#include <cassert>
-#include <iostream>
-
 #include <asiolink/asiolink.h>
 #include <cc/data.h>
 #include <cc/session.h>
-#include <cc/session.h>
 #include <config/ccsession.h>
+#include <dhcp/iface_mgr.h>
 #include <dhcp4/ctrl_dhcp4_srv.h>
 #include <dhcp4/dhcp4_log.h>
 #include <dhcp4/spec_config.h>
-#include <dhcp/iface_mgr.h>
 #include <exceptions/exceptions.h>
 #include <util/buffer.h>
 
+#include <cassert>
+#include <iostream>
+
 using namespace isc::asiolink;
 using namespace isc::cc;
 using namespace isc::config;

+ 2 - 2
src/bin/dhcp4/ctrl_dhcp4_srv.h

@@ -15,11 +15,11 @@
 #ifndef CTRL_DHCPV4_SRV_H
 #define CTRL_DHCPV4_SRV_H
 
-#include <dhcp4/dhcp4_srv.h>
 #include <asiolink/asiolink.h>
+#include <cc/data.h>
 #include <cc/session.h>
 #include <config/ccsession.h>
-#include <cc/data.h>
+#include <dhcp4/dhcp4_srv.h>
 
 namespace isc {
 namespace dhcp {

+ 1 - 1
src/bin/dhcp4/dhcp4_log.cc

@@ -14,7 +14,7 @@
 
 /// Defines the logger used by the top-level component of b10-dhcp4.
 
-#include "dhcp4_log.h"
+#include <dhcp4/dhcp4_log.h>
 
 namespace isc {
 namespace dhcp {

+ 1 - 1
src/bin/dhcp4/dhcp4_log.h

@@ -15,8 +15,8 @@
 #ifndef DHCP4_LOG_H
 #define DHCP4_LOG_H
 
-#include <log/macros.h>
 #include <log/logger_support.h>
+#include <log/macros.h>
 #include <dhcp4/dhcp4_messages.h>
 
 namespace isc {

+ 4 - 4
src/bin/dhcp4/dhcp4_srv.cc

@@ -12,13 +12,13 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
+#include <asiolink/io_address.h>
 #include <dhcp/dhcp4.h>
-#include <dhcp/pkt4.h>
 #include <dhcp/iface_mgr.h>
-#include <dhcp4/dhcp4_srv.h>
-#include <dhcp4/dhcp4_log.h>
-#include <asiolink/io_address.h>
 #include <dhcp/option4_addrlst.h>
+#include <dhcp/pkt4.h>
+#include <dhcp4/dhcp4_log.h>
+#include <dhcp4/dhcp4_srv.h>
 
 using namespace isc;
 using namespace isc::asiolink;

+ 3 - 1
src/bin/dhcp4/dhcp4_srv.h

@@ -15,10 +15,12 @@
 #ifndef DHCPV4_SRV_H
 #define DHCPV4_SRV_H
 
-#include <boost/noncopyable.hpp>
 #include <dhcp/dhcp4.h>
 #include <dhcp/pkt4.h>
 #include <dhcp/option.h>
+
+#include <boost/noncopyable.hpp>
+
 #include <iostream>
 
 namespace isc {

+ 4 - 3
src/bin/dhcp4/main.cc

@@ -13,14 +13,15 @@
 // PERFORMANCE OF THIS SOFTWARE.
 
 #include <config.h>
-#include <iostream>
-
-#include <boost/lexical_cast.hpp>
 
 #include <dhcp4/ctrl_dhcp4_srv.h>
 #include <dhcp4/dhcp4_log.h>
 #include <log/logger_support.h>
 
+#include <boost/lexical_cast.hpp>
+
+#include <iostream>
+
 using namespace isc::dhcp;
 using namespace std;
 

+ 8 - 6
src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc

@@ -13,16 +13,18 @@
 // PERFORMANCE OF THIS SOFTWARE.
 
 #include <config.h>
-#include <iostream>
+
+#include <config/ccsession.h>
+#include <dhcp/dhcp4.h>
+#include <dhcp4/ctrl_dhcp4_srv.h>
+
+#include <gtest/gtest.h>
+
 #include <fstream>
+#include <iostream>
 #include <sstream>
 
 #include <arpa/inet.h>
-#include <gtest/gtest.h>
-
-#include <dhcp/dhcp4.h>
-#include <dhcp4/ctrl_dhcp4_srv.h>
-#include <config/ccsession.h>
 
 using namespace std;
 using namespace isc;

+ 9 - 7
src/bin/dhcp4/tests/dhcp4_srv_unittest.cc

@@ -13,17 +13,19 @@
 // PERFORMANCE OF THIS SOFTWARE.
 
 #include <config.h>
-#include <iostream>
-#include <fstream>
 #include <sstream>
 
-#include <arpa/inet.h>
-#include <gtest/gtest.h>
-
+#include <asiolink/io_address.h>
 #include <dhcp/dhcp4.h>
-#include <dhcp4/dhcp4_srv.h>
 #include <dhcp/option.h>
-#include <asiolink/io_address.h>
+#include <dhcp4/dhcp4_srv.h>
+
+#include <gtest/gtest.h>
+
+#include <fstream>
+#include <iostream>
+
+#include <arpa/inet.h>
 
 using namespace std;
 using namespace isc;

+ 2 - 2
src/bin/dhcp4/tests/dhcp4_unittests.cc

@@ -12,10 +12,10 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
-#include <stdio.h>
-#include <gtest/gtest.h>
 #include <log/logger_support.h>
 
+#include <gtest/gtest.h>
+
 int
 main(int argc, char* argv[]) {
 

+ 5 - 4
src/bin/dhcp6/config_parser.h

@@ -12,13 +12,14 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
-#include <string>
-#include <exceptions/exceptions.h>
-#include <cc/data.h>
-
 #ifndef DHCP6_CONFIG_PARSER_H
 #define DHCP6_CONFIG_PARSER_H
 
+#include <cc/data.h>
+#include <exceptions/exceptions.h>
+
+#include <string>
+
 namespace isc {
 namespace dhcp {
 

+ 5 - 5
src/bin/dhcp6/ctrl_dhcp6_srv.cc

@@ -14,22 +14,22 @@
 
 #include <config.h>
 
-#include <cassert>
-#include <iostream>
-
 #include <asiolink/asiolink.h>
 #include <cc/data.h>
 #include <cc/session.h>
 #include <cc/session.h>
 #include <config/ccsession.h>
+#include <dhcp/iface_mgr.h>
+#include <dhcp6/config_parser.h>
 #include <dhcp6/ctrl_dhcp6_srv.h>
 #include <dhcp6/dhcp6_log.h>
 #include <dhcp6/spec_config.h>
-#include <dhcp6/config_parser.h>
-#include <dhcp/iface_mgr.h>
 #include <exceptions/exceptions.h>
 #include <util/buffer.h>
 
+#include <cassert>
+#include <iostream>
+
 using namespace isc::asiolink;
 using namespace isc::cc;
 using namespace isc::config;

+ 2 - 2
src/bin/dhcp6/ctrl_dhcp6_srv.h

@@ -15,11 +15,11 @@
 #ifndef CTRL_DHCPV6_SRV_H
 #define CTRL_DHCPV6_SRV_H
 
-#include <dhcp6/dhcp6_srv.h>
 #include <asiolink/asiolink.h>
+#include <cc/data.h>
 #include <cc/session.h>
 #include <config/ccsession.h>
-#include <cc/data.h>
+#include <dhcp6/dhcp6_srv.h>
 
 namespace isc {
 namespace dhcp {

+ 1 - 1
src/bin/dhcp6/dhcp6_log.cc

@@ -14,7 +14,7 @@
 
 /// Defines the logger used by the top-level component of b10-dhcp6.
 
-#include "dhcp6_log.h"
+#include <dhcp6/dhcp6_log.h>
 
 namespace isc {
 namespace dhcp {

+ 2 - 2
src/bin/dhcp6/dhcp6_log.h

@@ -15,9 +15,9 @@
 #ifndef DHCP6_LOG_H
 #define DHCP6_LOG_H
 
-#include <log/macros.h>
-#include <log/logger_support.h>
 #include <dhcp6/dhcp6_messages.h>
+#include <log/logger_support.h>
+#include <log/macros.h>
 
 namespace isc {
 namespace dhcp {

+ 2 - 3
src/bin/dhcp6/dhcp6_srv.h

@@ -15,8 +15,6 @@
 #ifndef DHCPV6_SRV_H
 #define DHCPV6_SRV_H
 
-#include <iostream>
-
 #include <dhcp/dhcp6.h>
 #include <dhcp/duid.h>
 #include <dhcp/option.h>
@@ -28,8 +26,9 @@
 
 #include <boost/noncopyable.hpp>
 
-namespace isc {
+#include <iostream>
 
+namespace isc {
 namespace dhcp {
 /// @brief DHCPv6 server service.
 ///

+ 4 - 3
src/bin/dhcp6/main.cc

@@ -13,14 +13,15 @@
 // PERFORMANCE OF THIS SOFTWARE.
 
 #include <config.h>
-#include <iostream>
-
-#include <boost/lexical_cast.hpp>
 
 #include <dhcp6/ctrl_dhcp6_srv.h>
 #include <dhcp6/dhcp6_log.h>
 #include <log/logger_support.h>
 
+#include <boost/lexical_cast.hpp>
+
+#include <iostream>
+
 using namespace isc::dhcp;
 using namespace std;
 

+ 1 - 1
src/bin/dhcp6/tests/config_parser_unittest.cc

@@ -23,13 +23,13 @@
 #include <dhcpsrv/subnet.h>
 
 #include <boost/foreach.hpp>
+#include <gtest/gtest.h>
 
 #include <fstream>
 #include <iostream>
 #include <sstream>
 
 #include <arpa/inet.h>
-#include <gtest/gtest.h>
 
 using namespace std;
 using namespace isc;

+ 1 - 1
src/bin/dhcp6/tests/dhcp6_srv_unittest.cc

@@ -15,7 +15,6 @@
 #include <config.h>
 
 #include <asiolink/io_address.h>
-#include <boost/scoped_ptr.hpp>
 #include <config/ccsession.h>
 #include <dhcp/dhcp6.h>
 #include <dhcp/duid.h>
@@ -32,6 +31,7 @@
 #include <util/buffer.h>
 #include <util/range_utilities.h>
 
+#include <boost/scoped_ptr.hpp>
 #include <gtest/gtest.h>
 
 #include <fstream>

+ 6 - 4
src/lib/dhcp/duid.cc

@@ -12,13 +12,15 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
+#include <dhcp/duid.h>
 #include <exceptions/exceptions.h>
-#include <stdint.h>
 #include <util/io_utilities.h>
-#include <dhcp/duid.h>
-#include <vector>
-#include <sstream>
+
 #include <iomanip>
+#include <sstream>
+#include <vector>
+
+#include <stdint.h>
 
 namespace isc {
 namespace dhcp {

+ 2 - 0
src/lib/dhcp/duid.h

@@ -16,7 +16,9 @@
 #define DUID_H
 
 #include <asiolink/io_address.h>
+
 #include <vector>
+
 #include <stdint.h>
 #include <unistd.h>
 

+ 13 - 8
src/lib/dhcp/iface_mgr.cc

@@ -13,22 +13,27 @@
 // PERFORMANCE OF THIS SOFTWARE.
 
 #include <config.h>
-#include <sstream>
-#include <fstream>
-#include <string.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <sys/select.h>
+
+// This must be included before udp_endpoint.h
 #include <asio.hpp>
 
+#include <asiolink/io_error.h>
+#include <asiolink/udp_endpoint.h>
 #include <dhcp/dhcp4.h>
 #include <dhcp/dhcp6.h>
 #include <dhcp/iface_mgr.h>
 #include <exceptions/exceptions.h>
-#include <asiolink/udp_endpoint.h>
-#include <asiolink/io_error.h>
 #include <util/io/pktinfo_utilities.h>
 
+
+#include <fstream>
+#include <sstream>
+
+#include <arpa/inet.h>
+#include <netinet/in.h>
+#include <string.h>
+#include <sys/select.h>
+
 using namespace std;
 using namespace isc::asiolink;
 using namespace isc::util::io::internal;

+ 7 - 5
src/lib/dhcp/iface_mgr.h

@@ -15,16 +15,18 @@
 #ifndef IFACE_MGR_H
 #define IFACE_MGR_H
 
-#include <list>
-#include <boost/shared_ptr.hpp>
-#include <boost/scoped_array.hpp>
-#include <boost/noncopyable.hpp>
 #include <asiolink/io_address.h>
-#include <dhcp/dhcp6.h>
 #include <dhcp/dhcp4.h>
+#include <dhcp/dhcp6.h>
 #include <dhcp/pkt4.h>
 #include <dhcp/pkt6.h>
 
+#include <boost/noncopyable.hpp>
+#include <boost/scoped_array.hpp>
+#include <boost/shared_ptr.hpp>
+
+#include <list>
+
 namespace isc {
 
 namespace dhcp {

+ 5 - 6
src/lib/dhcp/iface_mgr_linux.cc

@@ -31,18 +31,17 @@
 
 #if defined(OS_LINUX)
 
+#include <asiolink/io_address.h>
 #include <dhcp/iface_mgr.h>
 #include <exceptions/exceptions.h>
+#include <util/io/sockaddr_util.h>
+
+#include <boost/array.hpp>
+#include <boost/static_assert.hpp>
 
 #include <stdint.h>
 #include <net/if.h>
 #include <linux/rtnetlink.h>
-#include <boost/array.hpp>
-#include <boost/static_assert.hpp>
-#include <dhcp/iface_mgr.h>
-#include <exceptions/exceptions.h>
-#include <asiolink/io_address.h>
-#include <util/io/sockaddr_util.h>
 
 using namespace std;
 using namespace isc;

+ 9 - 7
src/lib/dhcp/libdhcp++.cc

@@ -12,19 +12,21 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
-#include <boost/shared_array.hpp>
-#include <boost/shared_ptr.hpp>
-#include <util/buffer.h>
-#include <exceptions/exceptions.h>
-#include <dhcp/libdhcp++.h>
-#include "config.h"
+#include <config.h>
+
 #include <dhcp/dhcp4.h>
 #include <dhcp/dhcp6.h>
+#include <dhcp/libdhcp++.h>
 #include <dhcp/option.h>
 #include <dhcp/option6_ia.h>
 #include <dhcp/option6_iaaddr.h>
-#include <dhcp/option_definition.h>
 #include <dhcp/option6_int_array.h>
+#include <dhcp/option_definition.h>
+#include <exceptions/exceptions.h>
+#include <util/buffer.h>
+
+#include <boost/shared_array.hpp>
+#include <boost/shared_ptr.hpp>
 
 using namespace std;
 using namespace isc::dhcp;

+ 4 - 3
src/lib/dhcp/libdhcp++.h

@@ -12,12 +12,13 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
-#ifndef LIBDHCP_H_
-#define LIBDHCP_H_
+#ifndef LIBDHCP_H
+#define LIBDHCP_H
 
 #include <dhcp/option_definition.h>
 #include <dhcp/pkt6.h>
 #include <util/buffer.h>
+
 #include <iostream>
 
 namespace isc {
@@ -164,4 +165,4 @@ private:
 }
 }
 
-#endif
+#endif // LIBDHCP_H

+ 9 - 8
src/lib/dhcp/option.cc

@@ -12,16 +12,17 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
-#include <string.h>
-#include <stdint.h>
-#include <arpa/inet.h>
-#include <sstream>
+#include <dhcp/libdhcp++.h>
+#include <dhcp/option.h>
+#include <exceptions/exceptions.h>
+#include <util/io_utilities.h>
+
 #include <iomanip>
-#include "exceptions/exceptions.h"
-#include "util/io_utilities.h"
+#include <sstream>
 
-#include "dhcp/option.h"
-#include "dhcp/libdhcp++.h"
+#include <arpa/inet.h>
+#include <stdint.h>
+#include <string.h>
 
 using namespace std;
 using namespace isc::util;

+ 8 - 6
src/lib/dhcp/option.h

@@ -12,14 +12,16 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
-#ifndef OPTION_H_
-#define OPTION_H_
+#ifndef OPTION_H
+#define OPTION_H
+
+#include <util/buffer.h>
+
+#include <boost/shared_ptr.hpp>
 
-#include <string>
 #include <map>
+#include <string>
 #include <vector>
-#include <boost/shared_ptr.hpp>
-#include <util/buffer.h>
 
 namespace isc {
 namespace dhcp {
@@ -329,4 +331,4 @@ protected:
 } // namespace isc::dhcp
 } // namespace isc
 
-#endif
+#endif // OPTION_H

+ 9 - 7
src/lib/dhcp/option4_addrlst.cc

@@ -12,15 +12,17 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
-#include <string.h>
-#include <stdint.h>
-#include <arpa/inet.h>
-#include <sstream>
-#include <iomanip>
-#include <exceptions/exceptions.h>
 #include <asiolink/io_address.h>
-#include <util/io_utilities.h>
 #include <dhcp/option4_addrlst.h>
+#include <exceptions/exceptions.h>
+#include <util/io_utilities.h>
+
+#include <iomanip>
+#include <sstream>
+
+#include <arpa/inet.h>
+#include <stdint.h>
+#include <string.h>
 
 using namespace std;
 using namespace isc::util;

+ 11 - 9
src/lib/dhcp/option4_addrlst.h

@@ -12,17 +12,19 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
-#ifndef OPTION4_ADDRLST_H_
-#define OPTION4_ADDRLST_H_
+#ifndef OPTION4_ADDRLST_H
+#define OPTION4_ADDRLST_H
 
-#include <string>
-#include <map>
-#include <vector>
-#include <boost/shared_ptr.hpp>
-#include <boost/shared_array.hpp>
 #include <asiolink/io_address.h>
-#include <util/buffer.h>
 #include <dhcp/option.h>
+#include <util/buffer.h>
+
+#include <boost/shared_array.hpp>
+#include <boost/shared_ptr.hpp>
+
+#include <map>
+#include <string>
+#include <vector>
 
 namespace isc {
 namespace dhcp {
@@ -162,4 +164,4 @@ protected:
 } // namespace isc::dhcp
 } // namespace isc
 
-#endif
+#endif // OPTION4_ADDRLST_H

+ 9 - 8
src/lib/dhcp/option6_addrlst.cc

@@ -12,16 +12,17 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
-#include <stdint.h>
-#include <arpa/inet.h>
+#include <asiolink/io_address.h>
+#include <dhcp/dhcp6.h>
+#include <dhcp/libdhcp++.h>
+#include <dhcp/option6_addrlst.h>
+#include <exceptions/exceptions.h>
+#include <util/io_utilities.h>
+
 #include <sstream>
-#include "exceptions/exceptions.h"
 
-#include "asiolink/io_address.h"
-#include "util/io_utilities.h"
-#include "dhcp/libdhcp++.h"
-#include "dhcp/option6_addrlst.h"
-#include "dhcp/dhcp6.h"
+#include <arpa/inet.h>
+#include <stdint.h>
 
 using namespace std;
 using namespace isc;

+ 5 - 4
src/lib/dhcp/option6_addrlst.h

@@ -12,13 +12,14 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
-#ifndef OPTION6_ADDRLST_H_
-#define OPTION6_ADDRLST_H_
+#ifndef OPTION6_ADDRLST_H
+#define OPTION6_ADDRLST_H
 
-#include <vector>
 #include <asiolink/io_address.h>
 #include <dhcp/option.h>
 
+#include <vector>
+
 namespace isc {
 namespace dhcp {
 
@@ -96,4 +97,4 @@ protected:
 } // isc::dhcp namespace
 } // isc namespace
 
-#endif /* OPTION_ADDRLST_H_ */
+#endif // OPTION_ADDRLST_H

+ 6 - 6
src/lib/dhcp/option6_ia.cc

@@ -12,16 +12,16 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
-#include <stdint.h>
-#include <arpa/inet.h>
-#include <sstream>
-
-#include <exceptions/exceptions.h>
+#include <dhcp/dhcp6.h>
 #include <dhcp/libdhcp++.h>
 #include <dhcp/option6_ia.h>
-#include <dhcp/dhcp6.h>
+#include <exceptions/exceptions.h>
 #include <util/io_utilities.h>
 
+#include <arpa/inet.h>
+#include <sstream>
+#include <stdint.h>
+
 using namespace std;
 using namespace isc::util;
 

+ 5 - 4
src/lib/dhcp/option6_ia.h

@@ -12,11 +12,12 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
-#ifndef OPTION_IA_H_
-#define OPTION_IA_H_
+#ifndef OPTION_IA_H
+#define OPTION_IA_H
+
+#include <dhcp/option.h>
 
 #include <stdint.h>
-#include "option.h"
 
 namespace isc {
 namespace dhcp {
@@ -112,4 +113,4 @@ protected:
 } // isc::dhcp namespace
 } // isc namespace
 
-#endif /* OPTION_IA_H_ */
+#endif // OPTION_IA_H

+ 9 - 8
src/lib/dhcp/option6_iaaddr.cc

@@ -12,16 +12,17 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
-#include <stdint.h>
-#include <arpa/inet.h>
+#include <asiolink/io_address.h>
+#include <dhcp/dhcp6.h>
+#include <dhcp/libdhcp++.h>
+#include <dhcp/option6_iaaddr.h>
+#include <exceptions/exceptions.h>
+#include <util/io_utilities.h>
+
 #include <sstream>
-#include "exceptions/exceptions.h"
 
-#include "dhcp/libdhcp++.h"
-#include "dhcp/option6_iaaddr.h"
-#include "dhcp/dhcp6.h"
-#include "asiolink/io_address.h"
-#include "util/io_utilities.h"
+#include <stdint.h>
+#include <arpa/inet.h>
 
 using namespace std;
 using namespace isc::asiolink;

+ 5 - 5
src/lib/dhcp/option6_iaaddr.h

@@ -12,11 +12,11 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
-#ifndef OPTION6_IAADDR_H_
-#define OPTION6_IAADDR_H_
+#ifndef OPTION6_IAADDR_H
+#define OPTION6_IAADDR_H
 
-#include "asiolink/io_address.h"
-#include "dhcp/option.h"
+#include <asiolink/io_address.h>
+#include <dhcp/option.h>
 
 namespace isc {
 namespace dhcp {
@@ -120,4 +120,4 @@ protected:
 } // isc::dhcp namespace
 } // isc namespace
 
-#endif /* OPTION_IA_H_ */
+#endif // OPTION_IA_H

+ 3 - 3
src/lib/dhcp/option6_int.h

@@ -12,8 +12,8 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
-#ifndef OPTION6_INT_H_
-#define OPTION6_INT_H_
+#ifndef OPTION6_INT_H
+#define OPTION6_INT_H
 
 #include <dhcp/libdhcp++.h>
 #include <dhcp/option.h>
@@ -186,4 +186,4 @@ private:
 } // isc::dhcp namespace
 } // isc namespace
 
-#endif /* OPTION6_INT_H_ */
+#endif // OPTION6_INT_H

+ 3 - 3
src/lib/dhcp/option6_int_array.h

@@ -12,8 +12,8 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
-#ifndef OPTION6_INT_ARRAY_H_
-#define OPTION6_INT_ARRAY_H_
+#ifndef OPTION6_INT_ARRAY_H
+#define OPTION6_INT_ARRAY_H
 
 #include <dhcp/libdhcp++.h>
 #include <dhcp/option.h>
@@ -225,4 +225,4 @@ private:
 } // isc::dhcp namespace
 } // isc namespace
 
-#endif /* OPTION6_INT_ARRAY_H_ */
+#endif // OPTION6_INT_ARRAY_H

+ 3 - 3
src/lib/dhcp/option_data_types.h

@@ -12,8 +12,8 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
-#ifndef OPTION_DATA_TYPES_H_
-#define OPTION_DATA_TYPES_H_
+#ifndef OPTION_DATA_TYPES_H
+#define OPTION_DATA_TYPES_H
 
 #include <exceptions/exceptions.h>
 
@@ -86,4 +86,4 @@ struct OptionDataTypes<uint32_t> {
 } // isc::dhcp namespace
 } // isc namespace
 
-#endif /* OPTION_DATA_TYPES_H_ */
+#endif // OPTION_DATA_TYPES_H

+ 1 - 1
src/lib/dhcp/option_definition.cc

@@ -13,13 +13,13 @@
 // PERFORMANCE OF THIS SOFTWARE.
 
 #include <dhcp/dhcp6.h>
-#include <dhcp/option_definition.h>
 #include <dhcp/option4_addrlst.h>
 #include <dhcp/option6_addrlst.h>
 #include <dhcp/option6_ia.h>
 #include <dhcp/option6_iaaddr.h>
 #include <dhcp/option6_int.h>
 #include <dhcp/option6_int_array.h>
+#include <dhcp/option_definition.h>
 
 using namespace std;
 using namespace isc::util;

+ 8 - 7
src/lib/dhcp/option_definition.h

@@ -12,16 +12,17 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
-#ifndef OPTION_DEFINITION_H_
-#define OPTION_DEFINITION_H_
+#ifndef OPTION_DEFINITION_H
+#define OPTION_DEFINITION_H
 
-#include <dhcp/option_data_types.h>
 #include <dhcp/option.h>
-#include <boost/shared_ptr.hpp>
-#include <boost/multi_index_container.hpp>
+#include <dhcp/option_data_types.h>
+
 #include <boost/multi_index/hashed_index.hpp>
-#include <boost/multi_index/sequenced_index.hpp>
 #include <boost/multi_index/mem_fun.hpp>
+#include <boost/multi_index/sequenced_index.hpp>
+#include <boost/multi_index_container.hpp>
+#include <boost/shared_ptr.hpp>
 
 namespace isc {
 namespace dhcp {
@@ -461,4 +462,4 @@ typedef std::pair<OptionDefContainerTypeIndex::const_iterator,
 } // namespace isc::dhcp
 } // namespace isc
 
-#endif
+#endif // OPTION_DEFINITION_H

+ 4 - 3
src/lib/dhcp/pkt4.cc

@@ -12,11 +12,12 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
-#include <dhcp/pkt4.h>
-#include <dhcp/libdhcp++.h>
+#include <asiolink/io_address.h>
 #include <dhcp/dhcp4.h>
+#include <dhcp/libdhcp++.h>
+#include <dhcp/pkt4.h>
 #include <exceptions/exceptions.h>
-#include <asiolink/io_address.h>
+
 #include <iostream>
 #include <sstream>
 

+ 9 - 6
src/lib/dhcp/pkt4.h

@@ -15,14 +15,17 @@
 #ifndef PKT4_H
 #define PKT4_H
 
+#include <asiolink/io_address.h>
+#include <util/buffer.h>
+#include <dhcp/option.h>
+
+#include <boost/date_time/posix_time/posix_time.hpp>
+#include <boost/shared_ptr.hpp>
+
 #include <iostream>
-#include <time.h>
 #include <vector>
-#include <boost/shared_ptr.hpp>
-#include <boost/date_time/posix_time/posix_time.hpp>
-#include "asiolink/io_address.h"
-#include "util/buffer.h"
-#include "dhcp/option.h"
+
+#include <time.h>
 
 namespace isc {
 

+ 2 - 2
src/lib/dhcp/pkt6.cc

@@ -12,11 +12,11 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
-
 #include <dhcp/dhcp6.h>
-#include <dhcp/pkt6.h>
 #include <dhcp/libdhcp++.h>
+#include <dhcp/pkt6.h>
 #include <exceptions/exceptions.h>
+
 #include <iostream>
 #include <sstream>
 

+ 8 - 5
src/lib/dhcp/pkt6.h

@@ -15,13 +15,16 @@
 #ifndef PKT6_H
 #define PKT6_H
 
+#include <asiolink/io_address.h>
+#include <dhcp/option.h>
+
+#include <boost/date_time/posix_time/posix_time.hpp>
+#include <boost/shared_array.hpp>
+#include <boost/shared_ptr.hpp>
+
 #include <iostream>
+
 #include <time.h>
-#include <boost/shared_ptr.hpp>
-#include <boost/shared_array.hpp>
-#include <boost/date_time/posix_time/posix_time.hpp>
-#include "asiolink/io_address.h"
-#include "dhcp/option.h"
 
 namespace isc {
 

+ 9 - 5
src/lib/dhcp/tests/duid_unittest.cc

@@ -13,14 +13,18 @@
 // PERFORMANCE OF THIS SOFTWARE.
 
 #include <config.h>
+
+#include <asiolink/io_address.h>
+#include <dhcp/duid.h>
+#include <exceptions/exceptions.h>
+
+#include <boost/scoped_ptr.hpp>
+#include <gtest/gtest.h>
+
 #include <iostream>
 #include <sstream>
+
 #include <arpa/inet.h>
-#include <gtest/gtest.h>
-#include <exceptions/exceptions.h>
-#include <boost/scoped_ptr.hpp>
-#include <asiolink/io_address.h>
-#include <dhcp/duid.h>
 
 using namespace std;
 using namespace isc;

+ 11 - 9
src/lib/dhcp/tests/iface_mgr_unittest.cc

@@ -13,19 +13,21 @@
 // PERFORMANCE OF THIS SOFTWARE.
 
 #include <config.h>
-#include <iostream>
-#include <fstream>
-#include <sstream>
 
-#include <unistd.h>
-#include <arpa/inet.h>
+#include <asiolink/io_address.h>
+#include <dhcp/dhcp4.h>
+#include <dhcp/iface_mgr.h>
+#include <dhcp/pkt6.h>
+
 #include <boost/scoped_ptr.hpp>
 #include <gtest/gtest.h>
 
-#include <asiolink/io_address.h>
-#include <dhcp/pkt6.h>
-#include <dhcp/iface_mgr.h>
-#include <dhcp/dhcp4.h>
+#include <fstream>
+#include <iostream>
+#include <sstream>
+
+#include <arpa/inet.h>
+#include <unistd.h>
 
 using namespace std;
 using namespace isc;

+ 10 - 7
src/lib/dhcp/tests/libdhcp++_unittest.cc

@@ -13,20 +13,23 @@
 // PERFORMANCE OF THIS SOFTWARE.
 
 #include <config.h>
-#include <iostream>
-#include <sstream>
-#include <arpa/inet.h>
-#include <gtest/gtest.h>
-#include <util/buffer.h>
+
 #include <dhcp/dhcp4.h>
 #include <dhcp/dhcp6.h>
 #include <dhcp/libdhcp++.h>
+#include <dhcp/option6_addrlst.h>
 #include <dhcp/option6_ia.h>
 #include <dhcp/option6_iaaddr.h>
 #include <dhcp/option6_int.h>
 #include <dhcp/option6_int_array.h>
-#include <dhcp/option6_addrlst.h>
-#include "config.h"
+#include <util/buffer.h>
+
+#include <gtest/gtest.h>
+
+#include <iostream>
+#include <sstream>
+
+#include <arpa/inet.h>
 
 using namespace std;
 using namespace isc;

+ 8 - 4
src/lib/dhcp/tests/option4_addrlst_unittest.cc

@@ -13,16 +13,20 @@
 // PERFORMANCE OF THIS SOFTWARE.
 
 #include <config.h>
-#include <iostream>
-#include <sstream>
-#include <arpa/inet.h>
-#include <gtest/gtest.h>
+
 #include <asiolink/io_address.h>
 #include <dhcp/dhcp4.h>
 #include <dhcp/option.h>
 #include <dhcp/option4_addrlst.h>
 #include <util/buffer.h>
 
+#include <gtest/gtest.h>
+
+#include <iostream>
+#include <sstream>
+
+#include <arpa/inet.h>
+
 using namespace std;
 using namespace isc;
 using namespace isc::dhcp;

+ 8 - 4
src/lib/dhcp/tests/option6_addrlst_unittest.cc

@@ -13,16 +13,20 @@
 // PERFORMANCE OF THIS SOFTWARE.
 
 #include <config.h>
-#include <iostream>
-#include <sstream>
-#include <arpa/inet.h>
-#include <gtest/gtest.h>
+
 #include <asiolink/io_address.h>
 #include <dhcp/dhcp6.h>
 #include <dhcp/option.h>
 #include <dhcp/option6_addrlst.h>
 #include <util/buffer.h>
 
+#include <gtest/gtest.h>
+
+#include <iostream>
+#include <sstream>
+
+#include <arpa/inet.h>
+
 using namespace std;
 using namespace isc;
 using namespace isc::dhcp;

+ 7 - 5
src/lib/dhcp/tests/option6_ia_unittest.cc

@@ -13,11 +13,6 @@
 // PERFORMANCE OF THIS SOFTWARE.
 
 #include <config.h>
-#include <iostream>
-#include <sstream>
-
-#include <arpa/inet.h>
-#include <gtest/gtest.h>
 
 #include <dhcp/dhcp6.h>
 #include <dhcp/option.h>
@@ -25,6 +20,13 @@
 #include <dhcp/option6_iaaddr.h>
 #include <util/buffer.h>
 
+#include <gtest/gtest.h>
+
+#include <iostream>
+#include <sstream>
+
+#include <arpa/inet.h>
+
 using namespace std;
 using namespace isc;
 using namespace isc::dhcp;

+ 7 - 5
src/lib/dhcp/tests/option6_iaaddr_unittest.cc

@@ -13,17 +13,19 @@
 // PERFORMANCE OF THIS SOFTWARE.
 
 #include <config.h>
-#include <iostream>
-#include <sstream>
-
-#include <arpa/inet.h>
-#include <gtest/gtest.h>
 
 #include <dhcp/dhcp6.h>
 #include <dhcp/option.h>
 #include <dhcp/option6_iaaddr.h>
 #include <util/buffer.h>
 
+#include <gtest/gtest.h>
+
+#include <iostream>
+#include <sstream>
+
+#include <arpa/inet.h>
+
 using namespace std;
 using namespace isc;
 using namespace isc::dhcp;

+ 2 - 1
src/lib/dhcp/tests/option6_int_array_unittest.cc

@@ -13,10 +13,11 @@
 // PERFORMANCE OF THIS SOFTWARE.
 
 #include <config.h>
+
 #include <dhcp/dhcp6.h>
 #include <dhcp/option.h>
-#include <dhcp/option6_int_array.h>
 #include <dhcp/option6_iaaddr.h>
+#include <dhcp/option6_int_array.h>
 #include <util/buffer.h>
 
 #include <boost/pointer_cast.hpp>

+ 2 - 1
src/lib/dhcp/tests/option6_int_unittest.cc

@@ -13,10 +13,11 @@
 // PERFORMANCE OF THIS SOFTWARE.
 
 #include <config.h>
+
 #include <dhcp/dhcp6.h>
 #include <dhcp/option.h>
-#include <dhcp/option6_int.h>
 #include <dhcp/option6_iaaddr.h>
+#include <dhcp/option6_int.h>
 #include <util/buffer.h>
 
 #include <boost/pointer_cast.hpp>

+ 3 - 3
src/lib/dhcp/tests/option_definition_unittest.cc

@@ -14,7 +14,6 @@
 
 #include <config.h>
 
-#include <exceptions/exceptions.h>
 #include <asiolink/io_address.h>
 #include <dhcp/dhcp4.h>
 #include <dhcp/dhcp6.h>
@@ -25,10 +24,11 @@
 #include <dhcp/option6_int.h>
 #include <dhcp/option6_int_array.h>
 #include <dhcp/option_definition.h>
+#include <exceptions/exceptions.h>
 
-#include <gtest/gtest.h>
-#include <boost/shared_ptr.hpp>
 #include <boost/pointer_cast.hpp>
+#include <boost/shared_ptr.hpp>
+#include <gtest/gtest.h>
 
 using namespace std;
 using namespace isc;

+ 9 - 7
src/lib/dhcp/tests/option_unittest.cc

@@ -13,17 +13,19 @@
 // PERFORMANCE OF THIS SOFTWARE.
 
 #include <config.h>
-#include <iostream>
-#include <sstream>
 
-#include <arpa/inet.h>
-#include <gtest/gtest.h>
-#include <boost/shared_ptr.hpp>
+#include <dhcp/dhcp6.h>
+#include <dhcp/option.h>
 #include <exceptions/exceptions.h>
 #include <util/buffer.h>
 
-#include "dhcp/dhcp6.h"
-#include "dhcp/option.h"
+#include <boost/shared_ptr.hpp>
+#include <gtest/gtest.h>
+
+#include <iostream>
+#include <sstream>
+
+#include <arpa/inet.h>
 
 using namespace std;
 using namespace isc;

+ 13 - 9
src/lib/dhcp/tests/pkt4_unittest.cc

@@ -13,18 +13,22 @@
 // PERFORMANCE OF THIS SOFTWARE.
 
 #include <config.h>
-#include <iostream>
-#include <sstream>
-#include <arpa/inet.h>
-#include <gtest/gtest.h>
-#include <boost/static_assert.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/shared_array.hpp>
-#include <util/buffer.h>
+
 #include <asiolink/io_address.h>
-#include <dhcp/pkt4.h>
 #include <dhcp/dhcp4.h>
+#include <dhcp/pkt4.h>
 #include <exceptions/exceptions.h>
+#include <util/buffer.h>
+
+#include <boost/shared_array.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/static_assert.hpp>
+#include <gtest/gtest.h>
+
+#include <iostream>
+#include <sstream>
+
+#include <arpa/inet.h>
 
 using namespace std;
 using namespace isc;

+ 9 - 6
src/lib/dhcp/tests/pkt6_unittest.cc

@@ -13,16 +13,19 @@
 // PERFORMANCE OF THIS SOFTWARE.
 
 #include <config.h>
-#include <iostream>
-#include <sstream>
-#include <arpa/inet.h>
-#include <boost/date_time/posix_time/posix_time.hpp>
-#include <gtest/gtest.h>
 
 #include <asiolink/io_address.h>
+#include <dhcp/dhcp6.h>
 #include <dhcp/option.h>
 #include <dhcp/pkt6.h>
-#include <dhcp/dhcp6.h>
+
+#include <boost/date_time/posix_time/posix_time.hpp>
+#include <gtest/gtest.h>
+
+#include <iostream>
+#include <sstream>
+
+#include <arpa/inet.h>
 
 using namespace std;
 using namespace isc;

+ 2 - 1
src/lib/dhcp/tests/run_unittests.cc

@@ -12,9 +12,10 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
-#include <gtest/gtest.h>
 #include <log/logger_support.h>
 
+#include <gtest/gtest.h>
+
 int
 main(int argc, char* argv[]) {
     ::testing::InitGoogleTest(&argc, argv);

+ 1 - 0
src/lib/dhcpsrv/alloc_engine.cc

@@ -16,6 +16,7 @@
 #include <dhcpsrv/lease_mgr_factory.h>
 
 #include <cstring>
+
 #include <string.h>
 
 using namespace isc::asiolink;

+ 1 - 1
src/lib/dhcpsrv/mysql_lease_mgr.h

@@ -18,7 +18,7 @@
 #include <dhcpsrv/lease_mgr.h>
 
 #include <boost/scoped_ptr.hpp>
-#include <mysql.h>
+#include <mysql/mysql.h>
 
 #include <time.h>
 

+ 6 - 4
src/lib/dhcpsrv/tests/addr_utilities_unittest.cc

@@ -1,5 +1,5 @@
 
-// Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012  Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -14,13 +14,15 @@
 // PERFORMANCE OF THIS SOFTWARE.
 
 #include <config.h>
-#include <stdint.h>
-#include <stdlib.h>
+
+#include <dhcpsrv/addr_utilities.h>
 
 #include <gtest/gtest.h>
+
 #include <vector>
 
-#include <dhcpsrv/addr_utilities.h>
+#include <stdint.h>
+#include <stdlib.h>
 
 using namespace std;
 using namespace isc::dhcp;

+ 1 - 2
src/lib/dhcpsrv/tests/alloc_engine_unittest.cc

@@ -24,13 +24,12 @@
 
 #include <boost/shared_ptr.hpp>
 #include <boost/scoped_ptr.hpp>
+#include <gtest/gtest.h>
 
 #include <iostream>
 #include <sstream>
 #include <map>
 
-#include <gtest/gtest.h>
-
 using namespace std;
 using namespace isc;
 using namespace isc::asiolink;

+ 3 - 1
src/lib/dhcpsrv/tests/cfgmgr_unittest.cc

@@ -17,10 +17,12 @@
 #include <dhcpsrv/cfgmgr.h>
 #include <exceptions/exceptions.h>
 
+#include <gtest/gtest.h>
+
 #include <iostream>
 #include <sstream>
+
 #include <arpa/inet.h>
-#include <gtest/gtest.h>
 
 using namespace std;
 using namespace isc::asiolink;

+ 2 - 1
src/lib/dhcpsrv/tests/lease_mgr_factory_unittest.cc

@@ -17,9 +17,10 @@
 #include <asiolink/io_address.h>
 #include <dhcpsrv/lease_mgr_factory.h>
 
+#include <gtest/gtest.h>
+
 #include <iostream>
 #include <sstream>
-#include <gtest/gtest.h>
 
 using namespace std;
 using namespace isc::dhcp;

+ 2 - 1
src/lib/dhcpsrv/tests/lease_mgr_unittest.cc

@@ -17,9 +17,10 @@
 #include <asiolink/io_address.h>
 #include <dhcpsrv/lease_mgr.h>
 
+#include <gtest/gtest.h>
+
 #include <iostream>
 #include <sstream>
-#include <gtest/gtest.h>
 
 using namespace std;
 using namespace isc;

+ 2 - 1
src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc

@@ -19,9 +19,10 @@
 #include <dhcpsrv/lease_mgr.h>
 #include <dhcpsrv/memfile_lease_mgr.h>
 
+#include <gtest/gtest.h>
+
 #include <iostream>
 #include <sstream>
-#include <gtest/gtest.h>
 
 using namespace std;
 using namespace isc;

+ 3 - 2
src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc

@@ -18,11 +18,12 @@
 #include <dhcpsrv/lease_mgr_factory.h>
 #include <dhcpsrv/mysql_lease_mgr.h>
 
+#include <gtest/gtest.h>
+
 #include <iostream>
 #include <sstream>
-#include <utility>
 #include <string>
-#include <gtest/gtest.h>
+#include <utility>
 
 using namespace isc;
 using namespace isc::asiolink;

+ 2 - 1
src/lib/dhcpsrv/tests/pool_unittest.cc

@@ -17,10 +17,11 @@
 #include <asiolink/io_address.h>
 #include <dhcpsrv/pool.h>
 
+#include <gtest/gtest.h>
+
 #include <iostream>
 #include <vector>
 #include <sstream>
-#include <gtest/gtest.h>
 
 using boost::scoped_ptr;
 using namespace isc;

+ 1 - 1
src/lib/dhcpsrv/tests/run_unittests.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012  Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above

+ 2 - 1
src/lib/dhcpsrv/tests/triplet_unittest.cc

@@ -17,9 +17,10 @@
 #include <dhcpsrv/triplet.h>
 #include <exceptions/exceptions.h>
 
-#include <stdint.h>
 #include <gtest/gtest.h>
 
+#include <stdint.h>
+
 using namespace isc::dhcp;
 using namespace isc;