From: Matus Kysel Date: Fri, 6 Oct 2017 11:11:07 +0000 (+0200) Subject: Cleanup or remove preprocessor directives for specific GCC versions #5158 X-Git-Tag: rec-4.1.0-rc2~53^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=226bcf893054f597e40039b42aebcb0d37f8dc89;p=thirdparty%2Fpdns.git Cleanup or remove preprocessor directives for specific GCC versions #5158 --- diff --git a/pdns/dnspacket.hh b/pdns/dnspacket.hh index 7fb90f3cf0..5a717e307f 100644 --- a/pdns/dnspacket.hh +++ b/pdns/dnspacket.hh @@ -21,14 +21,6 @@ */ #ifndef DNSPACKET_HH -#if __GNUC__ == 2 -#if __GNUC_MINOR__ < 95 - #error Your compiler is too old! Try g++ 3.3 or higher -#else - #warning There are known problems with PowerDNS binaries compiled by gcc version 2.95 and 2.96! -#endif -#endif - #define DNSPACKET_HH #include diff --git a/pdns/receiver.cc b/pdns/receiver.cc index aa2d439509..e51d57a334 100644 --- a/pdns/receiver.cc +++ b/pdns/receiver.cc @@ -430,9 +430,7 @@ int main(int argc, char **argv) signal(SIGILL,tbhandler); #endif -#if __GNUC__ >= 3 std::ios_base::sync_with_stdio(false); -#endif L.toConsole(Logger::Warning); try { diff --git a/pdns/syncres.hh b/pdns/syncres.hh index 5e7f20a1a8..bbce7ee6a6 100644 --- a/pdns/syncres.hh +++ b/pdns/syncres.hh @@ -935,11 +935,7 @@ public: string reason; //! Print this to tell the user what went wrong }; -#if (__GNUC__ == 4 && __GNUC_MINOR__ == 2) -typedef boost::circular_buffer addrringbuf_t; -#else typedef boost::circular_buffer addrringbuf_t; -#endif extern thread_local std::unique_ptr t_servfailremotes, t_largeanswerremotes, t_remotes; extern thread_local std::unique_ptr > > t_queryring, t_servfailqueryring; diff --git a/pdns/test-dns_random_hh.cc b/pdns/test-dns_random_hh.cc index 1dda1ade7d..dfa77ef20f 100644 --- a/pdns/test-dns_random_hh.cc +++ b/pdns/test-dns_random_hh.cc @@ -2,7 +2,7 @@ #define BOOST_TEST_NO_MAIN // Disable this code for gcc 4.8 and lower -#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ > 8) || !__GNUC__ +#if (__GNUC__ == 4 && __GNUC_MINOR__ > 8) || !__GNUC__ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/pdns/zone2json.cc b/pdns/zone2json.cc index 111e071b7f..8a01a21154 100644 --- a/pdns/zone2json.cc +++ b/pdns/zone2json.cc @@ -96,9 +96,7 @@ try vector lines; reportAllTypes(); -#if __GNUC__ >= 3 std::ios_base::sync_with_stdio(false); -#endif ::arg().setSwitch("verbose","Verbose comments on operation")="no"; ::arg().setSwitch("on-error-resume-next","Continue after errors")="no"; diff --git a/pdns/zone2ldap.cc b/pdns/zone2ldap.cc index c94e444484..2ccf4c4731 100644 --- a/pdns/zone2ldap.cc +++ b/pdns/zone2ldap.cc @@ -150,9 +150,7 @@ int main( int argc, char* argv[] ) try { -#if __GNUC__ >= 3 std::ios_base::sync_with_stdio( false ); -#endif reportAllTypes(); args.setCmd( "help", "Provide a helpful message" ); args.setCmd( "version", "Print the version" ); diff --git a/pdns/zone2sql.cc b/pdns/zone2sql.cc index b54c6aab09..7fa9eadb76 100644 --- a/pdns/zone2sql.cc +++ b/pdns/zone2sql.cc @@ -267,10 +267,8 @@ int main(int argc, char **argv) try { reportAllTypes(); -#if __GNUC__ >= 3 std::ios_base::sync_with_stdio(false); -#endif - + ::arg().setSwitch("gpgsql","Output in format suitable for default gpgsqlbackend")="no"; ::arg().setSwitch("gmysql","Output in format suitable for default gmysqlbackend")="no"; ::arg().setSwitch("mydns","Output in format suitable for default mydnsbackend")="no";