Instead of including config.h from header files, check whether PACKAGE is defined...
authorLennart Poettering <lennart@poettering.net>
Tue, 11 Sep 2007 00:30:53 +0000 (00:30 +0000)
committerLennart Poettering <lennart@poettering.net>
Tue, 11 Sep 2007 00:30:53 +0000 (00:30 +0000)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1799 fefdeb5f-60dc-0310-8127-8f9354f1896f

src/pulsecore/atomic.h
src/pulsecore/creds.h
src/pulsecore/endianmacros.h
src/pulsecore/macro.h
src/pulsecore/thread.h

index 0e3bfb9..25d600c 100644 (file)
@@ -37,9 +37,8 @@
  * libatomic_ops
  */
 
-/* We have to include config.h here (for the __sync stuff), which sucks */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
+#ifndef PACKAGE
+#error "Please include config.h before including this file!"
 #endif
 
 #ifdef HAVE_ATOMIC_BUILTINS
index e0a025b..51dfc33 100644 (file)
@@ -26,7 +26,9 @@
 
 #include <sys/types.h>
 
-/* config.h must be included before this file */
+#ifndef PACKAGE
+#error "Please include config.h before including this file!"
+#endif
 
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
index c0c3a6d..a29699b 100644 (file)
@@ -27,8 +27,8 @@
 
 #include <inttypes.h>
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
+#ifndef PACKAGE
+#error "Please include config.h before including this file!"
 #endif
 
 #define INT16_SWAP(x) ( (int16_t) ( ((uint16_t) x >> 8) | ((uint16_t) x << 8) ) )
index 53e52fd..c1bdb14 100644 (file)
 
 #include <pulsecore/log.h>
 
+#ifndef PACKAGE
+#error "Please include config.h before including this file!"
+#endif
+
 #if defined(PAGE_SIZE)
 #define PA_PAGE_SIZE ((size_t) PAGE_SIZE)
 #elif defined(PAGESIZE)
index a0e331b..4e5425d 100644 (file)
@@ -28,9 +28,8 @@
 #include <pulse/def.h>
 #include <pulsecore/once.h>
 
-/* We have to include config.h here (for the __tls stuff), which sucks */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
+#ifndef PACKAGE
+#error "Please include config.h before including this file!"
 #endif
 
 typedef struct pa_thread pa_thread;