$NetBSD: patch-ba,v 1.4 2000/07/28 21:47:52 jlam Exp $

--- config.h.orig	Sat Jun  1 08:54:49 1996
+++ config.h	Fri Jul 28 17:36:20 2000
@@ -186,7 +186,8 @@
 #define AUDIO_BUFFER_SIZE (1<<AUDIO_BUFFER_BITS)
 
 /* Byte order, defined in <machine/endian.h> for FreeBSD and DEC OSF/1 */
-#ifdef DEC
+#if defined(DEC) || defined(__NetBSD__)
+#include <sys/types.h>
 #include <machine/endian.h>
 #endif
 
@@ -223,6 +224,14 @@
 #endif
 
 /* DEC MMS has 64 bit long words */
+#if defined(__NetBSD__)
+typedef u_int32_t uint32;
+typedef int32_t int32;
+typedef u_int16_t uint16;
+typedef int16_t int16;
+typedef u_int8_t uint8;
+typedef int8_t int8;
+#else
 #ifdef DEC
 typedef unsigned int uint32;
 typedef int int32; 
@@ -234,6 +243,7 @@
 typedef short int16;
 typedef unsigned char uint8;
 typedef char int8;
+#endif
 
 /* Instrument files are little-endian, MIDI files big-endian, so we
    need to do some conversions. */
@@ -323,6 +333,18 @@
   extern char *optarg;
   #define PI 3.14159265358979323846
   #define rindex(s,c) strrchr(s,c)
+#endif
+
+#ifdef __NetBSD__
+#  include <errno.h>
+#  include <math.h>
+#  define PI M_PI
+#endif
+
+#ifdef sgi
+#  include <errno.h>
+#  include <math.h>
+#  define PI M_PI
 #endif
 
 #ifdef __WIN32__