Re: [AD] bug report: allegro-4.1.6: static libraries linked into shared library |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Tue, Dec 17, 2002 at 09:35:53AM +0100, Eric Botcazou wrote:
> It would be nice if you could add the detection of NetBSD to Allegro, so that
> the grabber displays "NetBSD" instead of "Unix". The only requirement is that
> HAVE_SYS_UTSNAME_H be defined in include/allegro/platform/alunixac.h after
> the configure script was run.
>
> If so, you'll simply have to:
> - add the new constant to include/allegro/system.h,
> - add the detection code to src/unix/usystem.c,
> - document it in docs/src/allegro._tx,
> - add the string to tools/grabber.c
>
> and post the patch (diff -u) here.
Patches attached.
For testing, I tried compiling liquidwar-5.5.8 with it, but it
fails when combining the datfiles into liquidwar.dat without
an error message, but with error code 1 (and without creating
liquidwar.dat). Is this a NetBSD problem, does it work for someone
else?
I'm a bit unhappy about how hard it is to get CFLAGS accepted by
the allegro build process...
Cheers,
Thomas
--
Thomas Klausner - wiz@xxxxxxxxxx
What is wanted is not the will to believe, but the will to find
out, which is the exact opposite. -- Bertrand Russell
$NetBSD$
--- docs/src/allegro._tx.orig Sun Dec 8 20:11:51 2002
+++ docs/src/allegro._tx
@@ -152,6 +152,7 @@ information about how to install Allegro
OSTYPE_LINUX - Linux
OSTYPE_SUNOS - SunOS/Solaris
OSTYPE_FREEBSD - FreeBSD
+ OSTYPE_NETBSD - NetBSD
OSTYPE_DARWIN - Darwin
OSTYPE_QNX - QNX
OSTYPE_UNIX - Unknown Unix variant
$NetBSD$
--- include/allegro/system.h.orig Sun Dec 8 20:11:31 2002
+++ include/allegro/system.h
@@ -50,6 +50,7 @@ AL_ARRAY(char, allegro_error);
#define OSTYPE_LINUX AL_ID('T','U','X',' ')
#define OSTYPE_SUNOS AL_ID('S','U','N',' ')
#define OSTYPE_FREEBSD AL_ID('F','B','S','D')
+#define OSTYPE_NETBSD AL_ID('N','B','S','D')
#define OSTYPE_DARWIN AL_ID('D','A','R','W')
#define OSTYPE_QNX AL_ID('Q','N','X',' ')
#define OSTYPE_UNIX AL_ID('U','N','I','X')
$NetBSD$
--- src/unix/usystem.c.orig Sun Dec 8 20:11:34 2002
+++ src/unix/usystem.c
@@ -175,6 +175,9 @@ void _read_os_type()
else if (!strcmp(utsn.sysname, "FreeBSD")) {
os_type = OSTYPE_FREEBSD;
}
+ else if (!strcmp(utsn.sysname, "NetBSD")) {
+ os_type = OSTYPE_NETBSD;
+ }
else if (!strcmp(utsn.sysname, "Darwin")) {
os_type = OSTYPE_DARWIN;
}
$NetBSD$
--- tools/dat2c.c.orig Sun Dec 8 20:11:35 2002
+++ tools/dat2c.c
@@ -346,6 +346,7 @@ static int prepare_dat2c(struct dat2c* d
switch(os_type) {
case OSTYPE_LINUX:
case OSTYPE_FREEBSD:
+ case OSTYPE_NETBSD:
case OSTYPE_UNIX:
case OSTYPE_BEOS:
case OSTYPE_QNX:
$NetBSD$
--- tools/grabber.c.orig Sun Dec 8 20:11:35 2002
+++ tools/grabber.c
@@ -2745,6 +2745,7 @@ static int sysinfo(void)
case OSTYPE_LINUX: s = "Linux"; break;
case OSTYPE_SUNOS: s = "SunOS/Solaris"; break;
case OSTYPE_FREEBSD: s = "FreeBSD"; break;
+ case OSTYPE_NETBSD: s = "NetBSD"; break;
case OSTYPE_DARWIN: s = "Darwin"; break;
case OSTYPE_QNX: s = "QNX"; break;
case OSTYPE_UNIX: s = "Unix"; break;