]> granicus.if.org Git - pdns/commitdiff
Fix a few warnings which show up with -Wundef
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Thu, 25 Dec 2014 13:24:47 +0000 (14:24 +0100)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Mon, 9 Feb 2015 14:50:05 +0000 (15:50 +0100)
Also remove DARWIN, since OS X doesn't define that

pdns/dns.hh
pdns/unix_semaphore.cc
pdns/utility.hh

index 711ef1c219914893003f5297c7c120f8841d827c..63f65c7f9971d46f9720639661f7f78753ee1029 100644 (file)
@@ -144,7 +144,7 @@ struct EDNS0Record
         uint16_t Z; 
 } GCCPACKATTRIBUTE;
 
-#if __FreeBSD__ || __APPLE__ || __OpenBSD__ || __DragonFly__ || defined(__FreeBSD_kernel__)
+#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
 #include <machine/endian.h>
 #elif __linux__ || __GNU__
 # include <endian.h>
index 50a350ebd8ba7934e0af5822a5fd18737f89c13c..7064bc98dc3963d952533aabc2290dc85a35e3ae 100644 (file)
@@ -34,7 +34,7 @@
 #include <sys/types.h>
 
 
-#if DARWIN || _AIX || __APPLE__ 
+#if defined(_AIX) || defined(__APPLE__)
 
 // Darwin 6.0 Compatible implementation, uses pthreads so it portable across more platforms.
 
index 870ee2f3d36387210bf058ad1d0abf9a78bab7fa..6280279c8bf84c2a2feb44386e8410fee2d7e124 100644 (file)
@@ -52,7 +52,7 @@ class Semaphore
 private:
   typedef int sem_value_t;
 
-#if DARWIN || _AIX || __APPLE__
+#if defined(_AIX) || defined(__APPLE__)
   uint32_t       m_magic;
   pthread_mutex_t m_lock;
   pthread_cond_t  m_gtzero;