From 4caa7869177d89ad42728561affa26fe88396829 Mon Sep 17 00:00:00 2001 From: Robert Garrett Date: Wed, 21 Jan 2004 21:48:21 +0000 Subject: [PATCH] add missing $DragonFly$ keyword to at/panic.h teach usr.bin about __DragonFly__ --- usr.bin/at/panic.h | 5 ++++- usr.bin/at/parsetime.c | 4 ++-- usr.bin/doscmd/doscmd.c | 4 ++-- usr.bin/doscmd/doscmd_loader.c | 8 ++++---- usr.bin/doscmd/port.c | 4 ++-- usr.bin/doscmd/register.h | 4 ++-- usr.bin/doscmd/signal.c | 4 ++-- usr.bin/doscmd/trap.c | 4 ++-- usr.bin/doscmd/tty.c | 8 ++++---- usr.bin/m4/pathnames.h | 4 ++-- usr.bin/mt/mt.c | 32 ++++++++++++++++---------------- usr.bin/rpcgen/rpc_main.c | 32 ++++++++++++++++---------------- usr.bin/rpcgen/rpc_parse.c | 4 ++-- usr.bin/tconv/tconv.c | 6 +++--- usr.bin/xlint/xlint/xlint.c | 5 ++++- 15 files changed, 67 insertions(+), 61 deletions(-) diff --git a/usr.bin/at/panic.h b/usr.bin/at/panic.h index a809b8a209..bbca76df7d 100644 --- a/usr.bin/at/panic.h +++ b/usr.bin/at/panic.h @@ -21,9 +21,12 @@ * THEORY OF LIABILITY, WETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $DragonFly: src/usr.bin/at/panic.h,v 1.2 2004/01/21 21:48:21 rob Exp $ */ -#ifdef __FreeBSD__ + +#if defined (__FreeBSD__) || defined (__DragonFly__) #define __NORETURN #endif diff --git a/usr.bin/at/parsetime.c b/usr.bin/at/parsetime.c index c4934a52e2..0edf841cae 100644 --- a/usr.bin/at/parsetime.c +++ b/usr.bin/at/parsetime.c @@ -33,7 +33,7 @@ * \PLUS NUMBER MINUTES|HOURS|DAYS|WEEKS/ * * $FreeBSD: src/usr.bin/at/parsetime.c,v 1.19.2.3 2001/12/19 11:19:16 brian Exp $ - * $DragonFly: src/usr.bin/at/parsetime.c,v 1.2 2003/06/17 04:29:25 dillon Exp $ + * $DragonFly: src/usr.bin/at/parsetime.c,v 1.3 2004/01/21 21:48:21 rob Exp $ */ /* System Headers */ @@ -47,7 +47,7 @@ #include #include #include -#ifndef __FreeBSD__ +#if !defined (__FreeBSD__) || !defined (__DragonFly__) #include #endif diff --git a/usr.bin/doscmd/doscmd.c b/usr.bin/doscmd/doscmd.c index c1b366dceb..7e9b401b24 100644 --- a/usr.bin/doscmd/doscmd.c +++ b/usr.bin/doscmd/doscmd.c @@ -30,7 +30,7 @@ * BSDI doscmd.c,v 2.3 1996/04/08 19:32:30 bostic Exp * * $FreeBSD: src/usr.bin/doscmd/doscmd.c,v 1.13.2.6 2002/04/25 11:04:51 tg Exp $ - * $DragonFly: src/usr.bin/doscmd/doscmd.c,v 1.3 2003/11/21 22:46:14 dillon Exp $ + * $DragonFly: src/usr.bin/doscmd/doscmd.c,v 1.4 2004/01/21 21:48:21 rob Exp $ */ #include @@ -333,7 +333,7 @@ setup_boot(regcontext_t *REGS) R_AX = R_BX = R_CX = R_DX = R_SI = R_DI = R_BP = 0; -#if defined(__FreeBSD__) || defined(__NetBSD__) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined (__DragonFly__) /* ** init a few other context registers */ diff --git a/usr.bin/doscmd/doscmd_loader.c b/usr.bin/doscmd/doscmd_loader.c index 5d5f2ecdcf..4c760d0f97 100644 --- a/usr.bin/doscmd/doscmd_loader.c +++ b/usr.bin/doscmd/doscmd_loader.c @@ -30,7 +30,7 @@ * BSDI doscmd_loader.c,v 2.3 1996/04/08 19:32:33 bostic Exp * * $FreeBSD: src/usr.bin/doscmd/doscmd_loader.c,v 1.2.2.1 2002/04/25 11:04:51 tg Exp $ - * $DragonFly: src/usr.bin/doscmd/doscmd_loader.c,v 1.2 2003/06/17 04:29:26 dillon Exp $ + * $DragonFly: src/usr.bin/doscmd/doscmd_loader.c,v 1.3 2004/01/21 21:48:21 rob Exp $ */ #include @@ -74,20 +74,20 @@ void main(int argc, char **argv, char **environ) { void (*entry_point)(); -#ifndef __FreeBSD__ +#ifndef __FreeBSD__ || !defined (__DragonFly__) int fd = open("/dev/mem", 0); #endif setgid(getgid()); setuid(getuid()); -#ifndef __FreeBSD__ +#ifndef __FreeBSD__ || !defined (__DragonFly__) if (fd < 0) err(1, "/dev/mem"); #endif entry_point = (void (*)()) load_kernel(); -#ifndef __FreeBSD__ +#ifndef __FreeBSD__ || !defined (__DragonFly__) if (read(fd, 0, 0x500 != 0x500)) err(1, "/dev/mem"); diff --git a/usr.bin/doscmd/port.c b/usr.bin/doscmd/port.c index ef7ddad5fc..f74f498402 100644 --- a/usr.bin/doscmd/port.c +++ b/usr.bin/doscmd/port.c @@ -30,7 +30,7 @@ * BSDI port.c,v 2.2 1996/04/08 19:33:03 bostic Exp * * $FreeBSD: src/usr.bin/doscmd/port.c,v 1.5.2.1 2002/04/25 11:04:51 tg Exp $ - * $DragonFly: src/usr.bin/doscmd/port.c,v 1.3 2003/10/04 20:36:43 hmp Exp $ + * $DragonFly: src/usr.bin/doscmd/port.c,v 1.4 2004/01/21 21:48:21 rob Exp $ */ #include @@ -56,7 +56,7 @@ FILE *iolog = 0; u_long ioports[MAXPORT/32]; -#ifdef __FreeBSD__ +#ifdef __FreeBSD__ || defined (__DragonFly__) static void iomap(int port, int cnt) { diff --git a/usr.bin/doscmd/register.h b/usr.bin/doscmd/register.h index 90de99fae8..e109ab3332 100644 --- a/usr.bin/doscmd/register.h +++ b/usr.bin/doscmd/register.h @@ -24,7 +24,7 @@ ** SUCH DAMAGE. ** ** $FreeBSD: src/usr.bin/doscmd/register.h,v 1.4 1999/10/08 09:02:38 marcel Exp $ -** $DragonFly: src/usr.bin/doscmd/register.h,v 1.2 2003/06/17 04:29:26 dillon Exp $ +** $DragonFly: src/usr.bin/doscmd/register.h,v 1.3 2004/01/21 21:48:21 rob Exp $ */ /****************************************************************************** @@ -53,7 +53,7 @@ typedef union #endif -#ifdef __FreeBSD__ +#if defined (__FreeBSD__) || defined (__DragonFly__) /* layout must match definition of struct sigcontext in */ diff --git a/usr.bin/doscmd/signal.c b/usr.bin/doscmd/signal.c index 90f31c9e62..20e4e2b95e 100644 --- a/usr.bin/doscmd/signal.c +++ b/usr.bin/doscmd/signal.c @@ -30,7 +30,7 @@ * BSDI signal.c,v 2.2 1996/04/08 19:33:06 bostic Exp * * $FreeBSD: src/usr.bin/doscmd/signal.c,v 1.6.2.1 2002/04/25 11:04:51 tg Exp $ - * $DragonFly: src/usr.bin/doscmd/signal.c,v 1.2 2003/06/17 04:29:26 dillon Exp $ + * $DragonFly: src/usr.bin/doscmd/signal.c,v 1.3 2004/01/21 21:48:21 rob Exp $ */ #include "doscmd.h" @@ -64,7 +64,7 @@ sanity_check(struct sigframe *sf __unused) fatal("attempting to return to vm86 while dead"); } -#if defined(__FreeBSD__) || defined(USE_VM86) +#if defined(__FreeBSD__) || defined(USE_VM86) || defined (__DragonFly__) static void generichandler(struct sigframe sf) { diff --git a/usr.bin/doscmd/trap.c b/usr.bin/doscmd/trap.c index 2e67fdeb4e..e7e3ba8883 100644 --- a/usr.bin/doscmd/trap.c +++ b/usr.bin/doscmd/trap.c @@ -30,7 +30,7 @@ * BSDI trap.c,v 2.3 1996/04/08 19:33:08 bostic Exp * * $FreeBSD: src/usr.bin/doscmd/trap.c,v 1.7.2.1 2002/04/25 11:04:51 tg Exp $ - * $DragonFly: src/usr.bin/doscmd/trap.c,v 1.2 2003/06/17 04:29:26 dillon Exp $ + * $DragonFly: src/usr.bin/doscmd/trap.c,v 1.3 2004/01/21 21:48:21 rob Exp $ */ #include @@ -552,7 +552,7 @@ sigtrap(struct sigframe *sf) if (resettrace(REGS)) goto doh; -#ifdef __FreeBSD__ +#if defined (__FreeBSD__) || defined (__DragonFly__) trapno = (int)sf->sf_siginfo; /* XXX GROSTIC HACK ALERT */ #else trapno = sc->sc_trapno; diff --git a/usr.bin/doscmd/tty.c b/usr.bin/doscmd/tty.c index efd1d56a88..270c29e9f8 100644 --- a/usr.bin/doscmd/tty.c +++ b/usr.bin/doscmd/tty.c @@ -30,7 +30,7 @@ * BSDI tty.c,v 2.4 1996/04/08 22:03:27 prb Exp * * $FreeBSD: src/usr.bin/doscmd/tty.c,v 1.8.2.2 2002/04/25 11:04:51 tg Exp $ - * $DragonFly: src/usr.bin/doscmd/tty.c,v 1.3 2003/10/04 20:36:43 hmp Exp $ + * $DragonFly: src/usr.bin/doscmd/tty.c,v 1.4 2004/01/21 21:48:21 rob Exp $ */ #include @@ -46,7 +46,7 @@ #include #include #include -#ifdef __FreeBSD__ +#if defined (__FreeBSD__) || defined (__DragonFly) # include # if __FreeBSD_version >= 500014 # include @@ -218,7 +218,7 @@ console_denit(void *arg) { int fd = *(int *)arg; -#ifdef __FreeBSD__ +#if defined (__FreeBSD__) || defined (__DragonFly__) if (ioctl(fd, KDSKBMODE, K_XLATE)) perror("KDSKBMODE/K_XLATE"); #else @@ -281,7 +281,7 @@ console_init(void) fd = squirrel_fd(fd); kbd_fd = fd; -#ifdef __FreeBSD__ +#if defined (__FreeBSD__) || defined (__DragonFly__) if (ioctl(fd, KDSKBMODE, K_RAW)) { perror("KDSKBMODE/K_RAW"); quit(1); diff --git a/usr.bin/m4/pathnames.h b/usr.bin/m4/pathnames.h index f7e1062d45..d0b4b097ba 100644 --- a/usr.bin/m4/pathnames.h +++ b/usr.bin/m4/pathnames.h @@ -38,7 +38,7 @@ * * @(#)pathnames.h 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.bin/m4/pathnames.h,v 1.1.1.1.14.2 2002/07/15 02:06:15 jmallett Exp $ - * $DragonFly: src/usr.bin/m4/pathnames.h,v 1.2 2003/06/17 04:29:28 dillon Exp $ + * $DragonFly: src/usr.bin/m4/pathnames.h,v 1.3 2004/01/21 21:48:21 rob Exp $ */ /* @@ -52,7 +52,7 @@ #endif #if defined(unix) || defined(__FreeBSD__) || defined(__NetBSD__) || \ - defined(__OpenBSD__) + defined(__OpenBSD__) || defined (__DragonFly__) #define _PATH_DIVNAME "/tmp/m4.0XXXXXXXXXX" /* unix diversion files */ #define UNIQUE 8 /* unique char location */ #endif diff --git a/usr.bin/mt/mt.c b/usr.bin/mt/mt.c index 3ce65f6e2e..fddebc81e8 100644 --- a/usr.bin/mt/mt.c +++ b/usr.bin/mt/mt.c @@ -33,7 +33,7 @@ * @(#) Copyright (c) 1980, 1993 The Regents of the University of California. All rights reserved. * @(#)mt.c 8.2 (Berkeley) 5/4/95 * $FreeBSD: src/usr.bin/mt/mt.c,v 1.26.2.3 2002/11/08 11:35:57 joerg Exp $ - * $DragonFly: src/usr.bin/mt/mt.c,v 1.3 2003/10/04 20:36:49 hmp Exp $ + * $DragonFly: src/usr.bin/mt/mt.c,v 1.4 2004/01/21 21:48:21 rob Exp $ */ /* @@ -53,7 +53,7 @@ #include /* the appropriate sections of are also #ifdef'd for FreeBSD */ -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined (__DragonFly__) /* c_flags */ #define NEED_2ARGS 0x01 #define ZERO_ALLOWED 0x02 @@ -73,13 +73,13 @@ struct commands { char *c_name; int c_code; int c_ronly; -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined (__DragonFly__) int c_flags; #endif /* defined(__FreeBSD__) */ } com[] = { { "bsf", MTBSF, 1 }, { "bsr", MTBSR, 1 }, -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined (__DragonFly__) /* XXX FreeBSD considered "eof" dangerous, since it's being confused with "eom" (and is an alias for "weof" anyway) */ { "eof", MTWEOF, 0, DISABLE_THIS }, @@ -92,12 +92,12 @@ struct commands { { "rewind", MTREW, 1 }, { "rewoffl", MTOFFL, 1 }, { "status", MTNOP, 1 }, -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined (__DragonFly__) { "weof", MTWEOF, 0, ZERO_ALLOWED }, #else { "weof", MTWEOF, 0 }, #endif -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined (__DragonFly__) { "erase", MTERASE, 0, ZERO_ALLOWED}, { "blocksize", MTSETBSIZ, 0, NEED_2ARGS|ZERO_ALLOWED }, { "density", MTSETDNSTY, 0, NEED_2ARGS|ZERO_ALLOWED|IS_DENSITY }, @@ -125,7 +125,7 @@ struct commands { void printreg(char *, u_int, char *); void status(struct mtget *); void usage(void); -#if defined (__FreeBSD__) +#if defined (__FreeBSD__) || defined (__DragonFly__) void st_status (struct mtget *); int stringtodens (const char *s); const char *denstostring (int d); @@ -170,7 +170,7 @@ main(int argc, char **argv) if (strncmp(p, comp->c_name, len) == 0) break; } -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined (__DragonFly__) if((comp->c_flags & NEED_2ARGS) && argc != 2) usage(); if(comp->c_flags & DISABLE_THIS) { @@ -182,7 +182,7 @@ main(int argc, char **argv) if (comp->c_code != MTNOP) { mt_com.mt_op = comp->c_code; if (*argv) { -#if defined (__FreeBSD__) +#if defined (__FreeBSD__) || defined (__DragonFly__) if (!isdigit(**argv) && (comp->c_flags & IS_DENSITY)) { const char *dcanon; @@ -210,7 +210,7 @@ main(int argc, char **argv) mt_com.mt_count = strtol(*argv, &p, 10); #endif /* defined(__FreeBSD__) */ if ((mt_com.mt_count <= -#if defined (__FreeBSD__) +#if defined (__FreeBSD__) || defined (__DragonFly__) ((comp->c_flags & ZERO_ALLOWED)? -1: 0) && ((comp->c_flags & IS_COMP) == 0) #else @@ -221,7 +221,7 @@ main(int argc, char **argv) } else mt_com.mt_count = 1; -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined (__DragonFly__) switch (comp->c_code) { case MTIOCERRSTAT: { @@ -340,7 +340,7 @@ main(int argc, char **argv) #include #endif -#if defined(__FreeBSD__) && defined(__i386__) +#if defined(__FreeBSD__) && defined(__i386__) || defined (__DragonFly__) #include #endif @@ -364,7 +364,7 @@ struct tape_desc { #ifdef tahoe { MT_ISCY, "cipher", CYS_BITS, CYCW_BITS }, #endif -#if defined (__FreeBSD__) +#if defined (__FreeBSD__) || defined (__DragonFly__) /* * XXX This is weird. The st driver reports the tape drive * as 0x7 (MT_ISAR - Sun/Archive compatible); the wt driver @@ -399,7 +399,7 @@ status(register struct mtget *bp) if (mt->t_type == bp->mt_type) break; } -#if defined (__FreeBSD__) +#if defined (__FreeBSD__) || defined (__DragonFly__) if(mt->t_type == MT_ISAR) st_status(bp); else { @@ -408,7 +408,7 @@ status(register struct mtget *bp) printreg("ds", (unsigned short)bp->mt_dsreg, mt->t_dsbits); printreg("\ner", (unsigned short)bp->mt_erreg, mt->t_erbits); (void)putchar('\n'); -#if defined (__FreeBSD__) +#if defined (__FreeBSD__) || defined (__DragonFly__) } #endif /* defined (__FreeBSD__) */ } @@ -453,7 +453,7 @@ usage(void) exit(1); } -#if defined (__FreeBSD__) +#if defined (__FreeBSD__) || defined (__DragonFly__) struct densities { int dens; diff --git a/usr.bin/rpcgen/rpc_main.c b/usr.bin/rpcgen/rpc_main.c index 9dc751cd4e..aff6b2ca94 100644 --- a/usr.bin/rpcgen/rpc_main.c +++ b/usr.bin/rpcgen/rpc_main.c @@ -28,7 +28,7 @@ * * @(#)rpc_main.c 1.30 89/03/30 (C) 1987 SMI * $FreeBSD: src/usr.bin/rpcgen/rpc_main.c,v 1.11 1999/08/28 01:05:16 peter Exp $ - * $DragonFly: src/usr.bin/rpcgen/rpc_main.c,v 1.5 2004/01/16 07:45:22 dillon Exp $ + * $DragonFly: src/usr.bin/rpcgen/rpc_main.c,v 1.6 2004/01/21 21:48:21 rob Exp $ */ @@ -64,7 +64,7 @@ static void clnt_output( char *, char *, int, char * ); void c_initialize( void ); -#if !defined(__FreeBSD__) && !defined(__NetBSD__) +#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) char * rindex(); #endif @@ -80,7 +80,7 @@ static void s_output( int, char **, char *, char *, int, char *, int, int ); #define DONT_EXTEND 0 /* alias for FALSE */ #define SVR4_CPP "/usr/ccs/lib/cpp" -#ifdef __FreeBSD__ +#if defined (__FreeBSD__) || defined (__DragonFly__) #define SUNOS_CPP "/usr/bin/cpp" #elif defined(__NetBSD__) #define SUNOS_CPP "/usr/bin/cpp" @@ -121,7 +121,7 @@ static int argcount = FIXEDARGS; int nonfatalerrors; /* errors */ -#if defined(__FreeBSD__) || defined(__NetBSD__) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined (__DragonFly__) int inetdflag = 0; /* Support for inetd is now the default */ #else int inetdflag; /* Support for inetd is now the default */ @@ -130,7 +130,7 @@ int pmflag; /* Support for port monitors */ int logflag; /* Use syslog instead of fprintf for errors */ int tblflag; /* Support for dispatch table file */ int mtflag = 0; /* Support for MT */ -#if defined(__FreeBSD__) || defined(__NetBSD__) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined (__DragonFly__) #define INLINE 0 #else #define INLINE 5 @@ -150,7 +150,7 @@ int newstyle; /* newstyle of passing arguments (by value) */ int Cflag = 0; /* ANSI C syntax */ int CCflag = 0; /* C++ files */ static int allfiles; /* generate all files */ -#if defined(__FreeBSD__) || defined(__NetBSD__) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined (__DragonFly__) int tirpcflag = 0; /* generating code for tirpc, by default */ #else int tirpcflag = 1; /* generating code for tirpc, by default */ @@ -244,7 +244,7 @@ main(argc, argv) * add extension to filename */ static char * -#if defined(__FreeBSD__) || defined(__NetBSD__) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined (__DragonFly__) extendfile(path, ext) char *path; #else @@ -255,7 +255,7 @@ extendfile(file, ext) { char *res; char *p; -#if defined(__FreeBSD__) || defined(__NetBSD__) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined (__DragonFly__) char *file; if ((file = rindex(path, '/')) == NULL) @@ -544,7 +544,7 @@ h_output(infile, define, extend, outfile) f_print(fout, "#include \n"); if (mtflag) { -#if !defined(__FreeBSD__) && !defined(__NetBSD__) +#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) f_print(fout, "#include \n"); f_print(fout, "#include \n"); #else @@ -689,7 +689,7 @@ s_output(argc, argv, infile, define, extend, outfile, nomain, netflag) f_print(fout, "#include \n"); f_print(fout, "#include \n"); -#if defined(__FreeBSD__) || defined(__NetBSD__) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) if (tirpcflag) #endif f_print(fout, "#include \n"); @@ -944,7 +944,7 @@ $(TARGETS_SVC.c:%%.c=%%.o) "); if (mtflag) f_print(fout, "\nCPPFLAGS += -D_REENTRANT\nCFLAGS += -g \nLDLIBS += -lnsl -lthread\n"); else -#if defined(__FreeBSD__) || defined(__NetBSD__) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) f_print(fout, "\nCFLAGS += -g \nLDLIBS +=\n"); #else f_print(fout, "\nCFLAGS += -g \nLDLIBS += -lnsl\n"); @@ -962,7 +962,7 @@ $(TARGETS_CLNT.c) \n\n"); f_print(fout, "$(OBJECTS_SVC) : $(SOURCES_SVC.c) $(SOURCES_SVC.h) \ $(TARGETS_SVC.c) \n\n"); f_print(fout, "$(CLIENT) : $(OBJECTS_CLNT) \n"); -#if defined(__FreeBSD__) || defined(__NetBSD__) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) f_print(fout, "\t$(CC) -o $(CLIENT) $(OBJECTS_CLNT) \ $(LDLIBS) \n\n"); #else @@ -970,7 +970,7 @@ $(LDLIBS) \n\n"); $(LDLIBS) \n\n"); #endif f_print(fout, "$(SERVER) : $(OBJECTS_SVC) \n"); -#if defined(__FreeBSD__) || defined(__NetBSD__) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) f_print(fout, "\t$(CC) -o $(SERVER) $(OBJECTS_SVC) $(LDLIBS)\n\n "); f_print(fout, "clean:\n\t $(RM) -f core $(TARGETS) $(OBJECTS_CLNT) \ $(OBJECTS_SVC) $(CLIENT) $(SERVER)\n\n"); @@ -1171,7 +1171,7 @@ parseargs(argc, argv, cmd) * generating backward compatible * code */ -#if defined(__FreeBSD__) || defined(__NetBSD__) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) tirpcflag = 1; #else tirpcflag = 0; @@ -1271,7 +1271,7 @@ parseargs(argc, argv, cmd) } } else { /* 4.1 mode */ pmflag = 0; /* set pmflag only in tirpcmode */ -#if !defined(__FreeBSD__) && !defined(__NetBSD__) +#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) inetdflag = 1; /* inetdflag is TRUE by default */ #endif if (cmd->nflag) { /* netid needs TIRPC */ @@ -1360,7 +1360,7 @@ remote procedures\n"); exit(1); } -#if !defined(__FreeBSD__) && !defined(__NetBSD__) +#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__Dragonfly__) char * rindex(sp, c) register char *sp, c; diff --git a/usr.bin/rpcgen/rpc_parse.c b/usr.bin/rpcgen/rpc_parse.c index 4122cc648d..55f9757530 100644 --- a/usr.bin/rpcgen/rpc_parse.c +++ b/usr.bin/rpcgen/rpc_parse.c @@ -27,7 +27,7 @@ * Mountain View, California 94043 * * @(#)rpc_parse.c 1.8 89/02/22 (C) 1987 SMI - * $DragonFly: src/usr.bin/rpcgen/rpc_parse.c,v 1.4 2003/11/03 19:31:32 eirikn Exp $ + * $DragonFly: src/usr.bin/rpcgen/rpc_parse.c,v 1.5 2004/01/21 21:48:21 rob Exp $ */ #ident "@(#)rpc_parse.c 1.12 93/07/05 SMI" @@ -58,7 +58,7 @@ static void get_prog_declaration( declaration *, defkind, int ); static void get_type( char **, char **, defkind ); static void unsigned_dec( char ** ); -#ifndef __FreeBSD__ +#if !defined(__FreeBSD__) && !defined(__DragonFly__) extern char *strdup(); #endif diff --git a/usr.bin/tconv/tconv.c b/usr.bin/tconv/tconv.c index 2fbd6d07aa..efb2798c23 100644 --- a/usr.bin/tconv/tconv.c +++ b/usr.bin/tconv/tconv.c @@ -34,7 +34,7 @@ * * @(#) mytinfo tconv.c 3.2 92/02/01 public domain, By Ross Ridge * $FreeBSD: src/usr.bin/tconv/tconv.c,v 1.5.2.1 2001/03/04 09:07:50 kris Exp $ - * $DragonFly: src/usr.bin/tconv/Attic/tconv.c,v 1.3 2003/10/04 20:36:52 hmp Exp $ + * $DragonFly: src/usr.bin/tconv/Attic/tconv.c,v 1.4 2004/01/21 21:48:21 rob Exp $ */ #define NOTLIB @@ -48,11 +48,11 @@ #include #endif #include -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__DragonFly__) #include #endif -#ifndef __FreeBSD__ +#if !defined(__FreeBSD__) && !defined(__DragonFly__) #include "strtok.c" #include "mkdir.c" #endif diff --git a/usr.bin/xlint/xlint/xlint.c b/usr.bin/xlint/xlint/xlint.c index c9a3684ca1..436dcc0f01 100644 --- a/usr.bin/xlint/xlint/xlint.c +++ b/usr.bin/xlint/xlint/xlint.c @@ -31,7 +31,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/usr.bin/xlint/xlint/xlint.c,v 1.8 2000/01/14 09:25:31 sheldonh Exp $ - * $DragonFly: src/usr.bin/xlint/xlint/xlint.c,v 1.3 2003/11/03 19:31:34 eirikn Exp $ + * $DragonFly: src/usr.bin/xlint/xlint/xlint.c,v 1.4 2004/01/21 21:48:21 rob Exp $ */ #include @@ -325,6 +325,9 @@ main(argc, argv) appcstrg(&cppflags, "-Wcomment"); #ifdef __FreeBSD__ appcstrg(&cppflags, "-D__FreeBSD__=" __XSTRING(__FreeBSD__)); +#endif +#ifdef __DragonFly__ + appcstrg(&cppflags, "-D__DragonFly__=" __XSTRING(__DragonFly__)); #else # error "This ain't NetBSD. You lose!" appcstrg(&cppflags, "-D__NetBSD__"); -- 2.41.0