From: Martin Mares Date: Wed, 12 Sep 2007 19:26:56 +0000 (+0200) Subject: Extended the fbsd-device backend to run on Dragonfly BSD. X-Git-Tag: v3.0.0~8^2~27 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=99091df9ef27a820a52eaa46fbc5deafa7b1327b;p=pciutils.git Extended the fbsd-device backend to run on Dragonfly BSD. --- diff --git a/ChangeLog b/ChangeLog index 181074a..69ea70f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-09-12 Hasso Tepper + + * Extended the fbsd-device backend to run on Dragonfly BSD. + + * lspci.c: alloca() is declared in on BSD's, not . + 2007-09-03 Martin Mares * Resurrected the Windows port, including cross-compilation by MinGW. diff --git a/lib/configure b/lib/configure index 91bd03e..7c25c42 100755 --- a/lib/configure +++ b/lib/configure @@ -22,7 +22,7 @@ then else cpu=`uname -m | sed 's/^i.86$/i386/;s/^sun4u$/sparc64/;s/^i86pc$/i386/'` fi -if [ "$sys" = "GNU/kFreeBSD" ] +if [ "$sys" = "GNU/kFreeBSD" -o "$sys" = "DragonFly" ] then sys=freebsd fi diff --git a/lib/fbsd-device.c b/lib/fbsd-device.c index 46fa7a2..b770c58 100644 --- a/lib/fbsd-device.c +++ b/lib/fbsd-device.c @@ -19,13 +19,15 @@ # endif #endif -#if __FreeBSD_version < 500000 +#if defined(__DragonFly__) +# include +#elif __FreeBSD_version < 500000 # include #else # include #endif -#if __FreeBSD_version < 430000 +#if __FreeBSD_version < 430000 && !defined(__DragonFly__) # include #else # include diff --git a/lspci.c b/lspci.c index 9ec1056..d29da87 100644 --- a/lspci.c +++ b/lspci.c @@ -58,8 +58,9 @@ static struct pci_access *pacc; * This increases our memory footprint, but only slightly since we don't * use alloca() much. */ - -#if defined(__GNUC__) && !defined(PCI_OS_WINDOWS) +#if defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__DragonFly__) +/* alloca() is defined in stdlib.h */ +#elif defined(__GNUC__) && !defined(PCI_OS_WINDOWS) #include #else #undef alloca