From 086debb592af8ac323f71561edee2729b36f99f8 Mon Sep 17 00:00:00 2001 From: joerg Date: Tue, 24 Jan 2006 22:27:07 +0000 Subject: Add DragonFly support. Fix an ambigious statement. --- ham/dpbox/distinfo | 17 ++++++++--- ham/dpbox/patches/patch-ac | 26 +++++++++++++--- ham/dpbox/patches/patch-ae | 33 ++++++++++++++++++-- ham/dpbox/patches/patch-af | 40 ++++++++++++++++++------- ham/dpbox/patches/patch-ag | 30 +++++++++++++++++++ ham/dpbox/patches/patch-ah | 75 ++++++++++++++++++++++++++++++++++++++++++++++ ham/dpbox/patches/patch-ai | 39 ++++++++++++++++++++++++ ham/dpbox/patches/patch-ak | 22 ++++++++++++++ ham/dpbox/patches/patch-al | 13 ++++++++ ham/dpbox/patches/patch-am | 13 ++++++++ ham/dpbox/patches/patch-an | 19 ++++++++++++ ham/dpbox/patches/patch-ao | 13 ++++++++ ham/dpbox/patches/patch-ap | 40 +++++++++++++++++++++++++ 13 files changed, 359 insertions(+), 21 deletions(-) create mode 100644 ham/dpbox/patches/patch-ag create mode 100644 ham/dpbox/patches/patch-ah create mode 100644 ham/dpbox/patches/patch-ai create mode 100644 ham/dpbox/patches/patch-ak create mode 100644 ham/dpbox/patches/patch-al create mode 100644 ham/dpbox/patches/patch-am create mode 100644 ham/dpbox/patches/patch-an create mode 100644 ham/dpbox/patches/patch-ao create mode 100644 ham/dpbox/patches/patch-ap (limited to 'ham/dpbox') diff --git a/ham/dpbox/distinfo b/ham/dpbox/distinfo index 337e967be36..e2aad735e38 100644 --- a/ham/dpbox/distinfo +++ b/ham/dpbox/distinfo @@ -1,11 +1,20 @@ -$NetBSD: distinfo,v 1.8 2005/09/06 08:10:58 abs Exp $ +$NetBSD: distinfo,v 1.9 2006/01/24 22:27:07 joerg Exp $ SHA1 (dpbox-60000.tar.gz) = 73a55785f499324f57736c7fb3cc0bd1001facd3 RMD160 (dpbox-60000.tar.gz) = 05a14f7601b531fcdd0bc0252d171eed3bfafb7f Size (dpbox-60000.tar.gz) = 957010 bytes SHA1 (patch-aa) = 8235aa600edffd952c1d932c0ee8011ba0896d08 SHA1 (patch-ab) = abeee7b86844c8937792ef09a938caf232574fb3 -SHA1 (patch-ac) = faa4e5b32a31283e0ed7ed9730c026ccd5efffb4 +SHA1 (patch-ac) = f81ea8e6441bd3bf95d8d60660cf9b407895a070 SHA1 (patch-ad) = 589a69328b5959f81b86739a6e3c32f6d1d71ffe -SHA1 (patch-ae) = 9c8ac68bb2102f19d2dea85dbe18197c7ad2b864 -SHA1 (patch-af) = 8c6745b43447aba7373366b9327dd316b1494ddf +SHA1 (patch-ae) = 82c22fd343ab353012c822d84d39c8018b285f83 +SHA1 (patch-af) = a875f03b78a1afb444fa9301e24b5718f0f285cc +SHA1 (patch-ag) = d193fc0245b35f1f897886352ad4c3a6ec5cd438 +SHA1 (patch-ah) = 6501eb257f10c4907d875a14d134bfb5fe6736f1 +SHA1 (patch-ai) = 9d96b644d0b29a6bfc787202d2c42223570b1ee5 +SHA1 (patch-ak) = 387c0f79590f37329439ba5990e165577855a054 +SHA1 (patch-al) = 79b6a63442336b8824763a95512b87f90550aaff +SHA1 (patch-am) = 510dbc978691543bba8da95be33cc3ba3f2c18fe +SHA1 (patch-an) = 8b01dcb543e179437dcea32d377af8b06a287cbd +SHA1 (patch-ao) = b83ff4a2158755c3231bba79496501f7268e4403 +SHA1 (patch-ap) = f4bdfc134803f280dfebef013d09d291f0a19e6e diff --git a/ham/dpbox/patches/patch-ac b/ham/dpbox/patches/patch-ac index 27682462d7f..1e3eeb4b79b 100644 --- a/ham/dpbox/patches/patch-ac +++ b/ham/dpbox/patches/patch-ac @@ -1,8 +1,26 @@ -$NetBSD: patch-ac,v 1.1 2000/09/25 16:21:01 wulf Exp $ +$NetBSD: patch-ac,v 1.2 2006/01/24 22:27:07 joerg Exp $ ---- filesys.h.orig Sun Sep 24 12:46:31 2000 -+++ filesys.h Sun Sep 24 07:41:32 2000 -@@ -177,7 +177,7 @@ +--- filesys.h.orig 2000-04-27 12:48:56.000000000 +0000 ++++ filesys.h +@@ -71,7 +71,7 @@ extern void mktemp(char *name); + + + +-#if defined(__linux__) || defined(__NetBSD__) ++#if defined(__linux__) || defined(__NetBSD__) || defined(__DragonFly__) + + /* simply copied that widespread file access code of former dpbox code */ + /* in this single file. Not a real change to previous versions of the */ +@@ -79,7 +79,7 @@ extern void mktemp(char *name); + /* localisation of the dpbox code from Atari to Linux */ + + #include +-#ifndef __NetBSD__ ++#if !defined(__NetBSD__) && !defined(__DragonFly__) + #include + #endif + +@@ -177,7 +177,7 @@ extern long sfwrite(short handle, long c extern void sfclose_x(short *handle, boolean delete_it); extern void sfdelfile(char *name); extern void sfdispfilelist(short x, dispfilelistproc outproc); diff --git a/ham/dpbox/patches/patch-ae b/ham/dpbox/patches/patch-ae index ec87591f4e1..5d04000124e 100644 --- a/ham/dpbox/patches/patch-ae +++ b/ham/dpbox/patches/patch-ae @@ -1,7 +1,7 @@ -$NetBSD: patch-ae,v 1.1 2003/02/05 09:58:05 agc Exp $ +$NetBSD: patch-ae,v 1.2 2006/01/24 22:27:07 joerg Exp $ ---- pastrix.h 2003/02/05 09:53:49 1.1 -+++ pastrix.h 2003/02/05 09:54:31 +--- pastrix.h.orig 2000-04-27 12:48:56.000000000 +0000 ++++ pastrix.h @@ -20,6 +20,8 @@ #include #include @@ -11,3 +11,30 @@ $NetBSD: patch-ae,v 1.1 2003/02/05 09:58:05 agc Exp $ /* The following definitions work only on twos-complement machines */ #ifndef SHORT_MAX +@@ -27,7 +29,7 @@ + # define SHORT_MIN (~SHORT_MAX) + #endif + +-#ifndef __NetBSD__ ++#if !defined(__NetBSD__) && !defined(__DragonFly__) + #ifndef INT_MAX + # define INT_MAX ((int)(((unsigned int) -1) >> 1)) + # define INT_MIN (~INT_MAX) +@@ -76,7 +78,7 @@ + #include + #endif + +-#if defined(__linux__) || defined(__NetBSD__) ++#if defined(__linux__) || defined(__NetBSD__) || defined(__DragonFly__) + #include + #define DP_SIGHUP SIGHUP + #define DP_SIGTSTP SIGTSTP +@@ -181,7 +183,7 @@ extern long memavail__(void); + #endif + #define move_b(quelle, ziel, size) memmove(ziel, quelle, size) + +-#if defined(__linux__) || defined(__NetBSD__) ++#if defined(__linux__) || defined(__NetBSD__) || defined(__DragonFly__) + extern long get_cpuusage(void); + extern long get_memusage(void); + #else diff --git a/ham/dpbox/patches/patch-af b/ham/dpbox/patches/patch-af index 26f0612ca66..9300c001341 100644 --- a/ham/dpbox/patches/patch-af +++ b/ham/dpbox/patches/patch-af @@ -1,24 +1,35 @@ -$NetBSD: patch-af,v 1.3 2005/09/06 08:10:58 abs Exp $ +$NetBSD: patch-af,v 1.4 2006/01/24 22:27:07 joerg Exp $ ---- filesys.c 2004/09/15 16:24:57 1.1 -+++ filesys.c 2004/09/15 16:24:21 -@@ -401,6 +401,11 @@ +--- filesys.c.orig 2000-04-27 12:48:54.000000000 +0000 ++++ filesys.c +@@ -11,7 +11,7 @@ + #include "filesys.h" - #if defined(__linux__) || defined(__NetBSD__) + #include +-#ifdef __NetBSD__ ++#if defined(__NetBSD__) || defined(__DragonFly__) + #include + #include + #endif +@@ -399,7 +399,12 @@ short sfremovedir(char *name) -+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 299000900) + + +-#if defined(__linux__) || defined(__NetBSD__) ++#if defined(__linux__) || defined(__NetBSD__) || defined(__DragonFly__) ++ ++#if (defined(__NetBSD__) && (__NetBSD_Version__ >= 299000900)) || defined(__DragonFly__) +#include +#endif + -+ + /* simply copied that widespread file access code of former dpbox code */ /* in this single file. Not a real change to previous versions of the */ - /* code. lot of the code was written by Mark Wahl DL4YBG for the first */ -@@ -413,9 +418,15 @@ +@@ -413,9 +418,15 @@ long Diskfree(int dummy) long DFree(char *mount) { -+#if defined(__NetBSD__) && (__NetBSD_Version__ < 299000900) ++#if (defined(__NetBSD__) && (__NetBSD_Version__ < 299000900)) struct statfs mystatfs; statfs(mount, &mystatfs); @@ -30,3 +41,12 @@ $NetBSD: patch-af,v 1.3 2005/09/06 08:10:58 abs Exp $ if (mystatfs.f_bsize % 1024 == 0) return (mystatfs.f_bsize / 1024) * mystatfs.f_bavail; else +@@ -1523,7 +1534,7 @@ void _filesys_init(void) + #ifdef __macos__ + StartupFilesysInit(); + #endif +-#if defined(__linux__) || defined(__NetBSD__) ++#if defined(__linux__) || defined(__NetBSD__) || defined(__DragonFly__) + nextptr = NULL; + #endif + } diff --git a/ham/dpbox/patches/patch-ag b/ham/dpbox/patches/patch-ag new file mode 100644 index 00000000000..fd04609efdf --- /dev/null +++ b/ham/dpbox/patches/patch-ag @@ -0,0 +1,30 @@ +$NetBSD: patch-ag,v 1.1 2006/01/24 22:27:07 joerg Exp $ + +--- tools.c.orig 2000-04-27 12:48:55.000000000 +0000 ++++ tools.c +@@ -72,12 +72,14 @@ char conv_umlaut_to_local(char code) + + void conv_string_from_local(char *s) + { +- while (*s) *s++ = conv_umlaut_from_local(*s); ++ for (; *s; ++s) ++ *s = conv_umlaut_from_local(*s); + } + + void conv_string_to_local(char *s) + { +- while (*s) *s++ = conv_umlaut_to_local(*s); ++ for (; *s; ++s) ++ *s = conv_umlaut_to_local(*s); + } + + boolean conv_file_umlaut(boolean to_local, char *fname) +@@ -168,7 +170,7 @@ short call_prg(char *prog, char *par, ch + #ifdef __macos__ + return (status); + #endif +-#if defined(__linux__) || defined(__NetBSD__) ++#if defined(__linux__) || defined(__NetBSD__) || defined(__DragonFly__) + return (statusconvert(status)); + #endif + } diff --git a/ham/dpbox/patches/patch-ah b/ham/dpbox/patches/patch-ah new file mode 100644 index 00000000000..da900c9f72d --- /dev/null +++ b/ham/dpbox/patches/patch-ah @@ -0,0 +1,75 @@ +$NetBSD: patch-ah,v 1.1 2006/01/24 22:27:07 joerg Exp $ + +--- status.c.orig 2000-04-27 12:48:55.000000000 +0000 ++++ status.c +@@ -27,7 +27,7 @@ + #include + #endif + +-#ifdef __NetBSD__ ++#if defined(__NetBSD__) || defined(__DragonFly__) + #include + #include + #include +@@ -110,7 +110,7 @@ long get_sysruntime(void) + static time_t lastsysrunt = 0; + static time_t lastsysrunres = 0; + +-#ifndef __NetBSD__ ++#if !defined(__NetBSD__) && !defined(__DragonFly__) + short k; + char hs[256], w[256]; + short x, y; +@@ -145,7 +145,7 @@ void get_sysload(char *s) + static time_t lastsysltime = 0; + static char lastsysload[21] = ""; + +-#ifdef __NetBSD__ ++#if defined(__NetBSD__) || defined(__DragonFly__) + double loadavg[3]; + #else + short k; +@@ -185,7 +185,7 @@ void get_sysload(char *s) + + } else + #endif +-#ifdef __NetBSD__ ++#if defined(__NetBSD__) || defined(__DragonFly__) + if (getloadavg(loadavg, 3)) + sprintf(s,"load averages: %.2f%%, %.2f%%, %.2f%%\n", + loadavg[0], loadavg[1], loadavg[2]); +@@ -205,7 +205,7 @@ void get_cpuinf(char *cpu, char *bmips) + + short k; + char *hp; +-#ifdef __NetBSD__ ++#if defined(__NetBSD__) || defined(__DragonFly__) + int mib[2]; + size_t len; + #else +@@ -250,7 +250,15 @@ void get_cpuinf(char *cpu, char *bmips) + strcpy(lastcputype, &hs[1]); + } + #endif +-#ifdef __NetBSD__ ++#ifdef __DragonFly__ ++ sysctlbyname("hw.model", NULL, &len, NULL, 0); ++ if ((hp = malloc(len)) != NULL) { ++ sysctlbyname("hw.model", hp, &len, NULL, 0); ++ snprintf(lastcputype,80,"%s",hp); ++ free(hp); ++ } ++#endif ++#if defined(__NetBSD__) + mib[0] = CTL_HW; + mib[1] = HW_MODEL; + sysctl(mib, 2, NULL, &len, NULL, 0); +@@ -303,7 +311,7 @@ void get_linpack(char *s) + + void get_sysversion(char *s) + { +-#if defined(__macos__) || defined(__NetBSD__) ++#if defined(__macos__) || defined(__NetBSD__) || defined(__DragonFly__) + struct utsname name; + + strcpy(s, "?"); diff --git a/ham/dpbox/patches/patch-ai b/ham/dpbox/patches/patch-ai new file mode 100644 index 00000000000..1bedf67e79f --- /dev/null +++ b/ham/dpbox/patches/patch-ai @@ -0,0 +1,39 @@ +$NetBSD: patch-ai,v 1.1 2006/01/24 22:27:07 joerg Exp $ + +--- shell.c.orig 2006-01-24 22:00:03.000000000 +0000 ++++ shell.c +@@ -1,6 +1,6 @@ + /* ---- shell functs, stolen from TNT / Mark Wahl, DL4YBG ----- */ + +-#if defined(__linux__) || defined(__NetBSD__) ++#if defined(__linux__) || defined(__NetBSD__) || defined(__DragonFly__) + #include + #include + #include +@@ -231,7 +231,7 @@ boolean close_shell(short unr) + trans_show_puffer(unr,user[unr]->ptybuffer,user[unr]->ptybuflen); + } + if (user[unr]->pty >= minhandle) { +-#ifdef __NetBSD__ ++#if defined(__NetBSD__) || defined(__DragonFly__) + ioctl(user[unr]->pty, TCIOFLUSH, 2); + #else + ioctl(user[unr]->pty, TCFLSH, 2); +@@ -415,7 +415,7 @@ boolean cmd_shell(short unr, boolean tra + if (user[unr]->ptylfcrconv) { + memset((char *) &termios, 0, sizeof(termios)); + termios.c_iflag = ICRNL | IXOFF; +-#ifdef __NetBSD__ ++#if defined(__NetBSD__) || defined(__DragonFly__) + termios.c_oflag = OPOST | OXTABS | ONLRET; + #else + termios.c_oflag = OPOST | TAB3 | ONLRET; +@@ -485,7 +485,7 @@ boolean cmd_run(short unr, boolean trans + if (user[unr]->ptylfcrconv) { + memset((char *) &termios, 0, sizeof(termios)); + termios.c_iflag = ICRNL | IXOFF; +-#ifdef __NetBSD__ ++#if defined(__NetBSD__) || defined(__DragonFly__) + termios.c_oflag = OPOST | OXTABS | ONLRET; + #else + termios.c_oflag = OPOST | TAB3 | ONLRET; diff --git a/ham/dpbox/patches/patch-ak b/ham/dpbox/patches/patch-ak new file mode 100644 index 00000000000..77d4138bc85 --- /dev/null +++ b/ham/dpbox/patches/patch-ak @@ -0,0 +1,22 @@ +$NetBSD: patch-ak,v 1.1 2006/01/24 22:27:07 joerg Exp $ + +--- pastrix.c.orig 2006-01-24 22:01:20.000000000 +0000 ++++ pastrix.c +@@ -19,7 +19,7 @@ + #include "boxlocal.h" + #include "tools.h" + +-#if defined(__linux__) || defined(__NetBSD__) ++#if defined(__linux__) || defined(__NetBSD__) || defined(__DragonFly__) + #include + #include + #include +@@ -80,7 +80,7 @@ long statclock(void) + #endif + } + +-#if defined(__linux__) || defined(__NetBSD__) ++#if defined(__linux__) || defined(__NetBSD__) || defined(__DragonFly__) + + long get_cpuusage(void) + { diff --git a/ham/dpbox/patches/patch-al b/ham/dpbox/patches/patch-al new file mode 100644 index 00000000000..78a1f6b10b6 --- /dev/null +++ b/ham/dpbox/patches/patch-al @@ -0,0 +1,13 @@ +$NetBSD: patch-al,v 1.1 2006/01/24 22:27:07 joerg Exp $ + +--- init.h.orig 2006-01-24 22:02:14.000000000 +0000 ++++ init.h +@@ -33,7 +33,7 @@ + #define DEF_SAVEDIR "save/" + #define DEF_SERVERDIR "server/" + +-#ifdef __NetBSD__ ++#if defined(__NetBSD__) || defined(__DragonFly__) + #define DEF_BOXPROCDIR "/var/run/" + #define DEF_BOXSOCKDIR "/var/run/" + #else /* Have to preserve the old setting for running installations */ diff --git a/ham/dpbox/patches/patch-am b/ham/dpbox/patches/patch-am new file mode 100644 index 00000000000..2f45a1119ff --- /dev/null +++ b/ham/dpbox/patches/patch-am @@ -0,0 +1,13 @@ +$NetBSD: patch-am,v 1.1 2006/01/24 22:27:07 joerg Exp $ + +--- init.c.orig 2006-01-24 22:02:35.000000000 +0000 ++++ init.c +@@ -5,7 +5,7 @@ + updated: Joachim Schurig DL8HBS 99/09/26 + */ + +-#if defined(__linux__) || defined(__NetBSD__) ++#if defined(__linux__) || defined(__NetBSD__) || defined(__DragonFly__) + #include + #include + #include diff --git a/ham/dpbox/patches/patch-an b/ham/dpbox/patches/patch-an new file mode 100644 index 00000000000..2b0a750b8f4 --- /dev/null +++ b/ham/dpbox/patches/patch-an @@ -0,0 +1,19 @@ +$NetBSD: patch-an,v 1.1 2006/01/24 22:27:07 joerg Exp $ + +--- box_sys.c.orig 2006-01-24 22:02:52.000000000 +0000 ++++ box_sys.c +@@ -1679,6 +1679,14 @@ void show_version(short unr, boolean ext + wlnuser(unr, "NetBSD porting : (c) 1999 Berndt Josef Wulf, VK5ABN"); + #define __dp_version_ok + #endif ++#ifdef __DragonFly__ ++ sprintf(hs, "dpbox (DragonFly) v%s%s %s", dp_vnr, dp_vnr_sub, dp_date); ++ wuser(unr, hs); ++ wlnuser(unr, " (c) 1990-2000 Joachim Schurig, DL8HBS"); ++ wlnuser(unr, "Linux porting : (c) 1994-1997 Mark Wahl, DL4YBG"); ++ wlnuser(unr, "NetBSD porting : (c) 1999 Berndt Josef Wulf, VK5ABN"); ++#define __dp_version_ok ++#endif + #ifndef __dp_version_ok + sprintf(hs, "dpbox v%s%s %s", dp_vnr, dp_vnr_sub, dp_date); + wuser(unr, hs); diff --git a/ham/dpbox/patches/patch-ao b/ham/dpbox/patches/patch-ao new file mode 100644 index 00000000000..b2858c82f10 --- /dev/null +++ b/ham/dpbox/patches/patch-ao @@ -0,0 +1,13 @@ +$NetBSD: patch-ao,v 1.1 2006/01/24 22:27:07 joerg Exp $ + +--- box.c.orig 2006-01-24 22:12:35.000000000 +0000 ++++ box.c +@@ -4297,6 +4297,8 @@ void begruessung(short unr) + wlnuser(unr, hs); + #ifdef __NetBSD__ + sprintf(w, "dpbox (NetBSD) v%s%s", dp_vnr, dp_vnr_sub); ++#elif defined(__DragonFly__) ++ sprintf(w, "dpbox (DragonFly) v%s%s", dp_vnr, dp_vnr_sub); + #else + #ifdef __linux__ + sprintf(w, "dpbox (Linux) v%s%s", dp_vnr, dp_vnr_sub); diff --git a/ham/dpbox/patches/patch-ap b/ham/dpbox/patches/patch-ap new file mode 100644 index 00000000000..616f79bd923 --- /dev/null +++ b/ham/dpbox/patches/patch-ap @@ -0,0 +1,40 @@ +$NetBSD: patch-ap,v 1.1 2006/01/24 22:27:07 joerg Exp $ + +--- main.c.orig 2006-01-24 22:13:19.000000000 +0000 ++++ main.c +@@ -22,10 +22,13 @@ + #ifdef __NetBSD__ + #undef IFACE_DEBUG + #endif ++#ifdef __DragonFly__ ++#undef IFACE_DEBUG ++#endif + + #define MAIN_G + +-#if defined(__linux__) || defined(__NetBSD__) ++#if defined(__linux__) || defined(__NetBSD__) || defined(__DragonFly__) + #include + #include + #include +@@ -2921,6 +2924,11 @@ char *argv[]; + dp_vnr, dp_vnr_sub, dp_date); + #define __dp_version_done + #endif ++#ifdef __DragonFly__ ++ printf("DigiPoint Box v%s%s %s (DragonFly) successfully started\n", ++ dp_vnr, dp_vnr_sub, dp_date); ++#define __dp_version_done ++#endif + #ifdef __linux__ + printf("DigiPoint Box v%s%s %s (Linux) successfully started\n", + dp_vnr, dp_vnr_sub, dp_date); +@@ -3082,7 +3090,7 @@ char *argv[]; + exit_proc(); + if (dpbox_debug == 2) + fclose(error_fp); +-#if defined(__linux__) || defined(__NetBSD__) ++#if defined(__linux__) || defined(__NetBSD__) || defined(__DragonFly__) + delete_dirlist(); + unlink(serv_addr.sun_path); + #endif -- cgit v1.2.3