pkgsrc/audio/csound-bath/patches/patch-ap
2003-01-19 21:31:06 +00:00

43 lines
987 B
Text

$NetBSD: patch-ap,v 1.3 2003/01/19 21:31:12 hubertf Exp $
--- cs.h.orig Mon Dec 16 04:28:30 2002
+++ cs.h
@@ -15,6 +15,24 @@
#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,10 +800,10 @@
# define POLL_EVENTS() STasks()
# define __cdecl
#else
-#ifdef LINUX
- extern int POLL_EVENTS(void);
-#else
+#if !defined(LINUX) || defined(__NetBSD__)
# define POLL_EVENTS() (1)
+#else
+ extern int POLL_EVENTS(void);
#endif
# if !defined(__BEOS__) || defined(__MWERKS__)
# define __cdecl