[pulseaudio-commits] r1799 - in /branches/lennart/src/pulsecore: atomic.h creds.h endianmacros.h macro.h thread.h
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Mon Sep 10 17:30:53 PDT 2007
Author: lennart
Date: Tue Sep 11 02:30:53 2007
New Revision: 1799
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1799&root=pulseaudio&view=rev
Log:
Instead of including config.h from header files, check whether PACKAGE is defined and if not, fail (thus using PACKAGE as a check for inclusion of config.h)
Modified:
branches/lennart/src/pulsecore/atomic.h
branches/lennart/src/pulsecore/creds.h
branches/lennart/src/pulsecore/endianmacros.h
branches/lennart/src/pulsecore/macro.h
branches/lennart/src/pulsecore/thread.h
Modified: branches/lennart/src/pulsecore/atomic.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/atomic.h?rev=1799&root=pulseaudio&r1=1798&r2=1799&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/atomic.h (original)
+++ branches/lennart/src/pulsecore/atomic.h Tue Sep 11 02:30:53 2007
@@ -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
Modified: branches/lennart/src/pulsecore/creds.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/creds.h?rev=1799&root=pulseaudio&r1=1798&r2=1799&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/creds.h (original)
+++ branches/lennart/src/pulsecore/creds.h Tue Sep 11 02:30:53 2007
@@ -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>
Modified: branches/lennart/src/pulsecore/endianmacros.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/endianmacros.h?rev=1799&root=pulseaudio&r1=1798&r2=1799&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/endianmacros.h (original)
+++ branches/lennart/src/pulsecore/endianmacros.h Tue Sep 11 02:30:53 2007
@@ -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) ) )
Modified: branches/lennart/src/pulsecore/macro.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/macro.h?rev=1799&root=pulseaudio&r1=1798&r2=1799&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/macro.h (original)
+++ branches/lennart/src/pulsecore/macro.h Tue Sep 11 02:30:53 2007
@@ -31,6 +31,10 @@
#include <unistd.h>
#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)
Modified: branches/lennart/src/pulsecore/thread.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/thread.h?rev=1799&root=pulseaudio&r1=1798&r2=1799&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/thread.h (original)
+++ branches/lennart/src/pulsecore/thread.h Tue Sep 11 02:30:53 2007
@@ -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;
More information about the pulseaudio-commits
mailing list