Skip to content

Commit

Permalink
Replace include guard ifdef/define with pragma once
Browse files Browse the repository at this point in the history
  • Loading branch information
zeha committed Feb 13, 2020
1 parent 0673455 commit e8c59f2
Show file tree
Hide file tree
Showing 85 changed files with 143 additions and 399 deletions.
7 changes: 1 addition & 6 deletions modules/bindbackend/bindbackend2.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +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_BINDBACKEND_HH
#define PDNS_BINDBACKEND_HH

#pragma once
#include <string>
#include <map>
#include <set>
Expand Down Expand Up @@ -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 */
6 changes: 1 addition & 5 deletions modules/geoipbackend/geoipbackend.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -79,5 +77,3 @@ private:
vector<DNSResourceRecord> d_result;
vector<GeoIPInterface> d_files;
};

#endif /* PDNS_GEOIPBACKEND_HH */
6 changes: 1 addition & 5 deletions modules/geoipbackend/geoipinterface.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
6 changes: 1 addition & 5 deletions modules/gmysqlbackend/gmysqlbackend.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -37,5 +35,3 @@ public:
protected:
void reconnect() override;
};

#endif /* PDNS_GMYSQLBACKEND_HH */
6 changes: 1 addition & 5 deletions modules/gmysqlbackend/smysql.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -65,5 +63,3 @@ private:
bool d_threadCleanup;
bool d_clientSSL;
};

#endif /* SSMYSQL_HH */
2 changes: 1 addition & 1 deletion modules/godbcbackend/godbcbackend.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -29,4 +30,3 @@ public:
gODBCBackend( const std::string & mode, const std::string & suffix );

};

7 changes: 1 addition & 6 deletions modules/godbcbackend/sodbc.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down Expand Up @@ -75,6 +73,3 @@ public:
SSqlException sPerrorException( const std::string & reason ) override;

};


#endif // SODBC_HH
6 changes: 1 addition & 5 deletions modules/gpgsqlbackend/gpgsqlbackend.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -38,5 +36,3 @@ protected:
void reconnect() override;
bool inTransaction() override;
};

#endif /* PDNS_GPGSQLBACKEND_HH */
5 changes: 1 addition & 4 deletions modules/gpgsqlbackend/spgsql.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -56,5 +55,3 @@ private:
static bool s_dolog;
bool d_in_trx;
};

#endif /* SPGSQL_HH */
6 changes: 1 addition & 5 deletions modules/gsqlite3backend/gsqlite3backend.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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
5 changes: 0 additions & 5 deletions modules/lua2backend/lua2api2.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -418,5 +415,3 @@ private:

deinit_call_t f_deinit;
};

#endif
5 changes: 0 additions & 5 deletions modules/lua2backend/lua2backend.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
* 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
5 changes: 1 addition & 4 deletions modules/pipebackend/coprocess.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -72,4 +70,3 @@ private:
FILE *d_fp;
};
bool isUnixSocket(const string& fname);
#endif
9 changes: 1 addition & 8 deletions modules/pipebackend/pipebackend.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,11 @@
* 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"

Expand Down Expand Up @@ -70,7 +67,3 @@ private:
bool d_disavow;
int d_abiVersion;
};


#endif

4 changes: 1 addition & 3 deletions modules/remotebackend/remotebackend.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down Expand Up @@ -228,4 +227,3 @@ class RemoteBackend : public DNSBackend

void parseDomainInfo(const json11::Json &obj, DomainInfo &di);
};
#endif
6 changes: 1 addition & 5 deletions modules/tinydnsbackend/tinydnsbackend.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
6 changes: 1 addition & 5 deletions pdns/anadns.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -83,6 +82,3 @@ inline ostream& operator<<(ostream &s, const QuestionIdentifier& qi)
s<<" to " << qi.d_dest.toStringWithPort();
return s;
}


#endif
6 changes: 1 addition & 5 deletions pdns/arguments.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -129,5 +127,3 @@ private:
};

extern ArgvMap &arg();

#endif /* ARGUMENTS_HH */
6 changes: 1 addition & 5 deletions pdns/auth-caches.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand All @@ -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 */
6 changes: 1 addition & 5 deletions pdns/auth-packetcache.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -148,5 +146,3 @@ private:

static const unsigned int s_mincleaninterval=1000, s_maxcleaninterval=300000;
};

#endif /* AUTH_PACKETCACHE_HH */
6 changes: 1 addition & 5 deletions pdns/auth-querycache.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -129,5 +127,3 @@ private:

static const unsigned int s_mincleaninterval=1000, s_maxcleaninterval=300000;
};

#endif /* AUTH_QUERYCACHE_HH */
6 changes: 1 addition & 5 deletions pdns/backends/gsql/gsqlbackend.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -411,5 +409,3 @@ protected:
bool d_dnssecQueries;
bool d_inTransaction{false};
};

#endif /* PDNS_GSQLBACKEND_HH */
6 changes: 1 addition & 5 deletions pdns/backends/gsql/ssql.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -88,5 +86,3 @@ public:
virtual void reconnect() {};
virtual ~SSql(){};
};

#endif /* SSQL_HH */
5 changes: 1 addition & 4 deletions pdns/base32.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@
* 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
Loading

0 comments on commit e8c59f2

Please sign in to comment.