libaudiofile 0.1.8 portability patch



I've sent this some time ago to the bug tracker, but it never appeared there.
I think I know why, so it's not a problem.

Anyway, the patch is against 0.1.8 tarball. There are a few things which
this patch doesn't cover, but which should be addressed. Namely, configure
script checks for u_int8_t, u_int16_t and u_int32_t. If not found, config.h
defines them to unsigned char, unsigned short and unsigned int.

The problem is that u_int8_t & co. are not standard. According to the
current C9X draft (and XPG4 and POSIX, although I'm not 100% sure, because
I don't have a copy), the standard types are uint8_t, uint16_t and uint32_t.
All of them should be defined in <inttypes.h> system header. So, configure
script should check if that header file exists and then (optionally) if those
types are defined there. If that fails, check for u_int8_t & co, should
be performed. If the <inttypes.h> header is not used, there is a chance
that autoconf guess might fail, most likely on architectures with mixed
32 and 64 bit environments.


--- libaudiofile/Makefile.am.orig	Mon Sep 20 17:48:21 1999
+++ libaudiofile/Makefile.am	Mon Sep 20 17:48:41 1999
@@ -18,5 +18,5 @@
 
 include_HEADERS = audiofile.h aupvlist.h af_vfs.h
 
-CFLAGS = -Wall -g
+#CFLAGS = -Wall -g
 #CFLAGS = -Wall -DNDEBUG
--- libaudiofile/query.c.orig	Mon Sep 20 17:49:56 1999
+++ libaudiofile/query.c	Mon Sep 20 17:50:05 1999
@@ -94,7 +94,7 @@
 static const struct _instrument _otherinstrument =
 {
 	0, 0, 0, 0,
-	{},
+	{0},
 	0, 0
 };
 

-- 
 .-.   .-.    Life is a sexually transmitted disease.
(_  \ /  _)
     |        dave@srce.hr
     |        dave@fly.srk.fer.hr



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]