From 4231197e812bb88ec569586a4109207717cfc697 Mon Sep 17 00:00:00 2001 From: joerg Date: Fri, 24 Feb 2006 19:25:33 +0000 Subject: Add DragonFly and try to fix the reliance on zeroness of undefined symbols. Feature tests should be done with defined() after all. --- net/slurm/distinfo | 5 +++- net/slurm/patches/patch-aa | 69 ++++++++++++++++++++++++++++++++++++++++++++++ net/slurm/patches/patch-ab | 37 +++++++++++++++++++++++++ net/slurm/patches/patch-ac | 61 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 171 insertions(+), 1 deletion(-) create mode 100644 net/slurm/patches/patch-aa create mode 100644 net/slurm/patches/patch-ab create mode 100644 net/slurm/patches/patch-ac diff --git a/net/slurm/distinfo b/net/slurm/distinfo index a9883ab7ed0..f545831c496 100644 --- a/net/slurm/distinfo +++ b/net/slurm/distinfo @@ -1,5 +1,8 @@ -$NetBSD: distinfo,v 1.4 2005/02/24 12:14:04 agc Exp $ +$NetBSD: distinfo,v 1.5 2006/02/24 19:25:33 joerg Exp $ SHA1 (slurm-0.3.3.tar.gz) = 232a7f28ec3457b2e9d554ed844a45642dea1cc5 RMD160 (slurm-0.3.3.tar.gz) = 6f154e5e6be0ac746dc67e152cf9caf1580c14fe Size (slurm-0.3.3.tar.gz) = 122839 bytes +SHA1 (patch-aa) = dea71ac2aac554b9429de937b92da094bbfca3f4 +SHA1 (patch-ab) = e2729a07db3f907d6a7772299106b5bd5b92a461 +SHA1 (patch-ac) = b3312f7f809dd96ab7edfd4f0743f5ec7b6905a6 diff --git a/net/slurm/patches/patch-aa b/net/slurm/patches/patch-aa new file mode 100644 index 00000000000..850ae2a9f91 --- /dev/null +++ b/net/slurm/patches/patch-aa @@ -0,0 +1,69 @@ +$NetBSD: patch-aa,v 1.3 2006/02/24 19:25:33 joerg Exp $ + +--- os.h.orig 2006-02-24 19:13:28.000000000 +0000 ++++ os.h +@@ -33,8 +33,8 @@ + # endif + #endif + +-#if defined (__FreeBSD__) || (__OpenBSD__) || (__NetBSD__) \ +- || (__MicroBSD__) || (__APPLE__) || (__DragonFly__) ++#if defined (__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) \ ++ || defined(__MicroBSD__) || defined(__APPLE__) || defined(__DragonFly__) + #define _HAVE_BSD + #define _HAVE_CHECKINTERFACE + #elif __HPUX__ +@@ -69,7 +69,7 @@ + #include + #include + #include +-#elif __FreeBSD__ /* F R E E B S D */ ++#elif defined(__FreeBSD__) || defined(__DragonFly__) /* F R E E B S D */ + #include + #include + #include +@@ -96,7 +96,7 @@ + #include + #include + #endif +-#elif __NetBSD__ /* N E T B S D */ ++#elif defined(__NetBSD__) /* N E T B S D */ + #include + #include + #include +@@ -123,7 +123,7 @@ + #include + #include + #include +-#elif __OpenBSD__ || __MicroBSD__ /* O P E N B S D */ ++#elif defined(__OpenBSD__) || defined(__MicroBSD__) /* O P E N B S D */ + #include + #include + #include +@@ -149,7 +149,7 @@ + #include + #include + #include +-#elif __APPLE__ /* Mac OS X */ ++#elif defined(__APPLE__) /* Mac OS X */ + #include + #include + #include +@@ -175,7 +175,7 @@ + #include + #include + #include +-#elif __linux__ /* L I N U X */ ++#elif defined(__linux__) /* L I N U X */ + #include + #include + #include +@@ -198,7 +198,7 @@ + #include + #include + #include +-#elif __Solaris__ /* S O L A R I S */ ++#elif defined(__Solaris__) /* S O L A R I S */ + #include + #define NO_CURSES_E 1 + #define _WIDEC_H diff --git a/net/slurm/patches/patch-ab b/net/slurm/patches/patch-ab new file mode 100644 index 00000000000..8e93132dec0 --- /dev/null +++ b/net/slurm/patches/patch-ab @@ -0,0 +1,37 @@ +$NetBSD: patch-ab,v 1.3 2006/02/24 19:25:33 joerg Exp $ + +--- slurm.c.orig 2006-02-24 19:15:46.000000000 +0000 ++++ slurm.c +@@ -50,25 +50,25 @@ + #ifdef __HPUX__ + #include "src/hpux.h" + #include "src/hpux.c" +-#elif __FreeBSD__ ++#elif defined(__FreeBSD__) + #include "src/freebsd.h" + #include "src/freebsd.c" +-#elif __linux__ ++#elif defined(__linux__) + #include "src/linux.h" + #include "src/linux.c" +-#elif __OpenBSD__ || __MicroBSD__ ++#elif defined(__OpenBSD__) || defined(__MicroBSD__) + #include "src/openbsd.h" + #include "src/openbsd.c" +-#elif __NetBSD__ ++#elif defined(__NetBSD__) + #include "src/netbsd.h" + #include "src/netbsd.c" +-#elif __Solaris__ ++#elif defined(__Solaris__) + #include "src/solaris.h" + #include "src/solaris.c" +-#elif __APPLE__ ++#elif defined(__APPLE__) + #include "src/macos.h" + #include "src/macos.c" +-#elif __DragonFly__ ++#elif defined(__DragonFly__) + #include "src/freebsd.h" + #include "src/freebsd.c" + #else diff --git a/net/slurm/patches/patch-ac b/net/slurm/patches/patch-ac new file mode 100644 index 00000000000..09924be24fc --- /dev/null +++ b/net/slurm/patches/patch-ac @@ -0,0 +1,61 @@ +$NetBSD: patch-ac,v 1.3 2006/02/24 19:25:33 joerg Exp $ + +--- src/if_media.c.orig 2006-02-24 19:16:35.000000000 +0000 ++++ src/if_media.c +@@ -10,9 +10,9 @@ + *****************************************************************************/ + +-#if defined (__FreeBSD__) || (__OpenBSD__) || (__NetBSD__) || (__MicroBSD__) || (__APPLE__) ++#if defined (__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__MicroBSD__) || defined(__APPLE__) || defined(__DragonFly__) + # define MEDIA_H_SUPPORTED + #endif + +-#if defined (__OpenBSD__) || (__NetBSD__) || (__MicroBSD__) || (__APPLE__) ++#if defined (__OpenBSD__) || defined(__NetBSD__) || defined(__MicroBSD__) || defined(__APPLE__) + # define NON_FreeBSD 1 + # define WIRELESS 1 +@@ -22,4 +22,6 @@ + # define WIRELESS 1 + # endif ++# elif defined(__DragonFly__) ++# define WIRELESS 1 + # else + # define WIRELESS 0 +@@ -119,10 +121,8 @@ int get_if_speed (char *ifstring) + switch (physical) + { +-#ifdef __FreeBSD__ +-#if __FreeBSD__ <= 4 ++#if (defined(__FreeBSD__) && __FreeBSD__ <= 4) + case IFM_1000_FX: + case IFM_1000_TX: + #endif +-#endif + case IFM_1000_SX: + case IFM_1000_LX: +@@ -147,8 +147,8 @@ int get_if_speed (char *ifstring) + speed = 10 * 1000; + break; +-#if defined(__OpenBSD__) || (__MicroBSD__) || (__NetBSD__) || (__APPLE__) ++#if defined(__OpenBSD__) || defined(__MicroBSD__) || defined(__NetBSD__) || defined(__APPLE__) || defined(__DragonFly__) + case IFM_HPNA_1: + #else +-#if __FreeBSD__ <= 4 ++#if (defined(__FreeBSD__) && __FreeBSD__ <= 4) + case IFM_homePNA: + #endif +@@ -196,5 +196,5 @@ int get_if_speed (char *ifstring) + speed = 11 * 1000; + break; +-#if WIRELESS && defined(__FreeBSD__) && (__FreeBSD_version >= 460102) ++#if WIRELESS && ((defined(__FreeBSD__) && (__FreeBSD_version >= 460102)) || defined(__DragonFly__)) + case IFM_IEEE80211_DS22: + speed = 22 * 1000; +@@ -203,5 +203,6 @@ int get_if_speed (char *ifstring) + #if WIRELESS && \ + (defined(__FreeBSD__) && (__FreeBSD_version >= 500111)) || \ +- (defined(__NetBSD__) && (__NetBSD_Version_ > 106020000)) ++ (defined(__NetBSD__) && (__NetBSD_Version_ > 106020000)) || \ ++ defined(__DragonFly__) + case IFM_IEEE80211_OFDM6: + speed = 6 * 1000; -- cgit v1.2.3