]> granicus.if.org Git - pdns/commitdiff
work around gcc 4.0 bug, prepare move to boost::function based select/epoll/kqueue...
authorBert Hubert <bert.hubert@netherlabs.nl>
Sat, 15 Apr 2006 22:19:33 +0000 (22:19 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Sat, 15 Apr 2006 22:19:33 +0000 (22:19 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@705 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/dnspbench.cc
pdns/mtasker.hh
pdns/pdns_recursor.cc
pdns/qtype.hh
pdns/rec_channel.hh

index b81030602f22177b8045946ebf00d9d914f646cc..578455d475e1e37c0e67c582d2b03549b413a1bf 100644 (file)
@@ -46,7 +46,7 @@ try
 
   Socket s(InterNetwork, Datagram);
   
-  IPEndpoint rem("10.0.1.6",35515), loc("213.156.2.1", 53);
+  IPEndpoint rem("10.0.1.6", atoi(argv[1])), loc("213.156.2.1", 53);
   s.bind(loc);
 
   vector<uint8_t> vpacket;
index ba358b2f3ed698e4c8e06aeba2f2407edbdbcedc..e02953f0f66633f8ca83324725e4d7476a3faab6 100644 (file)
@@ -58,7 +58,7 @@ private:
   size_t d_stacksize;
 
   EventVal d_waitval;
-  enum {Error=-1,TimeOut=0,Answer} d_waitstatus;
+  enum waitstatusenum {Error=-1,TimeOut=0,Answer} d_waitstatus;
 
 public:
   struct Waiter
index 8added8a628e388776d7f7954898a1841b696f6f..70e15d2a774bf2999c825ee41c73b0b63fd2c90d 100644 (file)
@@ -41,6 +41,7 @@
 #include <boost/tuple/tuple_comparison.hpp>
 #include <boost/shared_array.hpp>
 #include <boost/lexical_cast.hpp>
+#include <boost/function.hpp>
 #include "dnsparser.hh"
 #include "dnswriter.hh"
 #include "dnsrecords.hh"
@@ -397,7 +398,7 @@ map<uint32_t, uint32_t> g_tcpClientCounts;
 struct TCPConnection
 {
   int fd;
-  enum {BYTE0, BYTE1, GETQUESTION, DONE} state;
+  enum stateenum {BYTE0, BYTE1, GETQUESTION, DONE} state;
   int qlen;
   int bytesread;
   struct sockaddr_in remote;
index e7058179467e0c1ab286386a95210e8e8a35a59b..ee9eec502c01c5bd84dbaa3c617e9b0ac7b186d3 100644 (file)
@@ -72,7 +72,7 @@ public:
 
   static int chartocode(const char *p); //!< convert a character string to a code
   
-  enum {A=1,NS=2,CNAME=5,SOA=6,PTR=12,HINFO=13,MX=15,TXT=16,RP=17,AAAA=28,LOC=29,SRV=33,NAPTR=35, SPF=99, AXFR=252, IXFR=254, ANY=255} types;
+  enum typeenum {A=1,NS=2,CNAME=5,SOA=6,PTR=12,HINFO=13,MX=15,TXT=16,RP=17,AAAA=28,LOC=29,SRV=33,NAPTR=35, SPF=99, AXFR=252, IXFR=254, ANY=255} types;
 private:
   short int code;
   typedef pair<string,int> namenum; 
index 525dcd6865c2707ad241c4ad14b7969c70dd6b1e..67a3ebf2dfb5ba5a3dfbd7ea2b8808d0003da06e 100644 (file)
@@ -24,7 +24,6 @@ public:
       unlink(d_local.sun_path);
   }
 
-
   int listen(const std::string& filename);
   void connect(const std::string& path, const std::string& filename);