Use NOAOUT so that this builds without a.out support, and enable

that define if we're building for mips.
This commit is contained in:
he
2009-08-20 22:26:19 +00:00
parent ceb32b93af
commit 3469d76593
2 changed files with 12 additions and 3 deletions

View File

@@ -1,5 +1,10 @@
# $NetBSD: Makefile,v 1.1 2002/06/06 23:01:00 thorpej Exp $
# $NetBSD: Makefile,v 1.2 2009/08/20 22:26:19 he Exp $
PROG= mopcopy
.include <bsd.own.mk>
.if ${MACHINE_CPU} == "mips"
CFLAGS+= -DNOAOUT
.endif
.include <bsd.prog.mk>

View File

@@ -1,4 +1,4 @@
/* $NetBSD: mopcopy.c,v 1.3 2002/11/05 05:06:05 thorpej Exp $ */
/* $NetBSD: mopcopy.c,v 1.4 2009/08/20 22:26:19 he Exp $ */
/* mopcopy - Convert a Unix format kernel into something that
* can be transfered via MOP.
@@ -49,19 +49,21 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: mopcopy.c,v 1.3 2002/11/05 05:06:05 thorpej Exp $");
__RCSID("$NetBSD: mopcopy.c,v 1.4 2009/08/20 22:26:19 he Exp $");
#endif
#include "os.h"
#include "common.h"
#include "mopdef.h"
#include "file.h"
#if !defined(NOAOUT)
#if defined(__NetBSD__) || defined(__OpenBSD__)
#include <sys/exec_aout.h>
#endif
#if defined(__FreeBSD__)
#include <sys/imgact_aout.h>
#endif
#endif /* !NOAOUT */
#if defined(__bsdi__)
#include <a.out.h>
#define NOAOUT
@@ -82,7 +84,9 @@ __RCSID("$NetBSD: mopcopy.c,v 1.3 2002/11/05 05:06:05 thorpej Exp $");
#endif /* NOELF */
u_char header[512]; /* The VAX header we generate is 1 block. */
#if !defined(NOAOUT)
struct exec ex, ex_swap;
#endif
int
main (int argc, char **argv)