]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Replace include guard ifdef/define with pragma once 8631/head
authorChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Fri, 13 Dec 2019 10:00:31 +0000 (11:00 +0100)
committerChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Thu, 13 Feb 2020 09:38:26 +0000 (10:38 +0100)
85 files changed:
modules/bindbackend/bindbackend2.hh
modules/geoipbackend/geoipbackend.hh
modules/geoipbackend/geoipinterface.hh
modules/gmysqlbackend/gmysqlbackend.hh
modules/gmysqlbackend/smysql.hh
modules/godbcbackend/godbcbackend.hh
modules/godbcbackend/sodbc.hh
modules/gpgsqlbackend/gpgsqlbackend.hh
modules/gpgsqlbackend/spgsql.hh
modules/gsqlite3backend/gsqlite3backend.hh
modules/lua2backend/lua2api2.hh
modules/lua2backend/lua2backend.hh
modules/pipebackend/coprocess.hh
modules/pipebackend/pipebackend.hh
modules/remotebackend/remotebackend.hh
modules/tinydnsbackend/tinydnsbackend.hh
pdns/anadns.hh
pdns/arguments.hh
pdns/auth-caches.hh
pdns/auth-packetcache.hh
pdns/auth-querycache.hh
pdns/backends/gsql/gsqlbackend.hh
pdns/backends/gsql/ssql.hh
pdns/base32.hh
pdns/base64.hh
pdns/bindparserclasses.hh
pdns/cdb.hh
pdns/comment.hh
pdns/common_startup.hh
pdns/communicator.hh
pdns/distributor.hh
pdns/dns_random.hh
pdns/dnsbackend.hh
pdns/dnsdist-snmp.hh
pdns/dnspacket.hh
pdns/dnsparser.hh
pdns/dnspcap.hh
pdns/dnsproxy.hh
pdns/dnsrecords.hh
pdns/dnssecinfra.hh
pdns/dnswriter.hh
pdns/doh.hh
pdns/dynhandler.hh
pdns/dynlistener.hh
pdns/dynmessenger.hh
pdns/ednscookies.hh
pdns/ednsoptions.hh
pdns/ednssubnet.hh
pdns/gss_context.hh
pdns/iputils.hh
pdns/lazy_allocator.hh
pdns/lock.hh
pdns/lwres.hh
pdns/mplexer.hh
pdns/mtasker.hh
pdns/mtasker_context.hh
pdns/nameserver.hh
pdns/namespaces.hh
pdns/packetcache.hh
pdns/packethandler.hh
pdns/pdnsexception.hh
pdns/pkcs11signers.hh
pdns/qtype.hh
pdns/rcpgenerator.hh
pdns/rec-snmp.hh
pdns/recpacketcache.hh
pdns/recursor_cache.hh
pdns/resolver.hh
pdns/secpoll-auth.hh
pdns/secpoll-recursor.hh
pdns/sha.hh
pdns/signingpipe.hh
pdns/snmp-agent.hh
pdns/ssqlite3.hh
pdns/sstuff.hh
pdns/statbag.hh
pdns/tcpreceiver.hh
pdns/ueberbackend.hh
pdns/utility.hh
pdns/version.hh
pdns/webserver.hh
pdns/ws-api.hh
pdns/ws-auth.hh
pdns/ws-recursor.hh
pdns/zoneparser-tng.hh

index dfb16198503f14f3cf71cc146a38e7cc25a7cf76..1a33194326ef68b936f758e9f6822148ae31c138 100644 (file)
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-
-#ifndef PDNS_BINDBACKEND_HH
-#define PDNS_BINDBACKEND_HH
-
+#pragma once
 #include <string>
 #include <map>
 #include <set>
@@ -317,5 +314,3 @@ private:
   static void doEmptyNonTerminals(std::shared_ptr<recordstorage_t>& records, const DNSName& zoneName, bool nsec3zone, NSEC3PARAMRecordContent ns3pr);
   void loadConfig(string *status=nullptr);
 };
-
-#endif /* PDNS_BINDBACKEND_HH */
index fcf301eda1f81e542ed6a362b8bc43accdb189d0..1b885117bcd9a4cfae29b588cc3079229772beaa 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_GEOIPBACKEND_HH
-#define PDNS_GEOIPBACKEND_HH
-
+#pragma once
 #include "pdns/namespaces.hh"
 
 #include <vector>
@@ -79,5 +77,3 @@ private:
   vector<DNSResourceRecord> d_result;
   vector<GeoIPInterface> d_files;
 };
-
-#endif /* PDNS_GEOIPBACKEND_HH */
index 7b1e1805a2379ba43e080ddc92fa8958a1f2612e..1c7220b38fbd95e703c5b7ced9d9987174a0f2ad 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_GEOIPINTERFACE_HH
-#define PDNS_GEOIPINTERFACE_HH
-
+#pragma once
 #include "boost/optional.hpp"
 
 #include "geoipbackend.hh"
@@ -67,5 +65,3 @@ private:
   static unique_ptr<GeoIPInterface> makeMMDBInterface(const string &fname, const map<string, string>& opts);
   static unique_ptr<GeoIPInterface> makeDATInterface(const string& fname, const map<string, string>& opts);
 };
-
-#endif
index 67f6928a3121173db1b31294e9f724663461c26e..7fc5d2f1581a1ec9c514cb7bee6ec4951aad663b 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_GMYSQLBACKEND_HH
-#define PDNS_GMYSQLBACKEND_HH
-
+#pragma once
 #include <string>
 #include <map>
 #include "pdns/backends/gsql/gsqlbackend.hh"
@@ -37,5 +35,3 @@ public:
 protected:
   void reconnect() override;
 };
-
-#endif /* PDNS_GMYSQLBACKEND_HH */
index ea6af7579e385af60bf82febfe251d0f85a30833..74c5a4bc302f2c0317a2f15f1ec807dd7f830d13 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef SMYSQL_HH
-#define SMYSQL_HH
-
+#pragma once
 #include <mysql.h>
 #include "pdns/backends/gsql/ssql.hh"
 #include "pdns/utility.hh"
@@ -65,5 +63,3 @@ private:
   bool d_threadCleanup;
   bool d_clientSSL;
 };
-
-#endif /* SSMYSQL_HH */
index 473189f253762696fbd359c0e5d3e84d6bed2fa9..4053ba3afe6a2ae164a6efd4a919ff75d15a39ee 100644 (file)
@@ -19,6 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
+#pragma once
 #include <string>
 #include "pdns/backends/gsql/gsqlbackend.hh"
 
@@ -29,4 +30,3 @@ public:
   gODBCBackend( const std::string & mode, const std::string & suffix );
 
 };
-
index b8c369d68490274b7e5ff98458c8662af343ae03..5e750595cfc4c8dae485e4e94e677791344fdb6d 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef SODBC_HH
-#define SODBC_HH
-
+#pragma once
 #include <string>
 #include <vector>
 
@@ -75,6 +73,3 @@ public:
   SSqlException sPerrorException( const std::string & reason ) override;
 
 };
-
-
-#endif // SODBC_HH
index b1bef1da95a7192ee09b35db29277ef2d3f1db3a..9b89db158de50d5db1c50850c2b9890730452b00 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_GPGSQLBACKEND_HH
-#define PDNS_GPGSQLBACKEND_HH
-
+#pragma once
 #include <string>
 #include <map>
 #include "pdns/backends/gsql/gsqlbackend.hh"
@@ -38,5 +36,3 @@ protected:
   void reconnect() override;
   bool inTransaction() override;
 };
-
-#endif /* PDNS_GPGSQLBACKEND_HH */
index 91720e08c547ab722ec0f591f7d36a32121a2f61..c0aab35ca1625c5a59382b9bf4bc99018676c910 100644 (file)
@@ -19,8 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef SPGSQL_HH
-#define SPGSQL_HH
+#pragma once
 #include "pdns/namespaces.hh"
 #include "pdns/backends/gsql/ssql.hh"
 
@@ -56,5 +55,3 @@ private:
   static bool s_dolog;
   bool d_in_trx;
 };
-
-#endif /* SPGSQL_HH */
index 623d482674e40ea87ca1448d31582d9e40f13734..2eaf3011563b9f9edb5632e8262b7c518186fdd2 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef GSQLITEBACKEND_HH
-#define GSQLITEBACKEND_HH
-
+#pragma once
 #include <string>
 #include "pdns/backends/gsql/gsqlbackend.hh"
 
@@ -32,5 +30,3 @@ public:
   //! Constructs the backend, throws an exception if it failed..
   gSQLite3Backend( const std::string & mode, const std::string & suffix );
 };
-
-#endif // GSQLITEBACKEND_HH
index 1f56fc29fcd30de9ed1bffcc35f25bd02a32f2a4..d61ee11805a060946572808bbd36430e562ae57d 100644 (file)
@@ -20,9 +20,6 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 #pragma once
-#ifndef LUA2API_2_HH
-#define LUA2API_2_HH 1
-
 #include "boost/lexical_cast.hpp"
 #include "boost/algorithm/string/join.hpp"
 #include "pdns/arguments.hh"
@@ -418,5 +415,3 @@ private:
 
   deinit_call_t f_deinit;
 };
-
-#endif
index 2539d4627bfb00f803c31227c5a0be24f113d7be..0bcb4567a9c6c3b8cc441633f14f71e83129423a 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 #pragma once
-#ifndef LUA2BACKEND_HH
-#define LUA2BACKEND_HH 1
-
 #include "pdns/dnsbackend.hh"
 #include "pdns/lua-auth4.hh"
 #include "lua2api2.hh"
-
-#endif
index dd581cc9b01fbde2e53dc72deda912397cb6a146..84c516e3d0eaa64994ae4393e2a6bbd2bd11a560 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_COPROCESS_HH
-#define PDNS_COPROCESS_HH
-
+#pragma once
 #include <iostream>
 #include <stdio.h>
 #include <string>
@@ -72,4 +70,3 @@ private:
   FILE *d_fp;
 };
 bool isUnixSocket(const string& fname);
-#endif
index bdb00b0a45c039bd5ddd812c8ff9bf19a8baf46d..15bde4afb96d68d82d268a90d19d2700156d04e2 100644 (file)
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PIPEBACKEND_HH
-#define PIPEBACKEND_HH
-
+#pragma once
 #include <string>
 #include <map>
 #include <sys/types.h>
 
-
 #include "pdns/namespaces.hh"
 #include "pdns/misc.hh"
 
@@ -70,7 +67,3 @@ private:
   bool d_disavow;
   int d_abiVersion;
 };
-
-
-#endif
-
index 8353d18beed50d55442d7d16715a359b1db23f19..5f94d223bc4c0864a06768f3a3dde8ac24cedc5d 100644 (file)
@@ -19,8 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef REMOTEBACKEND_REMOTEBACKEND_HH
-
+#pragma once
 #include <sys/types.h>
 #include <sys/wait.h>
 
@@ -228,4 +227,3 @@ class RemoteBackend : public DNSBackend
 
     void parseDomainInfo(const json11::Json &obj, DomainInfo &di);
 };
-#endif
index 869083db22d9702e8b4b07b8b79f099620b3f2fd..5029546714523831585b75cd4374f8e556e2b247 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef TINYDNSBACKEND_HH
-#define TINYDNSBACKEND_HH
-
+#pragma once
 #include "pdns/dnsbackend.hh"
 #include "pdns/logger.hh"
 #include "pdns/iputils.hh"
@@ -108,5 +106,3 @@ private:
   static TDI_suffix_t s_domainInfo;
   static uint32_t s_lastId; // used to give a domain an id.
 };
-
-#endif // TINYDNSBACKEND_HH
index 34657684ef782fa9efd747c2a7492f26ff72cb1a..b1054bf9795e6493c69325b8c45a81bb97c0e37d 100644 (file)
@@ -19,8 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_ANADNS_HH
-#define PDNS_ANADNS_HH
+#pragma once
 #include <boost/tuple/tuple.hpp>
 #include <boost/tuple/tuple_comparison.hpp>
 #include <string>
@@ -83,6 +82,3 @@ inline ostream& operator<<(ostream &s, const QuestionIdentifier& qi)
   s<<" to " << qi.d_dest.toStringWithPort();
   return s;
 }
-
-
-#endif
index d91a95a533e07b853da9c006782f9987ae777502..81f308f2a0b50d2c60482d59a4427225f705c84b 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef ARGUMENTS_HH
-#define ARGUMENTS_HH
-
+#pragma once
 #include <map>
 #include <set>
 #include <string>
@@ -129,5 +127,3 @@ private:
 };
 
 extern ArgvMap &arg();
-
-#endif /* ARGUMENTS_HH */
index 76c248f3ca48264656e28625fd97d6badb66e8b2..f7d6de9d76bca985db1c782144d333864bb7e352 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef AUTH_CACHES_HH
-#define AUTH_CACHES_HH
-
+#pragma once
 #include <string>
 #include <cstdint>
 
@@ -30,5 +28,3 @@
 uint64_t purgeAuthCaches(); /* empty all caches */
 uint64_t purgeAuthCaches(const std::string& match); /* remove specific entries from all caches, can be $ terminated */
 uint64_t purgeAuthCachesExact(const DNSName& qname); /* remove specific entries from all caches, no wildcard matching */
-
-#endif /* AUTH_CACHES_HH */
index 5fa324c99172e838630cc007d183a4103d9f2b6c..0d3af47a251ef2cc7f85373a86001b424178f8e6 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef AUTH_PACKETCACHE_HH
-#define AUTH_PACKETCACHE_HH
-
+#pragma once
 #include <string>
 #include <map>
 #include "dns.hh"
@@ -148,5 +146,3 @@ private:
 
   static const unsigned int s_mincleaninterval=1000, s_maxcleaninterval=300000;
 };
-
-#endif /* AUTH_PACKETCACHE_HH */
index 5fc4c55e308941e41085b3367f65c53073bae9f4..889634bb60dd88dc8a7abc469ca9404df53bed02 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef AUTH_QUERYCACHE_HH
-#define AUTH_QUERYCACHE_HH
-
+#pragma once
 #include <string>
 #include <map>
 #include "dns.hh"
@@ -129,5 +127,3 @@ private:
 
   static const unsigned int s_mincleaninterval=1000, s_maxcleaninterval=300000;
 };
-
-#endif /* AUTH_QUERYCACHE_HH */
index aa9eb2d6267d66a3173c175fe5417a4cddb1e647..e13290c723db1fc95c88b98e21cce90354062ffe 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_GSQLBACKEND_HH
-#define PDNS_GSQLBACKEND_HH
-
+#pragma once
 #include <string>
 #include <map>
 #include "ssql.hh"
@@ -411,5 +409,3 @@ protected:
   bool d_dnssecQueries;
   bool d_inTransaction{false};
 };
-
-#endif /* PDNS_GSQLBACKEND_HH */
index df71eb91fe6d5d5a2e3d9dd88187dfbbc0836e5a..7007d5fe9042835c1d006d11b9d006e1c4e9383d 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef SSQL_HH
-#define SSQL_HH
-
+#pragma once
 #include <string>
 #include <vector>
 #include <inttypes.h>
@@ -88,5 +86,3 @@ public:
   virtual void reconnect() {};
   virtual ~SSql(){};
 };
-
-#endif /* SSQL_HH */
index d444345c98de371251174b8396d6d9b2deadd1ca..5e1bab47f9641877671d680acdb1c591738f825d 100644 (file)
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_BASE32_HH
-#define PDNS_BASE32_HH
+#pragma once
 #include <string>
 
 std::string toBase32Hex(const std::string& input);
 std::string fromBase32Hex(const std::string& input);
-
-#endif
index 37ab35b047b5f92d86b90c433c6e002894afc78a..f7b39ec250e6056d413566f4f9c1dfc2459ae769 100644 (file)
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_BASE64_HH
-#define PDNS_BASE64_HH
-
+#pragma once
 #include <string>
 
 int B64Decode(const std::string& src, std::string& dst);
 std::string Base64Encode (const std::string& src);
-
-#endif
index 12e60c227e82a6c1998930b6e8e93be9697e5b2b..177a004da758e5b07ba82204d57ceed93851cde6 100644 (file)
@@ -19,8 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef BINDPARSER_HH
-#define BINDPARSER_HH
+#pragma once
 #include <string>
 #include <map>
 #include <vector>
@@ -97,5 +96,3 @@ private:
   vector<BindDomainInfo> d_zonedomains;
   bool d_verbose;
 };
-
-#endif /* BINDPARSER_HH */
index 8673e3316615ac8f408b5b1d03686bf85766a76a..c6069583658c8a0b0d64e8c783591c8c39690346 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef CDB_HH
-#define CDB_HH
-
+#pragma once
 #include <cdb.h>
 
 #include "misc.hh"
@@ -70,5 +68,3 @@ private:
   struct cdb_make d_cdbm;
   int d_fd{-1};
 };
-
-#endif // CDB_HH
index f159af3f931e51e6c373a8ebe36883f5587850db..6854c094474ec5c92c755d672714e54677d509b4 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_COMMENT_HH
-#define PDNS_COMMENT_HH
-
+#pragma once
 #include "utility.hh"
 #include "qtype.hh"
 #include <sys/types.h>
@@ -41,5 +39,3 @@ public:
   int domain_id;
   QType qtype; //!< qtype of the associated RRset, ie A, CNAME, MX etc
 };
-
-#endif /* PDNS_COMMENT_HH */
index 01f2d041e776212d77c95df4832fa7084f41efda..45c8045c0c817bcc267bfc483ec131ac0509331f 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef COMMON_STARTUP_HH
-#define COMMON_STARTUP_HH
-
+#pragma once
 #include "auth-packetcache.hh"
 #include "auth-querycache.hh"
 #include "utility.hh"
@@ -61,5 +59,3 @@ extern bool g_LuaRecordSharedState;
 extern time_t g_luaHealthChecksInterval;
 extern time_t g_luaHealthChecksExpireDelay;
 #endif // HAVE_LUA_RECORDS
-
-#endif // COMMON_STARTUP_HH
index 2b3fe75071659e6b69de2e87f28970f97ad3411d..0c3d479b112ab69bf6ebeb9fc2276f387896314d 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_COMMUNICATOR_HH
-#define PDNS_COMMUNICATOR_HH
-
+#pragma once
 #include <pthread.h>
 #include <string>
 #include <semaphore.h>
@@ -290,6 +288,3 @@ private:
     }
   }
 };
-
-
-#endif
index 30d8f76507e1f770238112e9909b3df7cb662d45..c025d897f5db4eecceb3bed22ec7406bd4d6cb40 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef DISTRIBUTOR_HH
-#define DISTRIBUTOR_HH
-
+#pragma once
 #include <string>
 #include <deque>
 #include <queue>
@@ -328,6 +326,3 @@ template<class Answer, class Question, class Backend>int MultiThreadDistributor<
 
   return ret;
 }
-
-#endif // DISTRIBUTOR_HH
-
index 8aa88f0d4a1467901b3cadb86b34018750375dcc..8afda61e60353a6645bebefed53191e38faadc88 100644 (file)
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_DNS_RANDOM
-#define PDNS_DNS_RANDOM
+#pragma once
 #include <cstdint>
 
 void dns_random_init(const std::string& data = "", bool force_reinit = false);
 uint32_t dns_random(uint32_t n);
 uint16_t dns_random_uint16();
-
-#endif
index 321463fc45e68f7c8ecf2bdeba3fde785e2182aa..c45b07e0096a90d10d3af232a7b627dfedfa3f4b 100644 (file)
@@ -19,8 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef DNSBACKEND_HH
-#define DNSBACKEND_HH
+#pragma once
 
 class DNSPacket;
 
@@ -440,5 +439,3 @@ void fillSOAData(const string &content, SOAData &data);
 void fillSOAData(const DNSZoneRecord& in, SOAData& data);
 // the reverse
 std::shared_ptr<DNSRecordContent> makeSOAContent(const SOAData& sd);
-
-#endif
index b04518286e6a206e52b322923baa50e8972c778a..d98870ff59569149833b8bd04f49e6a9b90077be 100644 (file)
@@ -1,6 +1,24 @@
-#ifndef DNSDIST_SNMP_HH
-#define DNSDIST_SNMP_HH
-
+/*
+ * This file is part of PowerDNS or dnsdist.
+ * Copyright -- PowerDNS.COM B.V. and its contributors
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * In addition, for the avoidance of any doubt, permission is granted to
+ * link this program with OpenSSL and to (re)distribute the binaries
+ * produced as the result of such linking.
+ *
+ * This program 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
 #pragma once
 
 #include "snmp-agent.hh"
@@ -17,5 +35,3 @@ public:
   bool sendCustomTrap(const std::string& reason);
   bool sendDNSTrap(const DNSQuestion&, const std::string& reason="");
 };
-
-#endif /* DNSDIST_SNMP_HH */
index 33414511d46d3dff724eeee95e4accf6321eb60c..90dd156d9e68fa15a5f90be82da58d4ff1d04221 100644 (file)
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef DNSPACKET_HH
-
-#define DNSPACKET_HH
-
+#pragma once
 #include <cstdio>
 #include <cstring>
 #include <cstdlib>
@@ -193,5 +190,3 @@ private:
   bool d_haveednssection{false};
   bool d_isQuery;
 };
-
-#endif
index 3bb22f3b7ef631f84aaa54a722eee2228f3740b0..e11802616458bd27afcab51f136b765883abd9fb 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef DNSPARSER_HH
-#define DNSPARSER_HH
-
+#pragma once
 #include <map>
 #include <sstream>
 #include <stdexcept>
@@ -526,5 +524,3 @@ private:
   uint32_t d_notyouroffset;  // only 'moveOffset' can touch this
   const uint32_t&  d_offset; // look.. but don't touch
 };
-
-#endif
index 1b9b0e2800e31db98bc580f4ff8a7cd482f1df32..a8a6e9a1201cc2dc3d58e46625a600faf4e9c5bd 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_DNSPCAP_HH
-#define PDNS_DNSPCAP_HH
-
+#pragma once
 #include <cstdio>
 #include <stdexcept>
 #include "iputils.hh"
@@ -143,5 +141,3 @@ private:
   FILE *d_fp;
   bool d_first{true};
 }; 
-
-#endif // DNSPCAP_HH
index c4091f59dafb86ec6541c7dcd984fe8c354324f7..e9b5807af49832b362573137820fd20671100352 100644 (file)
@@ -19,8 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_DNSPROXY
-#define PDNS_DNSPROXY
+#pragma once
 #include <pthread.h>
 #include <map>
 #include <sys/socket.h>
@@ -91,5 +90,3 @@ private:
   int getID_locked();
   uint16_t d_xor;
 };
-
-#endif
index 1031ddf59dd771fd857b7a0b83ee5be987a019fa..3c2ab3d6f884345d110815ccdec4f8c84234d02f 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_DNSRECORDS_HH
-#define PDNS_DNSRECORDS_HH
-
+#pragma once
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -903,4 +901,3 @@ void reportOtherTypes();
 void reportAllTypes();
 ComboAddress getAddr(const DNSRecord& dr, uint16_t defport=0);
 void checkHostnameCorrectness(const DNSResourceRecord& rr);
-#endif 
index 440edc981a4473ad7a2646f4aa50595c9901a593..f8ff86e75c2c1706604094387e7bdebba1241e56 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_DNSSECINFRA_HH
-#define PDNS_DNSSECINFRA_HH
-
+#pragma once
 #include "dnsrecords.hh"
 
 #include <string>
@@ -175,4 +173,3 @@ void addTSIG(DNSPacketWriter& pw, TSIGRecordContent& trc, const DNSName& tsigkey
 bool validateTSIG(const std::string& packet, size_t sigPos, const TSIGTriplet& tt, const TSIGRecordContent& trc, const std::string& previousMAC, const std::string& theirMAC, bool timersOnly, unsigned int dnsHeaderOffset=0);
 
 uint64_t signatureCacheSize(const std::string& str);
-#endif
index fbfcd4739ad35a8f0f2bfaf9887b9c581e04a48d..58b1bf2a4db238f1697de4118ecc8d06a0c26f53 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_DNSWRITER_HH
-#define PDNS_DNSWRITER_HH
-
+#pragma once
 #include <string>
 #include <vector>
 #include <map>
@@ -173,4 +171,4 @@ private:
 typedef vector<pair<string::size_type, string::size_type> > labelparts_t;
 // bool labeltokUnescape(labelparts_t& parts, const DNSName& label);
 std::vector<string> segmentDNSText(const string& text); // from dnslabeltext.rl
-#endif
+std::deque<string> segmentDNSName(const string& input); // from dnslabeltext.rl
index dbcfbb31ab55a60bc8f92dada7deea11f471dc34..f7f9a80aaa7b2bfbda59fbf873c0a72189933889 100644 (file)
@@ -1,3 +1,24 @@
+/*
+ * This file is part of PowerDNS or dnsdist.
+ * Copyright -- PowerDNS.COM B.V. and its contributors
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * In addition, for the avoidance of any doubt, permission is granted to
+ * link this program with OpenSSL and to (re)distribute the binaries
+ * produced as the result of such linking.
+ *
+ * This program 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
 #pragma once
 #include "iputils.hh"
 #include "libssl.hh"
index 6a7ab6e694e331586ebc385f6256fe71d7adda8e..774ae5c4bac23e05516db4062d73bf266a91a453 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_DYNHANDLER_HH
-#define PDNS_DYNHANDLER_HH
-
+#pragma once
 #include <vector>
 #include <string>
 #include <stdlib.h>
@@ -57,4 +55,3 @@ string DLCurrentConfigHandler(const vector<string>&parts, Utility::pid_t ppid);
 string DLListZones(const vector<string>&parts, Utility::pid_t ppid);
 string DLTokenLogin(const vector<string>&parts, Utility::pid_t ppid);
 uint64_t udpErrorStats(const std::string& str);
-#endif /* PDNS_DYNHANDLER_HH */
index 62fc6fc78357b5603cce90572c3bfbf516fa395c..da61661ccb4c8bbfa8852137b26383211e05bff4 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_DYNLISTENER
-#define PDNS_DYNLISTENER
-
+#pragma once
 #include <string>
 #include <vector>
 #include <pthread.h>
@@ -79,4 +77,3 @@ private:
   static g_funk_t* s_restfunc;
   bool testLive(const string& fname);
 };
-#endif /* PDNS_DYNLISTENER */
index c9e60d5e9db897702910ebdde627b6e66893c9df..100fd3636b675080a8c147975e91e5f2d82fa13b 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef DYNMESSENGER_HH
-#define DYNMESSENGER_HH
-
+#pragma once
 #include <string>
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -62,5 +60,3 @@ public:
   int send(const string &message) const; //!< Send a message to a DynListener
   string receive() const; //!< receive an answer from a DynListener
 };
-#endif
index 7dce62bbe3db07796accec36ef9b0a5c8f8f29a6..4e6f42e6cd6231dab706b5e724397d9a889b8ac1 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_EDNSCOOKIES_HH
-#define PDNS_EDNSCOOKIES_HH
-
+#pragma once
 #include "namespaces.hh"
 
 struct EDNSCookiesOpt
@@ -33,4 +31,3 @@ struct EDNSCookiesOpt
 bool getEDNSCookiesOptFromString(const char* option, unsigned int len, EDNSCookiesOpt* eco);
 bool getEDNSCookiesOptFromString(const string& option, EDNSCookiesOpt* eco);
 string makeEDNSCookiesOptString(const EDNSCookiesOpt& eco);
-#endif
index 4c8a330cebc311a879d8eacef6761f476755d722..cbd7b0d0a0209b92014a2c63bdef9d7215f19152 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_EDNSOPTIONS_HH
-#define PDNS_EDNSOPTIONS_HH
-
+#pragma once
 #include "namespaces.hh"
 
 struct EDNSOptionCode
@@ -51,5 +49,3 @@ int getEDNSOptions(const char* optRR, size_t len, EDNSOptionViewMap& options);
 bool getEDNSOptionsFromContent(const std::string& content, std::vector<std::pair<uint16_t, std::string>>& options);
 
 void generateEDNSOption(uint16_t optionCode, const std::string& payload, std::string& res);
-
-#endif
index eb87b488e6fa65daa8af49ae51c7f8845bdb95b3..b0f6e485bf70aa24dbabef4c5cc604e0e8d5c8f2 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_EDNSSUBNET_HH
-#define PDNS_EDNSSUBNET_HH
-
+#pragma once
 #include "namespaces.hh"
 #include "iputils.hh"
 #include "dnsname.hh"
@@ -35,4 +33,3 @@ struct EDNSSubnetOpts
 bool getEDNSSubnetOptsFromString(const string& options, EDNSSubnetOpts* eso);
 bool getEDNSSubnetOptsFromString(const char* options, unsigned int len, EDNSSubnetOpts* eso);
 string makeEDNSSubnetOptsString(const EDNSSubnetOpts& eso);
-#endif
index 8dea90147a1d663a64b0043268f3918282dbe028..a5d3160707be10f77ca4e2aa5aff3d3c0a24db49 100644 (file)
@@ -19,8 +19,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef GSS_CONTEXT_HH
-#define GSS_CONTEXT_HH
 #pragma once
 
 #ifdef ENABLE_GSS_TSIG
@@ -180,5 +178,3 @@ public:
 
 bool gss_add_signature(const DNSName& context, const std::string& message, std::string& mac); //<! Create signature
 bool gss_verify_signature(const DNSName& context, const std::string& message, const std::string& mac); //<! Validate signature
-
-#endif
index 97ef03855f266ea0cfddf5af1f2672fd1ba31474..4795d0469a970145cb436bc95ded4cac24ea06f0 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_IPUTILSHH
-#define PDNS_IPUTILSHH
-
+#pragma once
 #include <string>
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -1404,5 +1402,3 @@ size_t sendMsgWithOptions(int fd, const char* buffer, size_t len, const ComboAdd
 bool isTCPSocketUsable(int sock);
 
 extern template class NetmaskTree<bool>;
-
-#endif
index 68ba53619ecf14ac7ce932b1bb27fabad475ca69..986f91bdaed8c0f22dad20c14d5f7968a461a15d 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef LAZY_ALLOCATOR_HH
-#define LAZY_ALLOCATOR_HH
-
+#pragma once
 #include <cstddef>
 #include <utility>
 #include <type_traits>
@@ -86,5 +84,3 @@ template <typename T> inline
 bool operator!= (lazy_allocator<T> const&, lazy_allocator<T> const&) noexcept {
     return false;
 }
-
-#endif // LAZY_ALLOCATOR_HH
index 895d346e06b46fe1a19019640c24884519acbf36..7e9a11547b57cd2f14b848e567b77b522421ba7c 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef LOCK_HH
-#define LOCK_HH
-
+#pragma once
 #include <pthread.h>
 #include <errno.h>
 #include "misc.hh"
@@ -87,7 +85,6 @@ public:
   WriteLock(const WriteLock& rhs) = delete;
   WriteLock& operator=(const WriteLock& rhs) = delete;
 
-
 };
 
 class TryWriteLock
@@ -217,4 +214,3 @@ public:
   ReadLock(const ReadLock& rhs) = delete;
   ReadLock& operator=(const ReadLock& rhs) = delete;
 };
-#endif
index 510ae9e23def60897d413a776d77ecc38a54d1e4..36a6d714fcd4d7c647c8467f5a9f0bac81897203 100644 (file)
@@ -19,8 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_LWRES_HH
-#define PDNS_LWRES_HH
+#pragma once
 #include <string>
 #include <vector>
 #include <sys/types.h>
@@ -71,4 +70,3 @@ public:
 };
 
 int asyncresolve(const ComboAddress& ip, const DNSName& domain, int type, bool doTCP, bool sendRDQuery, int EDNS0Level, struct timeval* now, boost::optional<Netmask>& srcmask, boost::optional<const ResolveContext&> context, const std::shared_ptr<std::vector<std::unique_ptr<RemoteLogger>>>& outgoingLoggers, const std::shared_ptr<std::vector<std::unique_ptr<FrameStreamLogger>>>& fstrmLoggers, const std::set<uint16_t>& exportTypes, LWResult* res, bool* chained);
-#endif // PDNS_LWRES_HH
index b14a39dc931f6bb4f68a636032d3ba25f28c85ec..a2cd0b75075d80d23c2ba9a6d394cd35e36a1086 100644 (file)
@@ -19,8 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_MPLEXER_HH
-#define PDNS_MPLEXER_HH
+#pragma once
 #include <boost/function.hpp>
 #include <boost/any.hpp>
 #include <boost/shared_array.hpp>
@@ -237,7 +236,3 @@ protected:
     }
   }
 };
-
-
-#endif
-
index 0365e756a2690c25ba9141ba7960bc866f532872..bff0eca0ff1c5f77e88b1e4a2a8f1a0cf1214c67 100644 (file)
@@ -19,8 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef MTASKER_HH
-#define MTASKER_HH
+#pragma once
 #include <stdint.h>
 #include <queue>
 #include <vector>
@@ -136,6 +135,3 @@ private:
   EventKey d_eventkey;   // for waitEvent, contains exact key it was awoken for
 };
 #include "mtasker.cc"
-
-#endif // MTASKER_HH
-
index 2e35fed3297e85dbcaaaeb7d631247c5e8d441b7..3c1a95b143685196779eedc4ef0b5755bcdf7227 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef MTASKER_CONTEXT_HH
-#define MTASKER_CONTEXT_HH
-
+#pragma once
 #include "lazy_allocator.hh"
 #include <boost/function.hpp>
 #include <vector>
@@ -85,6 +83,3 @@ static inline void notifyStackSwitchDone()
 #endif /* HAVE_SANITIZER_FINISH_SWITCH_FIBER_SINGLE_PTR */
 #endif /* HAVE_FIBER_SANITIZER */
 }
-
-
-#endif // MTASKER_CONTEXT_HH
index d592345ade023ba9b236b762d985c638c2b77cf9..521d5387517b0303ae71ff467bcaf72a64834bbc 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef NAMESERVER_HH
-#define NAMESERVER_HH
-
+#pragma once
 #include <poll.h>
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -104,5 +102,3 @@ private:
 bool AddressIsUs(const ComboAddress& remote);
 
 extern ResponseStats g_rs;
-
-#endif
index 565b67d9b19c6291dfc697dd955e3d10b101a658..64ecaac4a87b9b88f3136b051ca85e25165c2cfe 100644 (file)
@@ -19,8 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_NAMESPACES_HH
-#define PDNS_NAMESPACES_HH
+#pragma once
 #include <boost/tuple/tuple.hpp>
 #include <boost/shared_array.hpp>
 #include <boost/scoped_array.hpp>
@@ -77,5 +76,3 @@ using boost::trim_right_copy_if;
 using boost::equals;
 using boost::ends_with;
 using boost::iends_with;
-
-#endif
index 7b2f1a8b38b6551b08a6179944450704d6ff4ed8..7dd0c8828e5f03a3b34414a25ae966e391c74dd5 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PACKETCACHE_HH
-#define PACKETCACHE_HH
-
+#pragma once
 #include "ednsoptions.hh"
 #include "misc.hh"
 #include "iputils.hh"
@@ -148,5 +146,3 @@ public:
   }
 
 };
-
-#endif /* PACKETCACHE_HH */
index 2b9cd6144a3b2309dcc9db2ad4b16a1b9802fdb2..48cdfbabdad8adafa95bdcadb01b0ac0342c2070 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PACKETHANDLER_HH
-#define PACKETHANDLER_HH
-
+#pragma once
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
@@ -118,4 +116,3 @@ private:
 };
 
 std::shared_ptr<DNSRecordContent> makeSOAContent(const SOAData& sd);
-#endif /* PACKETHANDLER */
index f820f551599fb65f0b4339d9307ae4e7ad9fd32c..67fce0adcec62839f2b48c05215b39aacc2fd7fa 100644 (file)
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNSEXCEPTION_HH
-#define PDNSEXCEPTION_HH
-/* (C) 2002 POWERDNS.COM BV */
-
+#pragma once
 #include<string>
 
 #include "namespaces.hh"
@@ -43,5 +40,3 @@ public:
   TimeoutException() : PDNSException() {}
   TimeoutException(string r) : PDNSException(r) {}
 };
-
-#endif
index 094eddf81fc7a37385ddabbb80508b1b35e0b733..ae3648b4d0102e5d89e9fd56c226179aa1465099 100644 (file)
@@ -19,8 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_PKCS11SIGNERS_HH
-#define PDNS_PKCS11SIGNERS_HH
+#pragma once
 
 class PKCS11DNSCryptoKeyEngine : public DNSCryptoKeyEngine
 {
@@ -67,5 +66,3 @@ class PKCS11DNSCryptoKeyEngine : public DNSCryptoKeyEngine
 };
 
 bool PKCS11ModuleSlotLogin(const std::string& module, const string& tokenId, const std::string& pin);
-
-#endif /* PDNS_PKCS11SIGNERS_HH */
index d94238f13243dfba38b8d20af459e0561e2a29d0..03b6c8a5c78d89dfb652f7ad39e0147f98e6d0ba 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef QTYPE_HH
-#define QTYPE_HH
-// $Id$
+#pragma once
 #include <string>
 #include <vector>
 #include "namespaces.hh"
@@ -237,4 +235,3 @@ struct QClass
 {
   enum QClassEnum {IN=1, CHAOS=3, NONE=254, ANY=255};
 };
-#endif
index 6553ffac1e53b99b3dadbec56f108f28b42437e6..d17c750b47e8ab9495d032d5e8afca2947b64762 100644 (file)
@@ -19,8 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_RCPGENERATOR_HH
-#define PDNS_RCPGENERATOR_HH
+#pragma once
 #include <inttypes.h>
 #include <string>
 #include <stdexcept>
@@ -106,4 +105,3 @@ private:
   string& d_string;
   bool d_nodot;
 };
-#endif
index 3ccc73fb1380508eda86422767ea067c11f5329d..c803fa549539654c9ba44f2443ef5549479cd2e7 100644 (file)
@@ -1,6 +1,24 @@
-#ifndef REC_SNMP_HH
-#define REC_SNMP_HH
-
+/*
+ * This file is part of PowerDNS or dnsdist.
+ * Copyright -- PowerDNS.COM B.V. and its contributors
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * In addition, for the avoidance of any doubt, permission is granted to
+ * link this program with OpenSSL and to (re)distribute the binaries
+ * produced as the result of such linking.
+ *
+ * This program 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
 #pragma once
 
 #include "snmp-agent.hh"
@@ -15,5 +33,3 @@ public:
 };
 
 extern std::shared_ptr<RecursorSNMPAgent> g_snmpAgent;
-
-#endif /* REC_SNMP_HH */
index c1930cddfa2f4248f51ecadd6a7ec6619af30110..790d714fb879af7fb9d2e7815f76af956cd6c41f 100644 (file)
@@ -19,8 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_RECPACKETCACHE_HH
-#define PDNS_RECPACKETCACHE_HH
+#pragma once
 #include <string>
 #include <inttypes.h>
 #include "dns.hh"
@@ -118,5 +117,3 @@ public:
   {
   }
 };
-
-#endif
index 00348c4b5744fddac03339d18a122c6a37435a27..21c6991e8913059f7152ad594e03f1d125df003d 100644 (file)
@@ -19,8 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef RECURSOR_CACHE_HH
-#define RECURSOR_CACHE_HH
+#pragma once
 #include <string>
 #include <set>
 #include "dns.hh"
@@ -219,4 +218,3 @@ public:
     }
   }
 };
-#endif
index 979c32ce2358d406784336ecaef10256a5bcadc4..17b4b7ccdd4fc876b879ef09243b78ace0f1c46f 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_RESOLVER_HH
-#define PDNS_RESOLVER_HH
-
+#pragma once
 #include <string>
 #include <vector>
 #include <sys/types.h>
@@ -106,6 +104,3 @@ class AXFRRetriever : public boost::noncopyable
     size_t d_maxReceivedBytes;
     TSIGRecordContent d_trc;
 };
-
-
-#endif /* PDNS_RESOLVER_HH */
index 04f4422919e0e3122c4e6673054fc95698252b48..5aaa20b790e2bb139ba5ce59c68b07196971acb8 100644 (file)
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_SECPOLL_AUTH_HH
-#define PDNS_SECPOLL_AUTH_HH
+#pragma once
 #include <time.h>
 #include "namespaces.hh"
 #include "stubresolver.hh"
 
 void doSecPoll(bool first);
 extern std::string g_security_message;
-
-#endif
index 36cd731de64bfdb62991cdc49559352d867d40f6..e4790d1208fba74f59082b9783dcc9e3d06332dc 100644 (file)
@@ -19,8 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_SECPOLL_RECURSOR_HH
-#define PDNS_SECPOLL_RECURSOR_HH
+#pragma once
 #include <time.h>
 #include "namespaces.hh"
 #include <stdint.h>
@@ -28,5 +27,3 @@
 void doSecPoll(time_t* );
 extern uint32_t g_security_status;
 extern std::string g_security_message;
-
-#endif
index 19363ced715ef407f0f5249ff316d692d6fec6fa..06bace9ab7b10068f421c339b8f75604169c2b11 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef _SHA_HH
-#define _SHA_HH
-
+#pragma once
 #include <string>
 #include <stdint.h>
 #include <openssl/sha.h>
@@ -53,5 +51,3 @@ inline std::string pdns_sha512sum(const std::string& input)
   SHA512(reinterpret_cast<const unsigned char*>(input.c_str()), input.length(), result);
   return std::string(result, result + sizeof result);
 }
-
-#endif /* sha.hh */
index e776031049b7a5c57ee203a51a21b4d360b0a3fc..301e2f4ebe74d51562cb460ffd750eb66a5b0885 100644 (file)
@@ -19,8 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_SIGNINGPIPE
-#define PDNS_SIGNINGPIPE
+#pragma once
 #include <stdio.h>
 #include <thread>
 #include <vector>
@@ -80,5 +79,3 @@ private:
   bool d_mustSign;
   bool d_final;
 };
-
-#endif
index 5d693bb6bc100a8500e7d9a60fda68ac750b3f7d..c304aad47c3c4b1dfd673e4c0bc16ae5fa71863d 100644 (file)
@@ -1,6 +1,4 @@
-#ifndef SNMP_AGENT_HH
-#define SNMP_AGENT_HH
-
+#pragma once
 #include "config.h"
 
 #include <string>
@@ -62,5 +60,3 @@ private:
 
   std::thread d_thread;
 };
-
-#endif /* SNMP_AGENT_HH */
index 5768337b20396bb3224d34ab75c7d52b5de5871c..06bdf56d5eea8449cbfff31fbd71064830d28282 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef SSQLITE3_HH
-#define SSQLITE3_HH
-
+#pragma once
 #include <sqlite3.h>
 #include "pdns/backends/gsql/ssql.hh"
 
@@ -57,6 +55,3 @@ public:
   //! Used to create an backend specific exception message.
   SSqlException sPerrorException( const std::string & reason ) override;
 };
-
-#endif // SSQLITE3_HH
-
index cb75335509cd30d240cb19e6b77affc3cbb428cc..7f61a4f8b18b863d3f8a44a9daaf9fe21216cba2 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef SSTUFF_HH
-#define SSTUFF_HH
-
+#pragma once
 #include <string>
 #include <sstream>
 #include <iostream>
@@ -360,6 +358,3 @@ private:
   std::string d_buffer;
   int d_socket;
 };
-
-
-#endif
index 4d8bd3a308be73a0648935b9cb5775ffd01143fe..0ee875917c22a4ba982c003e4b2769cf2956cdae 100644 (file)
@@ -19,8 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef STATBAG_HH
-#define STATBAG_HH
+#pragma once
 #include <pthread.h>
 #include <map>
 #include <mutex>
@@ -33,7 +32,6 @@
 #include "circular_buffer.hh"
 
 
-
 template<typename T, typename Comp=std::less<T> >
 class StatRing
 {
@@ -156,6 +154,3 @@ inline void StatBag::inc(const string &key)
 {
   deposit(key,1);
 }
-
-
-#endif /* STATBAG_HH */
index 87c7d0f71b09eab6fac984c0371db769205aedde..cafe7943312eab80c44ac3138220526dbf09fed7 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_TCPRECEIVER_HH
-#define PDNS_TCPRECEIVER_HH
-
+#pragma once
 #include "dns.hh"
 #include "iputils.hh"
 #include "dnsbackend.hh"
@@ -76,5 +74,3 @@ private:
   vector<int>d_sockets;
   vector<struct pollfd> d_prfds;
 };
-
-#endif /* PDNS_TCPRECEIVER_HH */
index 062645d4442a62582c2507ef73a86c05b0bb00d5..131cf1d184e33d2e3266f274a5d1950683ea4975 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef UEBERBACKEND_HH
-#define UEBERBACKEND_HH
-
+#pragma once
 #include <vector>
 #include <map>
 #include <string>
@@ -165,5 +163,3 @@ private:
   void addCache(const Question &q, const vector<DNSZoneRecord> &rrs);
   
 };
-
-#endif
index 081de34aa850270cb5ead0507f39d2b5470607b3..d94f299cb9eb0712c6385f1ae1a901e96a4a0bef 100644 (file)
@@ -20,9 +20,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 // Utility class specification.
-
-#ifndef UTILITY_HH
-#define UTILITY_HH
+#pragma once
 
 #ifdef NEED_POSIX_TYPEDEF
 typedef unsigned char uint8_t;
@@ -144,6 +142,3 @@ public:
   static time_t timegm(struct tm *tm);
   
 };
-
-
-#endif // UTILITY_HH
index a5f839c8f95a02e9c3a9c7f33f2e7f3668afa10b..66944da9153a509bd97fc60bfb45d8a40820fe39 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef VERSION_HH
-#define VERSION_HH
-
+#pragma once
 #include "namespaces.hh"
 
 enum ProductType { ProductAuthoritative, ProductRecursor };
@@ -35,5 +33,3 @@ string productName();
 string productTypeApiType();
 void versionSetProduct(ProductType pt);
 ProductType versionGetProduct();
-
-#endif //!VERSION_HH
index aa62b73f2fcfdadb2227e27e73d4052479a87724..ea98581c93f26e1d0b521a3510ce3e05d81a64d3 100644 (file)
@@ -19,8 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef WEBSERVER_HH
-#define WEBSERVER_HH
+#pragma once
 #include <map>
 #include <string>
 #include <list>
@@ -242,5 +241,3 @@ protected:
   // Describes the amount of logging the webserver does
   WebServer::LogLevel d_loglevel{WebServer::LogLevel::Detailed};
 };
-
-#endif /* WEBSERVER_HH */
index e280a20abed8f8645a14a25a65296acd80ea9201..d242110afda80747b92b76298696513cdbe9eb15 100644 (file)
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-
-#ifndef PDNS_WSAPI_HH
-#define PDNS_WSAPI_HH
-
+#pragma once
 #include <map>
 #include "webserver.hh"
 
@@ -42,5 +39,3 @@ DNSName apiNameToDNSName(const string& name);
 // To be provided by product code.
 void productServerStatisticsFetch(std::map<string,string>& out);
 boost::optional<uint64_t> productServerStatisticsFetch(const std::string& name);
-
-#endif /* PDNS_WSAPI_HH */
index e42ec43baaa40b6effa4d1fa9f461d7587c68f13..b613174f6216a9fbfdab7450e656515eeb80e43b 100644 (file)
@@ -19,8 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef WS_HH
-#define WS_HH
+#pragma once
 #include <string>
 #include <map>
 #include <time.h>
@@ -97,5 +96,3 @@ private:
   Ewma d_qcachehits, d_qcachemisses;
   WebServer *d_ws{nullptr};
 };
-
-#endif
index ae8e47568a4d3d77dbbcfdbaaf468837040f9fcd..897316b647274f0df6f8f399654f314409cb8651 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_WSRECURSOR_HH
-#define PDNS_WSRECURSOR_HH
-
+#pragma once
 #include <boost/utility.hpp> 
 #include "namespaces.hh"
 #include "mplexer.hh"
@@ -71,5 +69,3 @@ public:
 private:
   std::unique_ptr<AsyncWebServer> d_ws{nullptr};
 };
-
-#endif /* PDNS_WSRECURSOR_HH */
index 437eb14a36e8d4de828aa0c8aba9ab8aa81fc4a8..8cb2788a22532b7884efe08c7fb5528f28173c35 100644 (file)
@@ -19,8 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_ZONEPARSER_TNG
-#define PDNS_ZONEPARSER_TNG
+#pragma once
 #include <string>
 #include <cstdio>
 #include <stdexcept>
@@ -78,5 +77,3 @@ private:
   bool d_fromfile;
   bool d_generateEnabled{true};
 };
-
-#endif