]> granicus.if.org Git - pdns/commitdiff
compilation fixes for on 'Karmic Koala' - also first commit from the new server ...
authorBert Hubert <bert.hubert@netherlabs.nl>
Sat, 24 Oct 2009 10:40:48 +0000 (10:40 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Sat, 24 Oct 2009 10:40:48 +0000 (10:40 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1440 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/base64.cc
pdns/htimer.hh
pdns/lock.hh
pdns/rcpgenerator.hh
pdns/rec_channel.hh

index 6b8a97f666d3b091c7630313ca11a5107f2269a1..92c61dd94bd4877d1240438924d15670f600a036 100644 (file)
@@ -1,5 +1,5 @@
 #include "base64.hh"
-
+#include <inttypes.h>
 
 namespace anonpdns {
 char B64Decode1(char cInChar)
index fd6c53540be545e300522f57aee4b2a067ba7815..e45395e09abd8d7bca2a4978e8d5231513673e03 100644 (file)
@@ -1,6 +1,6 @@
 #ifndef PDNS_HTIMER_HH
 #define PDNS_HTIMER_HH
-
+#include <stdint.h>
 #include <boost/shared_ptr.hpp>
 #include <boost/utility.hpp>
 #include <map>
index 59e262b154b0bb588785a7a149822441517a7c4e..b98b69e7f0b289ea5ffec6f1f9d3cea1bb350b0c 100644 (file)
@@ -78,8 +78,10 @@ public:
 
   TryWriteLock(pthread_rwlock_t *lock) : d_lock(lock)
   {
-    if(g_singleThreaded)
+    if(g_singleThreaded) {
+      d_havelock=true;
       return;
+    }
 
     d_havelock=false;
     if((errno=pthread_rwlock_trywrlock(d_lock)) && errno!=EBUSY)
@@ -111,10 +113,11 @@ public:
 
   TryReadLock(pthread_rwlock_t *lock) : d_lock(lock)
   {
-    if(g_singleThreaded)
+    if(g_singleThreaded) {
+      d_havelock=true;
       return;
+    }
 
-    d_havelock=false;
     if((errno=pthread_rwlock_tryrdlock(d_lock)) && errno!=EBUSY)
       throw AhuException("error acquiring rwlock tryrdlock: "+stringerror());
     d_havelock=(errno==0);
index 32d3efcf6738cd76c4b4a5bd48985df098cd703e..403e9c85833933616a6d5da90a50a71b1c474ddf 100644 (file)
@@ -1,6 +1,6 @@
 /*
     PowerDNS Versatile Database Driven Nameserver
-    Copyright (C) 2005  PowerDNS.COM BV
+    Copyright (C) 2005 - 2009  PowerDNS.COM BV
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License version 2 as 
@@ -19,7 +19,7 @@
 
 #ifndef PDNS_RCPGENERATOR_HH
 #define PDNS_RCPGENERATOR_HH
-
+#include <inttypes.h>
 #include <string>
 #include <stdexcept>
 #if !defined SOLARIS8 && !defined WIN32
index e2f3b03a97308fd200906c927a5b6bebdbc1ec25..697a119d8ee859cfa5e1f2c30fc361001455636c 100644 (file)
@@ -2,6 +2,7 @@
 #define PDNS_REC_CHANNEL
 #include <string>
 #include <map>
+#include <inttypes.h>
 #if !defined SOLARIS8 && !defined WIN32
 
 #elif defined WIN32