summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/macro.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2007-09-16 23:28:56 +0000
committerLennart Poettering <lennart@poettering.net>2007-09-16 23:28:56 +0000
commit61b90a0951ce709bce09cfa44825498224d92120 (patch)
tree7159876eaf34db0de01aa57f62e911381ddfef24 /src/pulsecore/macro.h
parent116ddaaae9267d9f89f3d127cba62763246b441c (diff)
add proper boolean type pa_bool_t
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1836 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/macro.h')
-rw-r--r--src/pulsecore/macro.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/pulsecore/macro.h b/src/pulsecore/macro.h
index ec451547..d0dff5e1 100644
--- a/src/pulsecore/macro.h
+++ b/src/pulsecore/macro.h
@@ -72,6 +72,21 @@ static inline size_t pa_page_align(size_t l) {
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif
+/* This type is not intended to be used in exported APIs! Use classic "int" there! */
+#ifdef HAVE_STD_BOOL
+typedef _Bool pa_bool_t;
+#else
+typedef int pa_bool_t;
+#endif
+
+#ifndef FALSE
+#define FALSE ((pa_bool_t) 0)
+#endif
+
+#ifndef TRUE
+#define TRUE (!FALSE)
+#endif
+
#ifdef __GNUC__
#define PA_PRETTY_FUNCTION __PRETTY_FUNCTION__
#else