+2007-09-12 Hasso Tepper <hasso@estpak.ee>
+
+ * Extended the fbsd-device backend to run on Dragonfly BSD.
+
+ * lspci.c: alloca() is declared in <stdlib.h> on BSD's, not <alloca.h>.
+
2007-09-03 Martin Mares <mj@ucw.cz>
* Resurrected the Windows port, including cross-compilation by MinGW.
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
# endif
#endif
-#if __FreeBSD_version < 500000
+#if defined(__DragonFly__)
+# include <bus/pci/pcivar.h>
+#elif __FreeBSD_version < 500000
# include <pci/pcivar.h>
#else
# include <dev/pci/pcivar.h>
#endif
-#if __FreeBSD_version < 430000
+#if __FreeBSD_version < 430000 && !defined(__DragonFly__)
# include <pci/pci_ioctl.h>
#else
# include <sys/pciio.h>
* 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 <alloca.h>
#else
#undef alloca