From 6874428a190bd4689acae150332522eda304893c Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Sun, 2 Sep 2001 20:37:36 +0000 Subject: [PATCH] Use the native mount and nfs_prot headers. Also generate nfs_prot_x.c in ANSI-C mode. --- contrib/amd/conf/nfs_prot/nfs_prot_freebsd3.h | 11 +++++------ contrib/amd/include/am_defs.h | 3 --- usr.sbin/amd/amd/Makefile | 3 ++- usr.sbin/amd/include/Makefile | 8 +------- usr.sbin/amd/libamu/Makefile | 5 +++-- 5 files changed, 11 insertions(+), 19 deletions(-) diff --git a/contrib/amd/conf/nfs_prot/nfs_prot_freebsd3.h b/contrib/amd/conf/nfs_prot/nfs_prot_freebsd3.h index 6ebf490c0e8..a2678c78e09 100644 --- a/contrib/amd/conf/nfs_prot/nfs_prot_freebsd3.h +++ b/contrib/amd/conf/nfs_prot/nfs_prot_freebsd3.h @@ -46,11 +46,6 @@ #ifndef _AMU_NFS_PROT_H #define _AMU_NFS_PROT_H -#ifdef COMMENT_OUT -#ifdef HAVE_RPCSVC_NFS_PROT_H -# include -#endif /* HAVE_RPCSVC_NFS_PROT_H */ -#endif /* COMMENT_OUT */ /* nfs_prot.h defines struct `nfs_fh3', but it is a ``dmr "unwarranted * chumminess with the C implementation". We need the more complete * structure, which is defined below. So get the stock `nfs_fh3' @@ -58,7 +53,11 @@ */ struct nfs_fh3; #define nfs_fh3 nfs_fh3_fbsd_ -# include "nfs_prot.h" + +#ifdef HAVE_RPCSVC_NFS_PROT_H +# include +#endif /* HAVE_RPCSVC_NFS_PROT_H */ + #undef nfs_fh3 #ifdef HAVE_NFS_RPCV2_H diff --git a/contrib/amd/include/am_defs.h b/contrib/amd/include/am_defs.h index 28a63077b90..c42afe0a747 100644 --- a/contrib/amd/include/am_defs.h +++ b/contrib/amd/include/am_defs.h @@ -914,14 +914,11 @@ struct sockaddr_dl; * AIX does not protect against this file doubly included, * so I have to do my own protection here. */ -#ifdef COMMENT_OUT #ifdef HAVE_RPCSVC_MOUNT_H # ifndef _RPCSVC_MOUNT_H # include # endif /* not _RPCSVC_MOUNT_H */ #endif /* HAVE_RPCSVC_MOUNT_H */ -#endif -# include "mount.h" /* * Actions to take if exists. diff --git a/usr.sbin/amd/amd/Makefile b/usr.sbin/amd/amd/Makefile index b74da4359dd..a05a72866d1 100644 --- a/usr.sbin/amd/amd/Makefile +++ b/usr.sbin/amd/amd/Makefile @@ -22,7 +22,8 @@ SRCS+= ops_nullfs.c ops_pcfs.c ops_tfs.c ops_ufs.c ops_umapfs.c SRCS+= ops_unionfs.c opts.c restart.c rpc_fwd.c sched.c SRCS+= srvr_amfs_auto.c srvr_nfs.c -CFLAGS+= -I${.CURDIR}/../../../contrib/amd/amd +CFLAGS+= -I${.CURDIR}/../../../contrib/amd/amd \ + -I${DESTDIR}/usr/include/rpcsvc DPADD= ${LIBAMU} ${LIBRPCSVC} LDADD= ${LIBAMU} -lrpcsvc diff --git a/usr.sbin/amd/include/Makefile b/usr.sbin/amd/include/Makefile index d3c77d12049..2fc511823f6 100644 --- a/usr.sbin/amd/include/Makefile +++ b/usr.sbin/amd/include/Makefile @@ -7,7 +7,7 @@ # Portions derived from amd/libamu/Makefile # $NetBSD: Makefile,v 1.8 1998/08/08 22:33:37 christos Exp $ -SRCS= config_local.h mount.h nfs_prot.h +SRCS= config_local.h CLEANFILES= ${SRCS} all: ${SRCS} @@ -16,10 +16,4 @@ config_local.h: newvers.sh @rm -f ${.TARGET} sh ${.ALLSRC} > ${.TARGET} -mount.h: ${MOUNT_X} - ${RPCCOM} -h -C -DWANT_NFS3 ${MOUNT_X} -o ${.TARGET} - -nfs_prot.h: ${NFS_PROT_X} - ${RPCCOM} -h -C -DWANT_NFS3 ${NFS_PROT_X} -o ${.TARGET} - .include diff --git a/usr.sbin/amd/libamu/Makefile b/usr.sbin/amd/libamu/Makefile index b2738ac3a20..d055f3dd62a 100644 --- a/usr.sbin/amd/libamu/Makefile +++ b/usr.sbin/amd/libamu/Makefile @@ -22,10 +22,11 @@ SRCS+= transp_sockets.c mtab_bsd.c umount_bsd44.c SRCS+= nfs_prot_x.c CLEANFILES+= nfs_prot_x.c -CFLAGS+= -I${.CURDIR}/../../../contrib/amd/libamu +CFLAGS+= -I${.CURDIR}/../../../contrib/amd/libamu \ + -I${DESTDIR}/usr/include/rpcsvc nfs_prot_x.c: ${NFS_PROT_X} - ${RPCCOM} -c -DWANT_NFS3 ${NFS_PROT_X} -o ${.TARGET} + ${RPCCOM} -c -C -DWANT_NFS3 ${NFS_PROT_X} -o ${.TARGET} install: