aboutsummaryrefslogtreecommitdiff
path: root/pd/portaudio/src/common/pa_endianness.h
diff options
context:
space:
mode:
Diffstat (limited to 'pd/portaudio/src/common/pa_endianness.h')
-rw-r--r--pd/portaudio/src/common/pa_endianness.h30
1 files changed, 17 insertions, 13 deletions
diff --git a/pd/portaudio/src/common/pa_endianness.h b/pd/portaudio/src/common/pa_endianness.h
index bdcc74f7..84e904ca 100644
--- a/pd/portaudio/src/common/pa_endianness.h
+++ b/pd/portaudio/src/common/pa_endianness.h
@@ -1,7 +1,7 @@
#ifndef PA_ENDIANNESS_H
#define PA_ENDIANNESS_H
/*
- * $Id: pa_endianness.h 1216 2007-06-10 09:26:00Z aknudsen $
+ * $Id: pa_endianness.h 1324 2008-01-27 02:03:30Z bjornroche $
* Portable Audio I/O Library current platform endianness macros
*
* Based on the Open Source API proposed by Ross Bencina
@@ -120,18 +120,22 @@ extern "C"
and raises an assertion if they don't match. <assert.h> must be included in
the context in which this macro is used.
*/
-#if defined(PA_LITTLE_ENDIAN)
- #define PA_VALIDATE_ENDIANNESS \
- { \
- const long nativeOne = 1; \
- assert( "PortAudio: compile time and runtime endianness don't match" && (((char *)&nativeOne)[0]) == 1 ); \
- }
-#elif defined(PA_BIG_ENDIAN)
- #define PA_VALIDATE_ENDIANNESS \
- { \
- const long nativeOne = 1; \
- assert( "PortAudio: compile time and runtime endianness don't match" && (((char *)&nativeOne)[0]) == 0 ); \
- }
+#if defined(NDEBUG)
+ #define PA_VALIDATE_ENDIANNESS
+#else
+ #if defined(PA_LITTLE_ENDIAN)
+ #define PA_VALIDATE_ENDIANNESS \
+ { \
+ const long nativeOne = 1; \
+ assert( "PortAudio: compile time and runtime endianness don't match" && (((char *)&nativeOne)[0]) == 1 ); \
+ }
+ #elif defined(PA_BIG_ENDIAN)
+ #define PA_VALIDATE_ENDIANNESS \
+ { \
+ const long nativeOne = 1; \
+ assert( "PortAudio: compile time and runtime endianness don't match" && (((char *)&nativeOne)[0]) == 0 ); \
+ }
+ #endif
#endif