]> granicus.if.org Git - pdns/commitdiff
Cleanup or remove preprocessor directives for specific GCC versions #5158
authorMatus Kysel <mkysel@sygic.com>
Fri, 6 Oct 2017 11:11:07 +0000 (13:11 +0200)
committerMatus Kysel <mkysel@sygic.com>
Fri, 6 Oct 2017 11:11:07 +0000 (13:11 +0200)
pdns/dnspacket.hh
pdns/receiver.cc
pdns/syncres.hh
pdns/test-dns_random_hh.cc
pdns/zone2json.cc
pdns/zone2ldap.cc
pdns/zone2sql.cc

index 7fb90f3cf07292cd406ae6b332a12409300c3625..5a717e307f217d31b3d86f674aef27f26c08c779 100644 (file)
  */
 #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 <cstdio>
index aa2d439509d18771f2507b5fd493081ea8ce3346..e51d57a334eb832ee2fea1dc723b3d9d835a4455 100644 (file)
@@ -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 {
index 5e7f20a1a8ac65b2654fc55872a432eddba63e33..bbce7ee6a64dd13829547367a41de8ec21091481 100644 (file)
@@ -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<SComboAddress> addrringbuf_t;
-#else
 typedef boost::circular_buffer<ComboAddress> addrringbuf_t;
-#endif
 extern thread_local std::unique_ptr<addrringbuf_t> t_servfailremotes, t_largeanswerremotes, t_remotes;
 
 extern thread_local std::unique_ptr<boost::circular_buffer<pair<DNSName,uint16_t> > > t_queryring, t_servfailqueryring;
index 1dda1ade7d26f34384912f5f9174c8414de3603a..dfa77ef20f37105f9e6b23357c27cb4b9188e970 100644 (file)
@@ -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"
index 111e071b7f4a64f441f01bb963f4364618467df3..8a01a211544c1926de990ca038fd86ec42daca7f 100644 (file)
@@ -96,9 +96,7 @@ try
   vector<string> 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";
index c94e444484590e587c5cddfaae46d19e014199da..2ccf4c473190dce23f587e87f353afa156dba26a 100644 (file)
@@ -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" );
index b54c6aab0906a0a66503ccdce284e63bd31d8ea6..7fa9eadb76dadb0ed724901fe274e6aedc3084a9 100644 (file)
@@ -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";