mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
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)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1799 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
848a4d7487
commit
e2e2ce79e2
5 changed files with 13 additions and 9 deletions
|
|
@ -37,9 +37,8 @@
|
||||||
* libatomic_ops
|
* libatomic_ops
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* We have to include config.h here (for the __sync stuff), which sucks */
|
#ifndef PACKAGE
|
||||||
#ifdef HAVE_CONFIG_H
|
#error "Please include config.h before including this file!"
|
||||||
#include <config.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_ATOMIC_BUILTINS
|
#ifdef HAVE_ATOMIC_BUILTINS
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,9 @@
|
||||||
|
|
||||||
#include <sys/types.h>
|
#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
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,8 @@
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifndef PACKAGE
|
||||||
#include <config.h>
|
#error "Please include config.h before including this file!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define INT16_SWAP(x) ( (int16_t) ( ((uint16_t) x >> 8) | ((uint16_t) x << 8) ) )
|
#define INT16_SWAP(x) ( (int16_t) ( ((uint16_t) x >> 8) | ((uint16_t) x << 8) ) )
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,10 @@
|
||||||
|
|
||||||
#include <pulsecore/log.h>
|
#include <pulsecore/log.h>
|
||||||
|
|
||||||
|
#ifndef PACKAGE
|
||||||
|
#error "Please include config.h before including this file!"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(PAGE_SIZE)
|
#if defined(PAGE_SIZE)
|
||||||
#define PA_PAGE_SIZE ((size_t) PAGE_SIZE)
|
#define PA_PAGE_SIZE ((size_t) PAGE_SIZE)
|
||||||
#elif defined(PAGESIZE)
|
#elif defined(PAGESIZE)
|
||||||
|
|
|
||||||
|
|
@ -28,9 +28,8 @@
|
||||||
#include <pulse/def.h>
|
#include <pulse/def.h>
|
||||||
#include <pulsecore/once.h>
|
#include <pulsecore/once.h>
|
||||||
|
|
||||||
/* We have to include config.h here (for the __tls stuff), which sucks */
|
#ifndef PACKAGE
|
||||||
#ifdef HAVE_CONFIG_H
|
#error "Please include config.h before including this file!"
|
||||||
#include <config.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct pa_thread pa_thread;
|
typedef struct pa_thread pa_thread;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue