be a happy crunch build

This commit is contained in:
pooka 2010-12-13 19:19:10 +00:00
parent 6c19f9ea7b
commit e8de1d91d0
4 changed files with 28 additions and 6 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.6 2001/12/12 00:05:13 tv Exp $
# $NetBSD: Makefile,v 1.7 2010/12/13 19:19:10 pooka Exp $
# Build ping without IPSEC
SRCDIR= ${.CURDIR}/../../../sbin/ping
@ -6,7 +6,7 @@ SRCDIR= ${.CURDIR}/../../../sbin/ping
PROG= ping
NOMAN= # defined
CPPFLAGS+= -I${SRCDIR}
CPPFLAGS+= -I${SRCDIR} -DCRUNCHOPS
DPADD= ${LIBM}
LDADD= -lm

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.16 2005/01/18 12:30:21 lukem Exp $
# $NetBSD: Makefile,v 1.17 2010/12/13 19:19:10 pooka Exp $
# @(#)Makefile 8.1 (Berkeley) 6/5/93
SRCDIR= ${.CURDIR}/../../../sbin/route
@ -10,7 +10,7 @@ NOMAN= # defined
SRCS= route.c show.c keywords.c
CPPFLAGS+= -DSMALL -I${SRCDIR}
CPPFLAGS+= -DSMALL -I${SRCDIR} -DCRUNCHOPS
.if defined(SMALLPROG_INET6) && (${USE_INET6} != "no")
CPPFLAGS+= -DINET6
.endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: prog_ops.h,v 1.1 2010/12/13 17:42:17 pooka Exp $ */
/* $NetBSD: prog_ops.h,v 1.2 2010/12/13 19:19:10 pooka Exp $ */
/*
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@ -31,6 +31,7 @@
#include <sys/types.h>
#ifndef CRUNCHOPS
struct prog_ops {
int (*op_init)(void);
@ -57,5 +58,15 @@ extern const struct prog_ops prog_ops;
#define prog_recvfrom prog_ops.op_recvfrom
#define prog_sendto prog_ops.op_sendto
#define prog_close prog_ops.op_close
#else
#define prog_init ((int (*)(void))NULL)
#define prog_socket socket
#define prog_setsockopt setsockopt
#define prog_shutdown shutdown
#define prog_poll poll
#define prog_recvfrom recvfrom
#define prog_sendto sendto
#define prog_close close
#endif
#endif /* _PROG_OPS_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: prog_ops.h,v 1.1 2010/12/13 17:39:47 pooka Exp $ */
/* $NetBSD: prog_ops.h,v 1.2 2010/12/13 19:19:10 pooka Exp $ */
/*
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@ -31,6 +31,7 @@
#include <sys/types.h>
#ifndef CRUNCHOPS
struct prog_ops {
int (*op_init)(void);
@ -56,5 +57,15 @@ extern const struct prog_ops prog_ops;
#define prog_write prog_ops.op_write
#define prog_sysctl prog_ops.op_sysctl
#define prog_shutdown prog_ops.op_shutdown
#else
#define prog_init ((int (*)(void))NULL)
#define prog_socket socket
#define prog_open open
#define prog_getpid getpid
#define prog_read read
#define prog_write write
#define prog_sysctl sysctl
#define prog_shutdown shutdown
#endif
#endif /* _PROG_OPS_H_ */