Fix LP64 problems.

This commit is contained in:
mycroft 2000-04-27 14:44:23 +00:00
parent 27eb7db10f
commit c1e1cf4688
6 changed files with 101 additions and 15 deletions

View file

@ -1,11 +1,14 @@
$NetBSD: patch-sum,v 1.2 1999/11/24 13:49:03 hubertf Exp $
$NetBSD: patch-sum,v 1.3 2000/04/27 14:44:23 mycroft Exp $
MD5 (patch-ab) = 3d3f5d550a45ce69513d3db5c83688ac
MD5 (patch-ac) = b00b62c0d213a28b5523125c5fd6d869
MD5 (patch-ad) = cad5e8ebb3635a2acaddff06a5267d3d
MD5 (patch-ba) = 8755d85d697524a4ed995edb8d693fb6
MD5 (patch-ba) = 830a16f595d02db0dee9555402c6952a
MD5 (patch-bb) = b9a76caba807ffdd3860dab0e3cf40b9
MD5 (patch-bc) = db30b7730cdeb2025f7e7691af3cf3de
MD5 (patch-bc) = 85e7d701f9508aee853c0e0ce7e75d68
MD5 (patch-bd) = 4fa3bb07ab5476dc710330f1ead63b1b
MD5 (patch-be) = df99699640fbd1f0f1cf1423589aaf29
MD5 (patch-bf) = 1a54e0203c6e7bd48ef1712891a641e9
MD5 (patch-bg) = e88dabce6f6864944cb0ccd4c9563cd1
MD5 (patch-bh) = 8c2d76414acafacf63e0473277d57441
MD5 (patch-bi) = b2287228c110a6245f174808c9569535

View file

@ -1,11 +1,45 @@
$NetBSD: patch-ba,v 1.2 1998/08/07 10:36:15 agc Exp $
$NetBSD: patch-ba,v 1.3 2000/04/27 14:44:23 mycroft Exp $
--- config.h.orig Sat Jun 1 08:54:49 1996
+++ config.h Sat Mar 7 13:17:30 1998
@@ -325,6 +325,18 @@
#define rindex(s,c) strrchr(s,c)
+++ config.h Thu Apr 27 10:35:09 2000
@@ -186,7 +186,7 @@
#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 <machine/endian.h>
#endif
@@ -223,6 +223,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 +242,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 +332,18 @@
extern char *optarg;
#define PI 3.14159265358979323846
#define rindex(s,c) strrchr(s,c)
+#endif
+
+#ifdef __NetBSD__
+# include <errno.h>
+# include <math.h>
@ -16,8 +50,6 @@ $NetBSD: patch-ba,v 1.2 1998/08/07 10:36:15 agc Exp $
+# include <errno.h>
+# include <math.h>
+# define PI M_PI
+#endif
+
#endif
#ifdef __WIN32__
# include <math.h>
# define PI M_PI

View file

@ -1,8 +1,14 @@
$NetBSD: patch-bc,v 1.2 1998/08/07 10:36:16 agc Exp $
$NetBSD: patch-bc,v 1.3 2000/04/27 14:44:23 mycroft Exp $
--- sun_a.c.orig Mon May 20 09:09:47 1996
+++ sun_a.c Sat Mar 7 13:28:46 1998
@@ -33,7 +33,7 @@
+++ sun_a.c Thu Apr 27 10:37:28 2000
@@ -28,12 +28,13 @@
*/
#include <unistd.h>
+#include <string.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/ioctl.h>
@ -11,7 +17,7 @@ $NetBSD: patch-bc,v 1.2 1998/08/07 10:36:16 agc Exp $
#include <sys/audioio.h>
#else
#include <sun/audioio.h>
@@ -81,7 +81,7 @@
@@ -81,7 +82,7 @@
/* Open the audio device */

View file

@ -0,0 +1,15 @@
$NetBSD: patch-bg,v 1.1 2000/04/27 14:44:24 mycroft Exp $
--- common.c.orig Sat Jun 1 08:20:19 1996
+++ common.c Thu Apr 27 10:09:23 2000
@@ -204,8 +204,8 @@
if (count > (1<<21))
{
ctl->cmsg(CMSG_FATAL, VERB_NORMAL,
- "Strange, I feel like allocating %d bytes. This must be a bug.",
- count);
+ "Strange, I feel like allocating %ld bytes. This must be a bug.",
+ (long) count);
}
else if ((p=malloc(count)))
return p;

View file

@ -0,0 +1,14 @@
$NetBSD: patch-bh,v 1.1 2000/04/27 14:44:24 mycroft Exp $
--- timidity.c.orig Tue May 21 15:16:20 1996
+++ timidity.c Thu Apr 27 10:35:59 2000
@@ -204,7 +204,8 @@
{
if (i<low || i > high)
{
- fprintf(stderr, "%s must be between %ld and %ld\n", name, low, high);
+ fprintf(stderr, "%s must be between %ld and %ld\n", name, (long) low,
+ (long) high);
return -1;
}
else *param=i;

View file

@ -0,0 +1,16 @@
$NetBSD: patch-bi,v 1.1 2000/04/27 14:44:24 mycroft Exp $
--- wave_a.c.orig Mon May 20 09:10:15 1996
+++ wave_a.c Thu Apr 27 10:37:13 2000
@@ -26,10 +26,10 @@
#ifdef __WIN32__
#include <stdlib.h>
#include <io.h>
-#include <string.h>
#else
#include <unistd.h>
#endif
+#include <string.h>
#include <fcntl.h>
#include <errno.h>