summaryrefslogtreecommitdiff
path: root/audio/csound-bath/patches/patch-ap
blob: e002cbdd03a903455a02c299988030696f475523 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
$NetBSD: patch-ap,v 1.4 2004/04/11 21:49:10 ben Exp $

--- cs.h.orig	2002-12-16 04:28:30.000000000 -0800
+++ cs.h
@@ -15,6 +15,24 @@ extern "C" {
 
 #include "version.h"
 
+/*	__BIG_ENDIAN__ is used various places in csound
+	BIG_ENDIAN   is used by the sdif code
+	in NetBSD, (BIG|LITTLE)_ENDIAN is defined by sys/endian.h
+	included in sys/types included in stdlib.h
+*/
+#ifdef __NetBSD__
+#undef BIG_ENDIAN
+#undef LITTLE_ENDIAN
+#if _BYTE_ORDER == _BIG_ENDIAN
+#define __BIG_ENDIAN__
+#define BIG_ENDIAN
+#else
+#define __LITTLE_ENDIAN__
+#define LITTLE_ENDIAN
+#endif /* _BYTE_ORDER */
+#endif /* __NetBSD__ */
+
+
 #define VMSGS 1
 #if VMSGS
 #define VMSG(x) if (O.odebug) x
@@ -782,11 +800,8 @@ typedef struct GLOBALS_
 # define POLL_EVENTS() STasks()
 # define __cdecl
 #else
-#ifdef LINUX
-  extern int POLL_EVENTS(void);
-#else
-# define POLL_EVENTS()     (1)
-#endif
+/* #define POLL_EVENTS() csoundYield() */
+#define POLL_EVENTS() (1)
 # if !defined(__BEOS__) || defined(__MWERKS__)
 #  define __cdecl
 # endif