Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts. * Add host tools cap_mkdb, ctags, m4, uudecode. * Protect __RCSID() and __COPYRIGHT() better. * Reduce the number of places that need to include "config.h", to keep sources closer to their "vanilla" versions. * Add more compat #defines and autoconf-checked functions.
This commit is contained in:
parent
95407c5758
commit
9fbd88883c
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: strsuftoull.c,v 1.6 2002/01/29 10:53:39 tv Exp $ */
|
||||
/* $NetBSD: strsuftoull.c,v 1.7 2002/01/31 22:43:33 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993, 1994
|
||||
|
@ -74,30 +74,25 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: strsuftoull.c,v 1.6 2002/01/29 10:53:39 tv Exp $");
|
||||
#if defined(__RCSID) && !defined(lint)
|
||||
__RCSID("$NetBSD: strsuftoull.c,v 1.7 2002/01/31 22:43:33 tv Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#define HAVE_ERR_H 1
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
|
||||
#include "strsuftoull.h"
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: stat_flags.c,v 1.12 2002/01/29 00:07:28 tv Exp $ */
|
||||
/* $NetBSD: stat_flags.c,v 1.13 2002/01/31 22:43:34 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
|
@ -33,32 +33,27 @@
|
|||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#define HAVE_FTS_H 1
|
||||
#define HAVE_STRUCT_STAT_ST_FLAGS 1
|
||||
#endif
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if defined(__RCSID) && !defined(lint)
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)stat_flags.c 8.2 (Berkeley) 7/28/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: stat_flags.c,v 1.12 2002/01/29 00:07:28 tv Exp $");
|
||||
__RCSID("$NetBSD: stat_flags.c,v 1.13 2002/01/31 22:43:34 tv Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#define HAVE_STRUCT_STAT_ST_FLAGS 1
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <fts.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
||||
#if HAVE_FTS_H
|
||||
#include <fts.h>
|
||||
#endif
|
||||
|
||||
#include "stat_flags.h"
|
||||
|
||||
#define SAPPEND(s) { \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: extern.h,v 1.29 2002/01/29 10:20:28 tv Exp $ */
|
||||
/* $NetBSD: extern.h,v 1.30 2002/01/31 22:43:35 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992 Keith Muller.
|
||||
|
@ -39,23 +39,12 @@
|
|||
* @(#)extern.h 8.2 (Berkeley) 4/18/94
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#define HAVE_ERR_H 1
|
||||
#define HAVE_FTS_H 1
|
||||
#define HAVE_STRUCT_STAT_ST_FLAGS 1
|
||||
#endif
|
||||
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* External references from each source file
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <err.h>
|
||||
|
||||
/*
|
||||
* ar_io.c
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ftree.c,v 1.16 2002/01/29 10:20:29 tv Exp $ */
|
||||
/* $NetBSD: ftree.c,v 1.17 2002/01/31 22:43:35 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992 Keith Muller.
|
||||
|
@ -74,11 +74,11 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if defined(__RCSID) && !defined(lint)
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)ftree.c 8.2 (Berkeley) 4/18/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: ftree.c,v 1.16 2002/01/29 10:20:29 tv Exp $");
|
||||
__RCSID("$NetBSD: ftree.c,v 1.17 2002/01/31 22:43:35 tv Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -86,21 +86,18 @@ __RCSID("$NetBSD: ftree.c,v 1.16 2002/01/29 10:20:29 tv Exp $");
|
|||
#include <sys/time.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/param.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <fts.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include "pax.h"
|
||||
#include "ftree.h"
|
||||
#include "extern.h"
|
||||
#include "mtree.h"
|
||||
|
||||
#if HAVE_FTS_H
|
||||
#include <fts.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* routines to interface with the fts library function.
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: getoldopt.c,v 1.13 2002/01/29 10:20:29 tv Exp $ */
|
||||
/* $NetBSD: getoldopt.c,v 1.14 2002/01/31 22:43:35 tv Exp $ */
|
||||
|
||||
/*
|
||||
* Plug-compatible replacement for getopt() for parsing tar-like
|
||||
|
@ -10,10 +10,11 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: getoldopt.c,v 1.13 2002/01/29 10:20:29 tv Exp $");
|
||||
#if defined(__RCSID) && !defined(lint)
|
||||
__RCSID("$NetBSD: getoldopt.c,v 1.14 2002/01/31 22:43:35 tv Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <getopt.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
@ -21,9 +22,6 @@ __RCSID("$NetBSD: getoldopt.c,v 1.13 2002/01/29 10:20:29 tv Exp $");
|
|||
#include "pax.h"
|
||||
#include "extern.h"
|
||||
|
||||
/* After extern.h to pull in HAVE_CONFIG_H */
|
||||
#include <getopt.h>
|
||||
|
||||
int
|
||||
getoldopt(int argc, char **argv, const char *optstring,
|
||||
struct option *longopts, int *idx)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: options.c,v 1.37 2002/01/29 10:20:29 tv Exp $ */
|
||||
/* $NetBSD: options.c,v 1.38 2002/01/31 22:43:35 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992 Keith Muller.
|
||||
|
@ -38,11 +38,11 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if defined(__RCSID) && !defined(lint)
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)options.c 8.2 (Berkeley) 4/18/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: options.c,v 1.37 2002/01/29 10:20:29 tv Exp $");
|
||||
__RCSID("$NetBSD: options.c,v 1.38 2002/01/31 22:43:35 tv Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -51,12 +51,13 @@ __RCSID("$NetBSD: options.c,v 1.37 2002/01/29 10:20:29 tv Exp $");
|
|||
#include <sys/stat.h>
|
||||
#include <sys/mtio.h>
|
||||
#include <sys/param.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <getopt.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
#include "pax.h"
|
||||
#include "options.h"
|
||||
#include "cpio.h"
|
||||
|
@ -64,9 +65,6 @@ __RCSID("$NetBSD: options.c,v 1.37 2002/01/29 10:20:29 tv Exp $");
|
|||
#include "extern.h"
|
||||
#include "mtree.h"
|
||||
|
||||
/* After extern.h to pull in HAVE_CONFIG_H */
|
||||
#include <getopt.h>
|
||||
|
||||
/*
|
||||
* Routines which handle command line options
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pax.h,v 1.12 2001/10/28 13:06:43 lukem Exp $ */
|
||||
/* $NetBSD: pax.h,v 1.13 2002/01/31 22:43:36 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992 Keith Muller.
|
||||
|
@ -39,6 +39,15 @@
|
|||
* @(#)pax.h 8.2 (Berkeley) 4/18/94
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#define HAVE_LCHMOD 1
|
||||
#define HAVE_LCHOWN 1
|
||||
#define HAVE_LUTIMES 1
|
||||
#define HAVE_STRUCT_STAT_ST_FLAGS 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
* BSD PAX global data structures and constants.
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mdsetimage.c,v 1.3 2002/01/21 19:22:53 tv Exp $ */
|
||||
/* $NetBSD: mdsetimage.c,v 1.4 2002/01/31 22:43:36 tv Exp $ */
|
||||
/* from: NetBSD: mdsetimage.c,v 1.15 2001/03/21 23:46:48 cgd Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -30,27 +30,26 @@
|
|||
* <<Id: LICENSE_GC,v 1.1 2001/10/01 23:24:05 cgd Exp>>
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#define HAVE_ERR_H 1
|
||||
#endif
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if defined(__COPYRIGHT) && !defined(lint)
|
||||
__COPYRIGHT(
|
||||
"@(#) Copyright (c) 1996 Christopher G. Demetriou.\
|
||||
All rights reserved.\n");
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: mdsetimage.c,v 1.3 2002/01/21 19:22:53 tv Exp $");
|
||||
#if defined(__RCSID) && !defined(lint)
|
||||
__RCSID("$NetBSD: mdsetimage.c,v 1.4 2002/01/31 22:43:36 tv Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <err.h>
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
|
@ -59,10 +58,6 @@ __RCSID("$NetBSD: mdsetimage.c,v 1.3 2002/01/21 19:22:53 tv Exp $");
|
|||
|
||||
#include <bfd.h>
|
||||
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
|
||||
struct symbols {
|
||||
char *name;
|
||||
bfd_vma vma;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: __fts13.c,v 1.37 2002/01/28 23:50:09 tv Exp $ */
|
||||
/* $NetBSD: __fts13.c,v 1.38 2002/01/31 22:43:36 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993, 1994
|
||||
|
@ -35,13 +35,14 @@
|
|||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#endif
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: __fts13.c,v 1.37 2002/01/28 23:50:09 tv Exp $");
|
||||
__RCSID("$NetBSD: __fts13.c,v 1.38 2002/01/31 22:43:36 tv Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -57,7 +58,6 @@ __RCSID("$NetBSD: __fts13.c,v 1.37 2002/01/28 23:50:09 tv Exp $");
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#endif /* !HAVE_CONFIG_H */
|
||||
|
||||
#ifdef __weak_alias
|
||||
#ifdef __LIBC12_SOURCE__
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: basename.c,v 1.3 2002/01/21 21:33:42 tv Exp $ */
|
||||
/* $NetBSD: basename.c,v 1.4 2002/01/31 22:43:37 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -36,23 +36,18 @@
|
|||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: basename.c,v 1.3 2002/01/21 21:33:42 tv Exp $");
|
||||
__RCSID("$NetBSD: basename.c,v 1.4 2002/01/31 22:43:37 tv Exp $");
|
||||
#endif /* !LIBC_SCCS && !lint */
|
||||
|
||||
#include "namespace.h"
|
||||
#include <libgen.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef __weak_alias
|
||||
__weak_alias(basename,_basename)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#if !HAVE_BASENAME
|
||||
char *
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dirname.c,v 1.4 2002/01/21 21:33:42 tv Exp $ */
|
||||
/* $NetBSD: dirname.c,v 1.5 2002/01/31 22:43:37 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -36,23 +36,18 @@
|
|||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: dirname.c,v 1.4 2002/01/21 21:33:42 tv Exp $");
|
||||
__RCSID("$NetBSD: dirname.c,v 1.5 2002/01/31 22:43:37 tv Exp $");
|
||||
#endif /* !LIBC_SCCS && !lint */
|
||||
|
||||
#include "namespace.h"
|
||||
#include <libgen.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef __weak_alias
|
||||
__weak_alias(dirname,_dirname)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#if !HAVE_DIRNAME
|
||||
char *
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: err.c,v 1.18 2002/01/28 23:01:43 tv Exp $ */
|
||||
/* $NetBSD: err.c,v 1.19 2002/01/31 22:43:37 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
|
@ -38,7 +38,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)err.c 8.1 (Berkeley) 6/4/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: err.c,v 1.18 2002/01/28 23:01:43 tv Exp $");
|
||||
__RCSID("$NetBSD: err.c,v 1.19 2002/01/31 22:43:37 tv Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -47,9 +47,8 @@ __RCSID("$NetBSD: err.c,v 1.18 2002/01/28 23:01:43 tv Exp $");
|
|||
#endif
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#include <err.h>
|
||||
#endif
|
||||
#include <err.h>
|
||||
|
||||
#ifdef __STDC__
|
||||
#include <stdarg.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: errx.c,v 1.6 2002/01/28 23:01:43 tv Exp $ */
|
||||
/* $NetBSD: errx.c,v 1.7 2002/01/31 22:43:37 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
|
@ -38,7 +38,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)err.c 8.1 (Berkeley) 6/4/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: errx.c,v 1.6 2002/01/28 23:01:43 tv Exp $");
|
||||
__RCSID("$NetBSD: errx.c,v 1.7 2002/01/31 22:43:37 tv Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -47,9 +47,8 @@ __RCSID("$NetBSD: errx.c,v 1.6 2002/01/28 23:01:43 tv Exp $");
|
|||
#endif
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#include <err.h>
|
||||
#endif
|
||||
#include <err.h>
|
||||
|
||||
#ifdef __STDC__
|
||||
#include <stdarg.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: unvis.c,v 1.20 2002/01/29 02:04:30 tv Exp $ */
|
||||
/* $NetBSD: unvis.c,v 1.21 2002/01/31 22:43:38 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1989, 1993
|
||||
|
@ -33,15 +33,12 @@
|
|||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)unvis.c 8.1 (Berkeley) 6/4/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: unvis.c,v 1.20 2002/01/29 02:04:30 tv Exp $");
|
||||
__RCSID("$NetBSD: unvis.c,v 1.21 2002/01/31 22:43:38 tv Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -60,9 +57,10 @@ __weak_alias(strunvis,_strunvis)
|
|||
__weak_alias(unvis,_unvis)
|
||||
#endif
|
||||
|
||||
#ifdef __warn_references
|
||||
__warn_references(unvis,
|
||||
"warning: reference to compatibility unvis(); include <vis.h> for correct reference")
|
||||
#endif /* !HAVE_CONFIG_H */
|
||||
#endif
|
||||
|
||||
#if !HAVE_VIS_H
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: verr.c,v 1.8 2002/01/28 23:01:43 tv Exp $ */
|
||||
/* $NetBSD: verr.c,v 1.9 2002/01/31 22:43:38 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
|
@ -38,7 +38,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)err.c 8.1 (Berkeley) 6/4/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: verr.c,v 1.8 2002/01/28 23:01:43 tv Exp $");
|
||||
__RCSID("$NetBSD: verr.c,v 1.9 2002/01/31 22:43:38 tv Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -47,9 +47,8 @@ __RCSID("$NetBSD: verr.c,v 1.8 2002/01/28 23:01:43 tv Exp $");
|
|||
#endif
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#include <err.h>
|
||||
#endif
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: verrx.c,v 1.8 2002/01/28 23:01:43 tv Exp $ */
|
||||
/* $NetBSD: verrx.c,v 1.9 2002/01/31 22:43:38 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
|
@ -38,7 +38,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)err.c 8.1 (Berkeley) 6/4/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: verrx.c,v 1.8 2002/01/28 23:01:43 tv Exp $");
|
||||
__RCSID("$NetBSD: verrx.c,v 1.9 2002/01/31 22:43:38 tv Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -47,9 +47,8 @@ __RCSID("$NetBSD: verrx.c,v 1.8 2002/01/28 23:01:43 tv Exp $");
|
|||
#endif
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#include <err.h>
|
||||
#endif
|
||||
#include <err.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vis.c,v 1.20 2002/01/21 21:33:42 tv Exp $ */
|
||||
/* $NetBSD: vis.c,v 1.21 2002/01/31 22:43:39 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
|
@ -34,13 +34,10 @@
|
|||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#if !defined(lint)
|
||||
__RCSID("$NetBSD: vis.c,v 1.20 2002/01/21 21:33:42 tv Exp $");
|
||||
#endif /* not lint */
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: vis.c,v 1.21 2002/01/31 22:43:39 tv Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include "namespace.h"
|
||||
#include <sys/types.h>
|
||||
|
@ -56,7 +53,6 @@ __weak_alias(strvisx,_strvisx)
|
|||
__weak_alias(svis,_svis)
|
||||
__weak_alias(vis,_vis)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !HAVE_VIS_H
|
||||
#include <ctype.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vwarn.c,v 1.8 2002/01/28 23:01:43 tv Exp $ */
|
||||
/* $NetBSD: vwarn.c,v 1.9 2002/01/31 22:43:39 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
|
@ -38,7 +38,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)err.c 8.1 (Berkeley) 6/4/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: vwarn.c,v 1.8 2002/01/28 23:01:43 tv Exp $");
|
||||
__RCSID("$NetBSD: vwarn.c,v 1.9 2002/01/31 22:43:39 tv Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -47,9 +47,8 @@ __RCSID("$NetBSD: vwarn.c,v 1.8 2002/01/28 23:01:43 tv Exp $");
|
|||
#endif
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#include <err.h>
|
||||
#endif
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vwarnx.c,v 1.8 2002/01/28 23:01:43 tv Exp $ */
|
||||
/* $NetBSD: vwarnx.c,v 1.9 2002/01/31 22:43:39 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
|
@ -38,7 +38,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)err.c 8.1 (Berkeley) 6/4/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: vwarnx.c,v 1.8 2002/01/28 23:01:43 tv Exp $");
|
||||
__RCSID("$NetBSD: vwarnx.c,v 1.9 2002/01/31 22:43:39 tv Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -47,9 +47,8 @@ __RCSID("$NetBSD: vwarnx.c,v 1.8 2002/01/28 23:01:43 tv Exp $");
|
|||
#endif
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#include <err.h>
|
||||
#endif
|
||||
#include <err.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: warn.c,v 1.6 2002/01/28 23:01:43 tv Exp $ */
|
||||
/* $NetBSD: warn.c,v 1.7 2002/01/31 22:43:39 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
|
@ -38,7 +38,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)err.c 8.1 (Berkeley) 6/4/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: warn.c,v 1.6 2002/01/28 23:01:43 tv Exp $");
|
||||
__RCSID("$NetBSD: warn.c,v 1.7 2002/01/31 22:43:39 tv Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -47,9 +47,8 @@ __RCSID("$NetBSD: warn.c,v 1.6 2002/01/28 23:01:43 tv Exp $");
|
|||
#endif
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#include <err.h>
|
||||
#endif
|
||||
#include <err.h>
|
||||
|
||||
#ifdef __STDC__
|
||||
#include <stdarg.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: warnx.c,v 1.6 2002/01/28 23:01:43 tv Exp $ */
|
||||
/* $NetBSD: warnx.c,v 1.7 2002/01/31 22:43:39 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
|
@ -38,7 +38,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)err.c 8.1 (Berkeley) 6/4/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: warnx.c,v 1.6 2002/01/28 23:01:43 tv Exp $");
|
||||
__RCSID("$NetBSD: warnx.c,v 1.7 2002/01/31 22:43:39 tv Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -47,9 +47,8 @@ __RCSID("$NetBSD: warnx.c,v 1.6 2002/01/28 23:01:43 tv Exp $");
|
|||
#endif
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#include <err.h>
|
||||
#endif
|
||||
#include <err.h>
|
||||
|
||||
#ifdef __STDC__
|
||||
#include <stdarg.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: getopt_long.c,v 1.14 2002/01/29 10:20:30 tv Exp $ */
|
||||
/* $NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -38,19 +38,20 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: getopt_long.c,v 1.14 2002/01/29 10:20:30 tv Exp $");
|
||||
__RCSID("$NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include "namespace.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <getopt.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <getopt.h>
|
||||
|
||||
#if HAVE_ERR_H || !HAVE_CONFIG_H
|
||||
#include <err.h>
|
||||
#if HAVE_CONFIG_H && !HAVE_GETOPT_LONG && !HAVE_DECL_OPTIND
|
||||
#define REPLACE_GETOPT
|
||||
#endif
|
||||
|
||||
#ifdef REPLACE_GETOPT
|
||||
|
@ -62,7 +63,7 @@ int optind = 1; /* index into parent argv vector */
|
|||
int optopt = '?'; /* character checked for validity */
|
||||
int optreset; /* reset getopt */
|
||||
char *optarg; /* argument associated with option */
|
||||
#elif HAVE_CONFIG_H
|
||||
#elif HAVE_CONFIG_H && !HAVE_DECL_OPTRESET
|
||||
static int optreset;
|
||||
#endif
|
||||
|
||||
|
@ -70,7 +71,7 @@ static int optreset;
|
|||
__weak_alias(getopt_long,_getopt_long)
|
||||
#endif
|
||||
|
||||
|
||||
#if !HAVE_GETOPT_LONG
|
||||
#define IGNORE_FIRST (*options == '-' || *options == '+')
|
||||
#define PRINT_ERROR ((opterr) && ((*options != ':') \
|
||||
|| (IGNORE_FIRST && options[1] != ':')))
|
||||
|
@ -484,3 +485,4 @@ getopt_long(nargc, nargv, options, long_options, idx)
|
|||
}
|
||||
return retval;
|
||||
}
|
||||
#endif /* !GETOPT_LONG */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: strlcat.c,v 1.10 2002/01/21 21:33:42 tv Exp $ */
|
||||
/* $NetBSD: strlcat.c,v 1.11 2002/01/31 22:43:40 tv Exp $ */
|
||||
/* $OpenBSD: strlcat.c,v 1.4 2001/01/12 22:55:23 millert Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -28,18 +28,15 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: strlcat.c,v 1.10 2002/01/21 21:33:42 tv Exp $");
|
||||
__RCSID("$NetBSD: strlcat.c,v 1.11 2002/01/31 22:43:40 tv Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include "namespace.h"
|
||||
#include <sys/types.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#if !HAVE_STRLCAT
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: strlcpy.c,v 1.8 2002/01/21 21:33:42 tv Exp $ */
|
||||
/* $NetBSD: strlcpy.c,v 1.9 2002/01/31 22:43:41 tv Exp $ */
|
||||
/* $OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -28,18 +28,15 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: strlcpy.c,v 1.8 2002/01/21 21:33:42 tv Exp $");
|
||||
__RCSID("$NetBSD: strlcpy.c,v 1.9 2002/01/31 22:43:41 tv Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include "namespace.h"
|
||||
#include <sys/types.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#if !HAVE_STRLCPY
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: strmode.c,v 1.12 2002/01/29 10:20:31 tv Exp $ */
|
||||
/* $NetBSD: strmode.c,v 1.13 2002/01/31 22:43:41 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
|
@ -33,19 +33,16 @@
|
|||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)strmode.c 8.3 (Berkeley) 8/15/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: strmode.c,v 1.12 2002/01/29 10:20:31 tv Exp $");
|
||||
__RCSID("$NetBSD: strmode.c,v 1.13 2002/01/31 22:43:41 tv Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include "namespace.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: strsep.c,v 1.12 2002/01/28 22:39:07 tv Exp $ */
|
||||
/* $NetBSD: strsep.c,v 1.13 2002/01/31 22:43:41 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
|
@ -33,15 +33,12 @@
|
|||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)strsep.c 8.1 (Berkeley) 6/4/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: strsep.c,v 1.12 2002/01/28 22:39:07 tv Exp $");
|
||||
__RCSID("$NetBSD: strsep.c,v 1.13 2002/01/31 22:43:41 tv Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -53,7 +50,6 @@ __RCSID("$NetBSD: strsep.c,v 1.12 2002/01/28 22:39:07 tv Exp $");
|
|||
#ifdef __weak_alias
|
||||
__weak_alias(strsep,_strsep)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !HAVE_STRSEP
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: makewhatis.c,v 1.20 2002/01/29 10:20:31 tv Exp $ */
|
||||
/* $NetBSD: makewhatis.c,v 1.21 2002/01/31 22:43:41 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
|
@ -36,31 +36,30 @@
|
|||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#define HAVE_ERR_H 1
|
||||
#define HAVE_FTS_H 1
|
||||
#endif
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if defined(__COPYRIGHT) && !defined(lint)
|
||||
__COPYRIGHT("@(#) Copyright (c) 1999 The NetBSD Foundation, Inc.\n\
|
||||
All rights reserved.\n");
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: makewhatis.c,v 1.20 2002/01/29 10:20:31 tv Exp $");
|
||||
#if defined(__RCSID) && !defined(lint)
|
||||
__RCSID("$NetBSD: makewhatis.c,v 1.21 2002/01/31 22:43:41 tv Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <fts.h>
|
||||
#include <locale.h>
|
||||
#include <paths.h>
|
||||
#include <signal.h>
|
||||
|
@ -70,13 +69,6 @@ __RCSID("$NetBSD: makewhatis.c,v 1.20 2002/01/29 10:20:31 tv Exp $");
|
|||
#include <unistd.h>
|
||||
#include <zlib.h>
|
||||
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
#if HAVE_FTS_H
|
||||
#include <fts.h>
|
||||
#endif
|
||||
|
||||
typedef struct manpagestruct manpage;
|
||||
struct manpagestruct {
|
||||
manpage *mp_left,*mp_right;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pack_dev.c,v 1.2 2002/01/29 00:07:28 tv Exp $ */
|
||||
/* $NetBSD: pack_dev.c,v 1.3 2002/01/31 22:43:42 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -36,28 +36,23 @@
|
|||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#define HAVE_ERR_H 1
|
||||
#endif
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: pack_dev.c,v 1.2 2002/01/29 00:07:28 tv Exp $");
|
||||
#if defined(__RCSID) && !defined(lint)
|
||||
__RCSID("$NetBSD: pack_dev.c,v 1.3 2002/01/31 22:43:42 tv Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <err.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "pack_dev.h"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: bsd.own.mk,v 1.264 2002/01/29 19:17:49 thorpej Exp $
|
||||
# $NetBSD: bsd.own.mk,v 1.265 2002/01/31 22:43:42 tv Exp $
|
||||
|
||||
.if !defined(_BSD_OWN_MK_)
|
||||
_BSD_OWN_MK_=1
|
||||
|
@ -110,9 +110,11 @@ OBJC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
|
|||
.endif
|
||||
|
||||
ASN1_COMPILE= ${TOOLDIR}/bin/nbasn1_compile
|
||||
CAP_MKDB= ${TOOLDIR}/bin/nbcap_mkdb
|
||||
COMPILE_ET= ${TOOLDIR}/bin/nbcompile_et
|
||||
CONFIG= ${TOOLDIR}/bin/nbconfig
|
||||
CRUNCHGEN= MAKE=${.MAKE:Q} ${TOOLDIR}/bin/nbcrunchgen
|
||||
CTAGS= ${TOOLDIR}/bin/nbctags
|
||||
DBSYM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-dbsym
|
||||
EQN= ${TOOLDIR}/bin/nbeqn
|
||||
GENCAT= ${TOOLDIR}/bin/nbgencat
|
||||
|
@ -125,6 +127,7 @@ INSTALL_INFO= ${TOOLDIR}/bin/nbinstall-info
|
|||
LEX= ${TOOLDIR}/bin/nblex
|
||||
LINT= CC=${CC:Q} ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-lint
|
||||
LORDER= NM=${NM:Q} ${TOOLDIR}/bin/nblorder
|
||||
M4= ${TOOLDIR}/bin/nbm4
|
||||
MAKEFS= ${TOOLDIR}/bin/nbmakefs
|
||||
MAKEINFO= ${TOOLDIR}/bin/nbmakeinfo
|
||||
MAKEWHATIS= ${TOOLDIR}/bin/nbmakewhatis
|
||||
|
@ -144,6 +147,7 @@ SPARCINSTALLBOOT=${TOOLDIR}/bin/nbsparc-installboot
|
|||
SUNLABEL= ${TOOLDIR}/bin/nbsunlabel
|
||||
TBL= ${TOOLDIR}/bin/nbtbl
|
||||
TSORT= ${TOOLDIR}/bin/nbtsort -q
|
||||
UUDECODE= ${TOOLDIR}/bin/nbuudecode
|
||||
YACC= ${TOOLDIR}/bin/nbyacc
|
||||
ZIC= ${TOOLDIR}/bin/nbzic
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# $NetBSD: Makefile,v 1.31 2002/01/29 10:20:31 tv Exp $
|
||||
# $NetBSD: Makefile,v 1.32 2002/01/31 22:43:43 tv Exp $
|
||||
|
||||
# XXX Note: NO_DBSYM and NO_MAKEFS are stopgap temporary variables for use
|
||||
# with the development of non-NetBSD hosting support. These will go away.
|
||||
# XXX Note: NO_DBSYM is a stopgap temporary variable for use
|
||||
# with the development of non-NetBSD hosting support. This will go away.
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
|
@ -10,25 +10,22 @@
|
|||
TOOLCHAIN_BITS= toolchain .WAIT ${NO_DBSYM:D:Udbsym} mdsetimage
|
||||
.endif
|
||||
|
||||
.if ${MKLINT} != "no"
|
||||
LINT_BITS= lint lint1 lint2
|
||||
.endif
|
||||
|
||||
# Dependencies in SUBDIR below ordered to maximize parallel ability.
|
||||
.if !defined(NOSUBDIR)
|
||||
SUBDIR= host-mkdep .WAIT compat .WAIT \
|
||||
binstall .WAIT \
|
||||
crunchgen gencat lorder makewhatis mkdep mtree \
|
||||
rpcgen texinfo tsort \
|
||||
${TOOLCHAIN_BITS} \
|
||||
cap_mkdb crunchgen ctags gencat lint lint2 lorder \
|
||||
m4 makewhatis mkdep mtree rpcgen tsort uudecode \
|
||||
texinfo .WAIT \
|
||||
yacc .WAIT \
|
||||
groff \
|
||||
lex .WAIT \
|
||||
${LINT_BITS} asn1_compile compile_et config \
|
||||
${NO_MAKEFS:D:Umakefs} menuc mklocale msgc pax pwd_mkdb zic
|
||||
${TOOLCHAIN_BITS} \
|
||||
asn1_compile compile_et config lint1 \
|
||||
makefs menuc mklocale msgc pax pwd_mkdb zic
|
||||
|
||||
.if ${MKMAINTAINERTOOLS:Uno} != "no"
|
||||
SUBDIR+= m4 .WAIT autoconf
|
||||
SUBDIR+= autoconf
|
||||
.endif
|
||||
|
||||
.if ${MACHINE} == sparc || ${MACHINE} == sparc64
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile.gnuhost,v 1.14 2002/01/31 02:42:25 tv Exp $
|
||||
# $NetBSD: Makefile.gnuhost,v 1.15 2002/01/31 22:43:44 tv Exp $
|
||||
#
|
||||
# Rules used when building a GNU host package. Expects MODULE to be set.
|
||||
#
|
||||
|
@ -59,7 +59,7 @@ MAKE_ARGS:= -f ${.PARSEDIR}/Makefile.gnuwrap ${MAKE_ARGS}
|
|||
MAKE_ARGS+= _NOWRAPPER=1
|
||||
.endif
|
||||
|
||||
MAKE_ARGS+= LEX=true BISON=true DESTDIR= INSTALL=${HOST_INSTALL_FILE:Q}
|
||||
MAKE_ARGS+= BISON=true DESTDIR= INSTALL=${HOST_INSTALL_FILE:Q}
|
||||
|
||||
ALL_TARGET?= all
|
||||
INSTALL_TARGET?=install
|
||||
|
@ -75,21 +75,22 @@ INSTALL_TARGET?=install
|
|||
|
||||
.build_done: .configure_done
|
||||
@(cd build && ${MAKE} ${MAKE_ARGS} ${ALL_TARGET})
|
||||
@if [ ! -f .build_done ] || \
|
||||
find build -type f -newer .build_done -print | grep '' >/dev/null; \
|
||||
@if [ ! -f $@ ] || [ -n "$$(find build -type f -newer .build_done -print)" ]; \
|
||||
then touch $@; fi
|
||||
|
||||
.install_done: ${BUILD:D.build_done}
|
||||
.if defined(UPDATE)
|
||||
@if [ ! -f .install_done ] || [ .build_done -nt .install_done ]; then \
|
||||
(cd ${.OBJDIR}/build && ${MAKE} ${MAKE_ARGS} ${INSTALL_TARGET}); \
|
||||
@cd ${.OBJDIR}; \
|
||||
if [ ! -f .install_done ] || [ ! -f .build_done ] || \
|
||||
[ -n "$$(find .build_done -prune -newer .install_done -print)" ]; then \
|
||||
(cd build && ${MAKE} ${MAKE_ARGS} ${INSTALL_TARGET}); \
|
||||
fi
|
||||
.else
|
||||
@(cd ${.OBJDIR}/build && ${MAKE} ${MAKE_ARGS} ${INSTALL_TARGET})
|
||||
.endif
|
||||
@touch $@
|
||||
|
||||
.PHONY: .build_done
|
||||
.PHONY: .build_done .install_done
|
||||
|
||||
# Mapping to standard targets.
|
||||
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
# $NetBSD: Makefile,v 1.1 2002/01/31 22:43:45 tv Exp $
|
||||
|
||||
HOSTPROGNAME= nbcap_mkdb
|
||||
HOST_SRCDIR= usr.bin/cap_mkdb
|
||||
HOST_SRCS= getcap.c
|
||||
|
||||
.include "${.CURDIR}/../Makefile.host"
|
||||
|
||||
.PATH: ${.CURDIR}/../../lib/libc/gen
|
|
@ -1,11 +1,11 @@
|
|||
# $NetBSD: Makefile,v 1.6 2002/01/29 10:20:31 tv Exp $
|
||||
# $NetBSD: Makefile,v 1.7 2002/01/31 22:43:45 tv Exp $
|
||||
|
||||
HOSTLIB= nbcompat
|
||||
|
||||
SRCS= basename.c dirname.c fgetln.c flock.c fparseln.c \
|
||||
getmode.c getopt_long.c pread.c pwcache.c pwrite.c \
|
||||
pw_scan.c setenv.c setgroupent.c setpassent.c \
|
||||
setprogname.c snprintf.c \
|
||||
getmode.c getopt_long.c libyywrap.c pread.c \
|
||||
pwcache.c pwrite.c pw_scan.c setenv.c \
|
||||
setgroupent.c setpassent.c setprogname.c snprintf.c \
|
||||
strlcat.c strlcpy.c strmode.c strsep.c unvis.c vis.c \
|
||||
_err.c _errx.c _verr.c _verrx.c _vwarn.c _vwarnx.c \
|
||||
_warn.c _warnx.c __fts13.c
|
||||
|
@ -13,16 +13,17 @@ SRCS= basename.c dirname.c fgetln.c flock.c fparseln.c \
|
|||
# -D_FILE_OFFSET_BITS=64 produces a much more amenable `struct stat', and
|
||||
# other file ops, on many systems, without changing function names.
|
||||
|
||||
CPPFLAGS+= -I. -I./include -I${.CURDIR} -DHAVE_CONFIG_H -Dlint \
|
||||
CPPFLAGS+= -I. -I./include -I${.CURDIR} -DHAVE_CONFIG_H \
|
||||
-D_FILE_OFFSET_BITS=64
|
||||
|
||||
.PATH: ${.CURDIR}/../../lib/libc/gen \
|
||||
${.CURDIR}/../../lib/libc/stdlib \
|
||||
${.CURDIR}/../../lib/libc/string \
|
||||
${.CURDIR}/../../lib/libutil \
|
||||
${.CURDIR}/../../usr.bin/lex
|
||||
|
||||
DPSRCS+= defs.mk
|
||||
CLEANFILES= config.log config.status confdefs.h includedir.stamp
|
||||
CLEANFILES= config.log config.status confdefs.h *.stamp
|
||||
|
||||
# Get components of Berkeley DB.
|
||||
_CURDIR:= ${.CURDIR}
|
||||
|
@ -32,7 +33,7 @@ _CURDIR:= ${.CURDIR}
|
|||
|
||||
SRCS:= ${SRCS:Nndbm.c}
|
||||
|
||||
defs.mk: includedir.stamp configure config.h.in defs.mk.in
|
||||
defs.mk: include.stamp configure config.h.in defs.mk.in
|
||||
CC=${HOST_CC:Q} CFLAGS=${HOST_CFLAGS:Q} LDFLAGS=${HOST_LDFLAGS:Q} \
|
||||
sh ${.CURDIR}/configure --cache-file=config.cache
|
||||
@touch $@
|
||||
|
@ -41,8 +42,8 @@ defs.mk: includedir.stamp configure config.h.in defs.mk.in
|
|||
regen:
|
||||
cd ${.CURDIR} && ${TOOLDIR}/bin/nbautoconf
|
||||
|
||||
includedir.stamp:
|
||||
mkdir -p include/sys
|
||||
include.stamp:
|
||||
mkdir -p include/sys include/machine
|
||||
@touch $@
|
||||
|
||||
cleandir: compat.clean
|
||||
|
|
|
@ -1,14 +1,30 @@
|
|||
/* $NetBSD: compat_defs.h,v 1.3 2002/01/29 10:20:31 tv Exp $ */
|
||||
/* $NetBSD: compat_defs.h,v 1.4 2002/01/31 22:43:45 tv Exp $ */
|
||||
|
||||
#ifndef __NETBSD_COMPAT_DEFS_H__
|
||||
#define __NETBSD_COMPAT_DEFS_H__
|
||||
|
||||
/* Work around some complete brain damage. */
|
||||
|
||||
/*
|
||||
* Linux: <features.h> turns on _POSIX_SOURCE by default, even though the
|
||||
* program (not the OS) should do that. Preload <features.h> to keep any
|
||||
* of this crap from being pulled in, and undefine _POSIX_SOURCE.
|
||||
*/
|
||||
|
||||
#if defined(__linux__) && HAVE_FEATURES_H
|
||||
#include <features.h>
|
||||
#endif
|
||||
|
||||
#undef _POSIX_SOURCE
|
||||
#undef _POSIX_C_SOURCE
|
||||
|
||||
/* System headers needed for (re)definitions below. */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <grp.h>
|
||||
|
@ -48,24 +64,7 @@ struct passwd;
|
|||
#define __END_DECLS
|
||||
#endif
|
||||
|
||||
/* Some things usually in BSD <sys/param.h>. */
|
||||
|
||||
#undef BIG_ENDIAN
|
||||
#undef LITTLE_ENDIAN
|
||||
#define BIG_ENDIAN 4321
|
||||
#define LITTLE_ENDIAN 1234
|
||||
|
||||
#undef BYTE_ORDER
|
||||
#if WORDS_BIGENDIAN
|
||||
#define BYTE_ORDER BIG_ENDIAN
|
||||
#else
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
||||
#endif
|
||||
|
||||
#undef MIN
|
||||
#undef MAX
|
||||
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
||||
/* Some things usually in BSD <sys/cdefs.h>. */
|
||||
|
||||
#if !defined(__attribute__) && !defined(__GNUC__)
|
||||
#define __attribute__(x)
|
||||
|
@ -97,15 +96,6 @@ struct passwd;
|
|||
# endif
|
||||
#endif
|
||||
|
||||
/* Some bits pulled from NetBSD libc. */
|
||||
|
||||
#if !HAVE_FTS_H
|
||||
#include "compat_fts.h"
|
||||
#endif
|
||||
#if !HAVE_VIS_H
|
||||
#include "compat_vis.h"
|
||||
#endif
|
||||
|
||||
/* Type substitutes. */
|
||||
|
||||
#if !HAVE_ID_T
|
||||
|
@ -126,6 +116,12 @@ int asnprintf(char **, size_t, const char *, ...);
|
|||
char *basename(char *);
|
||||
#endif
|
||||
|
||||
#if !HAVE_DECL_OPTIND
|
||||
int getopt(int, char *const *, const char *);
|
||||
extern char *optarg;
|
||||
extern int optind, opterr, optopt;
|
||||
#endif
|
||||
|
||||
#if !HAVE_DIRNAME
|
||||
char *dirname(char *);
|
||||
#endif
|
||||
|
@ -170,6 +166,18 @@ char *fparseln(FILE *, size_t *, size_t *, const char [3], int);
|
|||
#define isblank(x) ((x) == ' ' || (x) == '\t')
|
||||
#endif
|
||||
|
||||
#if !HAVE_MACHINE_BSWAP_H
|
||||
#define bswap16(x) ((((x) << 8) & 0xff00) | (((x) >> 8) & 0x00ff))
|
||||
|
||||
#define bswap32(x) ((((x) << 24) & 0xff000000) | \
|
||||
(((x) << 8) & 0x00ff0000) | \
|
||||
(((x) >> 8) & 0x0000ff00) | \
|
||||
(((x) >> 24) & 0x000000ff))
|
||||
|
||||
#define bswap64(x) (((u_int64_t)bswap32((x)) << 32) | \
|
||||
((u_int64_t)bswap32((x) >> 32)))
|
||||
#endif
|
||||
|
||||
#if !HAVE_PREAD
|
||||
ssize_t pread(int, void *, size_t, off_t);
|
||||
#endif
|
||||
|
@ -251,15 +259,59 @@ void *setmode(const char *);
|
|||
|
||||
#undef _DIAGASSERT
|
||||
#define _DIAGASSERT(x)
|
||||
|
||||
/* Heimdal expects this one. */
|
||||
|
||||
#undef RCSID
|
||||
#define RCSID(x)
|
||||
|
||||
/* Some definitions not available on all systems. */
|
||||
|
||||
#ifndef _BSD_VA_LIST_
|
||||
#define _BSD_VA_LIST_ va_list
|
||||
/* <errno.h> */
|
||||
|
||||
#ifndef EFTYPE
|
||||
#define EFTYPE EIO
|
||||
#endif
|
||||
|
||||
/* <fcntl.h> */
|
||||
|
||||
#ifndef O_EXLOCK
|
||||
#define O_EXLOCK 0
|
||||
#endif
|
||||
#ifndef O_SHLOCK
|
||||
#define O_SHLOCK 0
|
||||
#endif
|
||||
|
||||
/* <limits.h> */
|
||||
|
||||
#ifndef UID_MAX
|
||||
#define UID_MAX 32767
|
||||
#endif
|
||||
#ifndef GID_MAX
|
||||
#define GID_MAX UID_MAX
|
||||
#endif
|
||||
|
||||
#ifndef UQUAD_MAX
|
||||
#define UQUAD_MAX ((u_quad_t)-1)
|
||||
#endif
|
||||
#ifndef QUAD_MAX
|
||||
#define QUAD_MAX ((quad_t)(UQUAD_MAX >> 1))
|
||||
#endif
|
||||
#ifndef QUAD_MIN
|
||||
#define QUAD_MIN ((quad_t)(~QUAD_MAX))
|
||||
#endif
|
||||
#ifndef ULLONG_MAX
|
||||
#define ULLONG_MAX ((unsigned long long)-1)
|
||||
#endif
|
||||
#ifndef LLONG_MAX
|
||||
#define LLONG_MAX ((long long)(ULLONG_MAX >> 1))
|
||||
#endif
|
||||
#ifndef LLONG_MIN
|
||||
#define LLONG_MIN ((long long)(~LLONG_MAX))
|
||||
#endif
|
||||
|
||||
/* <paths.h> */
|
||||
|
||||
#ifndef _PATH_BSHELL
|
||||
#if defined(__sun)
|
||||
/* Sun's /bin/sh is obnoxiously broken. */
|
||||
|
@ -281,40 +333,63 @@ void *setmode(const char *);
|
|||
#define _PATH_TMP "/tmp/"
|
||||
#endif
|
||||
|
||||
#ifndef ALLPERMS
|
||||
#define ALLPERMS (S_ISUID|S_ISGID|S_ISTXT|S_IRWXU|S_IRWXG|S_IRWXO)
|
||||
/* <stdarg.h> */
|
||||
|
||||
#ifndef _BSD_VA_LIST_
|
||||
#define _BSD_VA_LIST_ va_list
|
||||
#endif
|
||||
|
||||
#ifndef EFTYPE
|
||||
#define EFTYPE EIO
|
||||
#endif
|
||||
|
||||
#ifndef UID_MAX
|
||||
#define UID_MAX 32767
|
||||
#endif
|
||||
#ifndef GID_MAX
|
||||
#define GID_MAX UID_MAX
|
||||
#endif
|
||||
/* <sys/mman.h> */
|
||||
|
||||
#ifndef MAP_FILE
|
||||
#define MAP_FILE 0
|
||||
#endif
|
||||
|
||||
/* <sys/param.h> */
|
||||
|
||||
#undef BIG_ENDIAN
|
||||
#undef LITTLE_ENDIAN
|
||||
#define BIG_ENDIAN 4321
|
||||
#define LITTLE_ENDIAN 1234
|
||||
|
||||
#undef BYTE_ORDER
|
||||
#if WORDS_BIGENDIAN
|
||||
#define BYTE_ORDER BIG_ENDIAN
|
||||
#else
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
||||
#endif
|
||||
|
||||
#undef MIN
|
||||
#undef MAX
|
||||
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
||||
|
||||
#ifndef MAXBSIZE
|
||||
#define MAXBSIZE (64 * 1024)
|
||||
#endif
|
||||
|
||||
#ifndef O_EXLOCK
|
||||
#define O_EXLOCK 0
|
||||
#ifndef MAXFRAG
|
||||
#define MAXFRAG 8
|
||||
#endif
|
||||
#ifndef O_SHLOCK
|
||||
#define O_SHLOCK 0
|
||||
#ifndef MAXPHYS
|
||||
#define MAXPHYS (64 * 1024)
|
||||
#endif
|
||||
|
||||
#ifndef QUAD_MAX
|
||||
#define QUAD_MAX ((quad_t)(((u_quad_t)-1) >> 1))
|
||||
/* XXX needed by makefs; this should be done in a better way */
|
||||
#undef btodb
|
||||
#define btodb(x) ((x) << 9)
|
||||
|
||||
#ifndef powerof2
|
||||
#define powerof2(x) ((((x)-1)&(x))==0)
|
||||
#endif
|
||||
|
||||
/* <sys/stat.h> */
|
||||
|
||||
#ifndef ALLPERMS
|
||||
#define ALLPERMS (S_ISUID|S_ISGID|S_ISTXT|S_IRWXU|S_IRWXG|S_IRWXO)
|
||||
#endif
|
||||
#ifndef DEFFILEMODE
|
||||
#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
|
||||
#endif
|
||||
#ifndef S_ISTXT
|
||||
#ifdef S_ISVTX
|
||||
#define S_ISTXT S_ISVTX
|
||||
|
@ -323,4 +398,44 @@ void *setmode(const char *);
|
|||
#endif
|
||||
#endif
|
||||
|
||||
/* <sys/time.h> */
|
||||
|
||||
#ifndef timercmp
|
||||
#define timercmp(tvp, uvp, cmp) \
|
||||
(((tvp)->tv_sec == (uvp)->tv_sec) ? \
|
||||
((tvp)->tv_usec cmp (uvp)->tv_usec) : \
|
||||
((tvp)->tv_sec cmp (uvp)->tv_sec))
|
||||
#endif
|
||||
#ifndef timeradd
|
||||
#define timeradd(tvp, uvp, vvp) \
|
||||
do { \
|
||||
(vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \
|
||||
(vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \
|
||||
if ((vvp)->tv_usec >= 1000000) { \
|
||||
(vvp)->tv_sec++; \
|
||||
(vvp)->tv_usec -= 1000000; \
|
||||
} \
|
||||
} while (/* CONSTCOND */ 0)
|
||||
#endif
|
||||
#ifndef timersub
|
||||
#define timersub(tvp, uvp, vvp) \
|
||||
do { \
|
||||
(vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \
|
||||
(vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \
|
||||
if ((vvp)->tv_usec < 0) { \
|
||||
(vvp)->tv_sec--; \
|
||||
(vvp)->tv_usec += 1000000; \
|
||||
} \
|
||||
} while (/* CONSTCOND */ 0)
|
||||
#endif
|
||||
|
||||
/* <sys/types.h> */
|
||||
|
||||
#if !HAVE_U_QUAD_T
|
||||
/* #define, not typedef, as quad_t exists as a struct on some systems */
|
||||
#define quad_t long long
|
||||
#define u_quad_t unsigned long long
|
||||
#define strtouq strtoull
|
||||
#endif
|
||||
|
||||
#endif /* !__NETBSD_COMPAT_DEFS_H__ */
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
/* $NetBSD: compat_fts.h,v 1.1 2002/01/29 10:20:31 tv Exp $ */
|
||||
|
||||
#include "../../include/fts.h"
|
|
@ -1,3 +0,0 @@
|
|||
/* $NetBSD: compat_vis.h,v 1.2 2002/01/29 10:20:32 tv Exp $ */
|
||||
|
||||
#include "../../include/vis.h"
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: config.h.in,v 1.8 2002/01/29 10:20:32 tv Exp $ */
|
||||
/* $NetBSD: config.h.in,v 1.9 2002/01/31 22:43:47 tv Exp $ */
|
||||
|
||||
#ifndef __NETBSD_COMPAT_CONFIG_H__
|
||||
#define __NETBSD_COMPAT_CONFIG_H__
|
||||
|
@ -7,11 +7,13 @@
|
|||
|
||||
#undef HAVE_DIRENT_H
|
||||
#undef HAVE_ERR_H
|
||||
#undef HAVE_FEATURES_H
|
||||
#undef HAVE_FTS_H
|
||||
#undef HAVE_INTTYPES_H
|
||||
#undef HAVE_LIBGEN_H
|
||||
#undef HAVE_NDIR_H
|
||||
#undef HAVE_NETDB_H
|
||||
#undef HAVE_MACHINE_BSWAP_H
|
||||
#undef HAVE_MALLOC_H
|
||||
#undef HAVE_STDDEF_H
|
||||
#undef HAVE_STRING_H
|
||||
|
@ -19,28 +21,36 @@
|
|||
#undef HAVE_SYS_NDIR_H
|
||||
#undef HAVE_SYS_SYSMACROS_H
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
#undef HAVE_UTIL_H
|
||||
#undef HAVE_UNISTD_H
|
||||
#undef HAVE_VIS_H
|
||||
#undef STDC_HEADERS
|
||||
|
||||
#undef HAVE_ID_T
|
||||
#undef HAVE_LONG_LONG
|
||||
#undef HAVE_U_QUAD_T
|
||||
|
||||
#undef HAVE_DIR_DD_FD
|
||||
#undef HAVE_STRUCT_STAT_ST_FLAGS
|
||||
#undef HAVE_STRUCT_STAT_ST_GEN
|
||||
#undef HAVE_STRUCT_STAT_ST_MTIMENSEC
|
||||
#undef HAVE_STRUCT_STATFS_F_IOSIZE
|
||||
|
||||
#undef HAVE_DECL_OPTIND
|
||||
#undef HAVE_DECL_OPTRESET
|
||||
#undef HAVE_DECL_SYS_SIGNAME
|
||||
|
||||
#undef HAVE_ASPRINTF
|
||||
#undef HAVE_ASNPRINTF
|
||||
#undef HAVE_BASENAME
|
||||
#undef HAVE_CGETNEXT
|
||||
#undef HAVE_DIRFD
|
||||
#undef HAVE_DIRNAME
|
||||
#undef HAVE_FGETLN
|
||||
#undef HAVE_FLOCK
|
||||
#undef HAVE_FPARSELN
|
||||
#undef HAVE_FUTIMES
|
||||
#undef HAVE_GETOPT
|
||||
#undef HAVE_GETOPT_LONG
|
||||
#undef HAVE_ISBLANK
|
||||
#undef HAVE_LCHMOD
|
||||
#undef HAVE_LCHOWN
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: configure.ac,v 1.6 2002/01/29 10:20:32 tv Exp $
|
||||
# $NetBSD: configure.ac,v 1.7 2002/01/31 22:43:48 tv Exp $
|
||||
#
|
||||
# Autoconf definition file for libnbcompat.
|
||||
#
|
||||
|
@ -22,7 +22,7 @@ AC_CHECK_LIB(z, gzdopen,,
|
|||
# These are not necessarily required by the code, but they are not
|
||||
# currently conditionalized.
|
||||
AC_CHECK_HEADERS(sys/ioctl.h sys/mman.h sys/mtio.h sys/param.h \
|
||||
sys/stat.h sys/types.h sys/utsname.h sys/wait.h \
|
||||
sys/stat.h sys/time.h sys/types.h sys/utsname.h sys/wait.h \
|
||||
assert.h ctype.h errno.h fcntl.h grp.h limits.h locale.h \
|
||||
netdb.h pwd.h signal.h stdarg.h stdio.h stdlib.h string.h \
|
||||
unistd.h,,
|
||||
|
@ -30,14 +30,15 @@ AC_CHECK_HEADERS(sys/ioctl.h sys/mman.h sys/mtio.h sys/param.h \
|
|||
|
||||
# Find headers that may not be available.
|
||||
AC_HEADER_DIRENT
|
||||
AC_CHECK_HEADERS(sys/sysmacros.h \
|
||||
err.h fts.h inttypes.h libgen.h malloc.h stddef.h stdint.h util.h vis.h)
|
||||
AC_CHECK_HEADERS(sys/cdefs.h sys/featuretest.h paths.h,,
|
||||
[touch include/$ac_header])
|
||||
AC_CHECK_HEADERS(sys/sysmacros.h features.h inttypes.h malloc.h stddef.h stdint.h)
|
||||
AC_CHECK_HEADERS(machine/bswap.h sys/cdefs.h sys/featuretest.h \
|
||||
err.h libgen.h paths.h util.h,, [touch include/$ac_header])
|
||||
AC_CHECK_HEADERS(fts.h getopt.h vis.h,,
|
||||
[echo '#include "'$srcdir/../../include/$ac_header'"' >include/$ac_header])
|
||||
|
||||
# Typedefs.
|
||||
AC_TYPE_SIZE_T
|
||||
AC_CHECK_TYPES([id_t, long long])
|
||||
AC_CHECK_TYPES([id_t, long long, u_quad_t])
|
||||
|
||||
define([NB_CHECK_INTTYPE], [
|
||||
AC_CHECK_TYPE(u_int][$1][_t,, [
|
||||
|
@ -53,16 +54,24 @@ NB_CHECK_INTTYPE(32)
|
|||
NB_CHECK_INTTYPE(64)
|
||||
|
||||
# Struct members.
|
||||
AC_CHECK_MEMBERS(struct stat.st_flags,,, [#include <sys/stat.h>])
|
||||
AC_CHECK_MEMBERS(DIR.dd_fd,,, [#include <dirent.h>])
|
||||
AC_CHECK_MEMBERS([struct stat.st_flags, struct stat.st_gen,
|
||||
struct stat.st_mtimensec],,, [#include <sys/stat.h>])
|
||||
AC_CHECK_MEMBERS(struct statfs.f_iosize,,, [#include <sys/mount.h>])
|
||||
|
||||
# Global variable decls.
|
||||
AC_CHECK_DECLS([optind, optreset],,, [
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
])
|
||||
AC_CHECK_DECLS(sys_signame,,, [#include <signal.h>])
|
||||
|
||||
# Library functions (where a .h check isn't enough).
|
||||
AC_SEARCH_LIBS(fparseln, util)
|
||||
AC_CHECK_FUNCS(asprintf asnprintf basename dirfd dirname \
|
||||
fgetln flock fparseln futimes isblank lchmod lchown lutimes pread pwcache_userdb \
|
||||
fgetln flock fparseln futimes getopt getopt_long \
|
||||
isblank lchmod lchown lutimes pread pwcache_userdb \
|
||||
pwrite setenv setgroupent setpassent setprogname \
|
||||
snprintf strlcat strlcpy strsep vasprintf vasnprintf vsnprintf)
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
# $NetBSD: defs.mk.in,v 1.3 2002/01/29 10:20:32 tv Exp $
|
||||
# $NetBSD: defs.mk.in,v 1.4 2002/01/31 22:43:48 tv Exp $
|
||||
|
||||
COMPATOBJ:= ${.PARSEDIR}
|
||||
HOSTEXEEXT= @EXEEXT@
|
||||
|
||||
HOST_CPPFLAGS+= -I${COMPATOBJ} -I${COMPATOBJ}/include \
|
||||
-I${.CURDIR}/../compat -DHAVE_CONFIG_H -Dlint \
|
||||
-I${.CURDIR}/../compat -DHAVE_CONFIG_H \
|
||||
-D_FILE_OFFSET_BITS=64
|
||||
|
||||
DPADD+= ${COMPATOBJ}/libnbcompat.a
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
/* $NetBSD: getopt.h,v 1.1 2002/01/29 10:20:32 tv Exp $ */
|
||||
|
||||
#include "../../include/getopt.h"
|
|
@ -0,0 +1,11 @@
|
|||
#! /bin/sh
|
||||
#
|
||||
# $NetBSD: mktemp,v 1.1 2002/01/31 22:43:50 tv Exp $
|
||||
#
|
||||
# A script that pretends to act like a stripped-down version of mktemp(1).
|
||||
# This is used by lorder.sh, and possibly other script-based host tools.
|
||||
# This version simply replaces the X's with mktemp's pid ($$).
|
||||
|
||||
fname=`echo $1 | sed 's,XX*$,'$$','`
|
||||
touch $fname || exit 1
|
||||
echo $fname
|
|
@ -0,0 +1,3 @@
|
|||
/* $NetBSD: tzfile.h,v 1.1 2002/01/31 22:43:49 tv Exp $ */
|
||||
|
||||
#include "../../include/tzfile.h"
|
|
@ -0,0 +1,6 @@
|
|||
# $NetBSD: Makefile,v 1.1 2002/01/31 22:43:51 tv Exp $
|
||||
|
||||
HOSTPROGNAME= nbctags
|
||||
HOST_SRCDIR= usr.bin/ctags
|
||||
|
||||
.include "${.CURDIR}/../Makefile.host"
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.11 2002/01/31 15:24:36 tv Exp $
|
||||
# $NetBSD: Makefile,v 1.12 2002/01/31 22:43:51 tv Exp $
|
||||
|
||||
MODULE= groff
|
||||
|
||||
|
@ -39,8 +39,18 @@ ${TMACDIR}/tmac.an.old: ${DIST}/tmac/tmac.an _installtmac
|
|||
afterinstall: ${TMACDIR}/tmac.an
|
||||
${TMACDIR}/tmac.an: ${TMACDIR}/tmac.andoc _installtmac
|
||||
|
||||
# The silly walk below is because sometimes the files begin with "g",
|
||||
# and sometimes not, depending on what the host tool has at build time.
|
||||
|
||||
afterinstall: install.grofflinks
|
||||
install.grofflinks:
|
||||
.for F in eqn groff indxbib pic refer soelim tbl
|
||||
afterinstall: ${TOOLDIR}/bin/nb${F}
|
||||
@cd ${.CURDIR} && ${MAKE} ${TOOLDIR}/bin/nb${F}
|
||||
|
||||
.if exists(${TOOLDIR}/lib/groff/g${F})
|
||||
${TOOLDIR}/bin/nb${F}: ${TOOLDIR}/lib/groff/g${F}
|
||||
.else
|
||||
${TOOLDIR}/bin/nb${F}: ${TOOLDIR}/lib/groff/${F}
|
||||
.endif
|
||||
ln -f ${.ALLSRC} ${.TARGET}
|
||||
.endfor
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
# $NetBSD: Makefile,v 1.2 2002/01/10 05:03:45 lukem Exp $
|
||||
# $NetBSD: Makefile,v 1.3 2002/01/31 22:43:51 tv Exp $
|
||||
|
||||
HOSTPROGNAME= nbmakefs
|
||||
HOST_SRCDIR= usr.sbin/makefs
|
||||
|
||||
.include "${.CURDIR}/../Makefile.host"
|
||||
|
||||
DPSRCS+= ufs.stamp
|
||||
HOST_CPPFLAGS+= -I.
|
||||
CLEANFILES+= ufs
|
||||
|
||||
${SRCS}: ufs
|
||||
|
||||
ufs:
|
||||
ln -fs ${.CURDIR}/../../sys/ufs
|
||||
.include "${.CURDIR}/../Makefile.host"
|
||||
|
||||
ufs.stamp:
|
||||
-rm -f ufs
|
||||
ln -fs ${.CURDIR}/../../sys/ufs ufs
|
||||
@touch $@
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
# $NetBSD: Makefile,v 1.1 2002/01/31 22:43:52 tv Exp $
|
||||
|
||||
HOSTPROGNAME= nbuudecode
|
||||
HOST_SRCDIR= usr.bin/uudecode
|
||||
|
||||
.include "${.CURDIR}/../Makefile.host"
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ctags.h,v 1.4 2001/05/03 22:25:00 ross Exp $ */
|
||||
/* $NetBSD: ctags.h,v 1.5 2002/01/31 22:43:52 tv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1987, 1993, 1994
|
||||
|
@ -35,6 +35,10 @@
|
|||
* @(#)ctags.h 8.3 (Berkeley) 4/2/94
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define bool char
|
||||
|
||||
#define YES 1
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: apprentice.c,v 1.26 2001/09/09 10:46:36 pooka Exp $ */
|
||||
/* $NetBSD: apprentice.c,v 1.27 2002/01/31 22:43:53 tv Exp $ */
|
||||
|
||||
/*
|
||||
* apprentice - make one pass through /etc/magic, learning its secrets.
|
||||
|
@ -45,11 +45,11 @@
|
|||
#endif
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if defined(__RCSID) && !defined(lint)
|
||||
#if 0
|
||||
FILE_RCSID("@(#)Id: apprentice.c,v 1.44 2001/08/01 14:03:19 christos Exp ")
|
||||
#else
|
||||
__RCSID("$NetBSD: apprentice.c,v 1.26 2001/09/09 10:46:36 pooka Exp $");
|
||||
__RCSID("$NetBSD: apprentice.c,v 1.27 2002/01/31 22:43:53 tv Exp $");
|
||||
#endif
|
||||
#endif /* lint */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: print.c,v 1.21 2001/09/09 10:46:36 pooka Exp $ */
|
||||
/* $NetBSD: print.c,v 1.22 2002/01/31 22:43:53 tv Exp $ */
|
||||
|
||||
/*
|
||||
* print.c - debugging printout routines
|
||||
|
@ -43,11 +43,11 @@
|
|||
#include <time.h>
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if defined(__RCSID) && !defined(lint)
|
||||
#if 0
|
||||
FILE_RCSID("@(#)Id: print.c,v 1.34 2001/08/07 16:01:26 christos Exp ")
|
||||
#else
|
||||
__RCSID("$NetBSD: print.c,v 1.21 2001/09/09 10:46:36 pooka Exp $");
|
||||
__RCSID("$NetBSD: print.c,v 1.22 2002/01/31 22:43:53 tv Exp $");
|
||||
#endif
|
||||
#endif /* lint */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: gencat.c,v 1.13 2002/01/29 10:20:34 tv Exp $ */
|
||||
/* $NetBSD: gencat.c,v 1.14 2002/01/31 22:43:54 tv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -37,8 +37,8 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: gencat.c,v 1.13 2002/01/29 10:20:34 tv Exp $");
|
||||
#if defined(__RCSID) && !defined(lint)
|
||||
__RCSID("$NetBSD: gencat.c,v 1.14 2002/01/31 22:43:54 tv Exp $");
|
||||
#endif
|
||||
|
||||
/***********************************************************
|
||||
|
@ -75,14 +75,13 @@ up-to-date. Many thanks.
|
|||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#define HAVE_ERR_H 1
|
||||
#endif
|
||||
|
||||
#define _NLS_PRIVATE
|
||||
|
||||
#include <sys/queue.h>
|
||||
#include <ctype.h>
|
||||
#include <err.h>
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
#include <nl_types.h>
|
||||
|
@ -91,8 +90,11 @@ up-to-date. Many thanks.
|
|||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#ifndef NL_SETMAX
|
||||
#define NL_SETMAX 255
|
||||
#endif
|
||||
#ifndef NL_MSGMAX
|
||||
#define NL_MSGMAX 2048
|
||||
#endif
|
||||
|
||||
struct _msgT {
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
/* libyywrap - flex run-time support library "yywrap" function */
|
||||
|
||||
/* $NetBSD: libyywrap.c,v 1.5 1998/01/05 05:15:54 perry Exp $ */
|
||||
/* $NetBSD: libyywrap.c,v 1.6 2002/01/31 22:43:54 tv Exp $ */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
int yywrap __P((void));
|
||||
|
||||
int
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: extern.h,v 1.9 2002/01/21 21:49:57 tv Exp $ */
|
||||
/* $NetBSD: extern.h,v 1.10 2002/01/31 22:43:55 tv Exp $ */
|
||||
/* $OpenBSD: extern.h,v 1.28 2001/10/10 18:12:00 espie Exp $ */
|
||||
|
||||
/*-
|
||||
|
@ -39,16 +39,11 @@
|
|||
* @(#)extern.h 8.1 (Berkeley) 6/6/93
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#define HAVE_ERR_H 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
/* eval.c */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.9 2001/11/12 20:30:43 tv Exp $
|
||||
# $NetBSD: Makefile,v 1.10 2002/01/31 22:43:55 tv Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
|
@ -7,14 +7,14 @@ SRCS= main.c parse.y scan.l avl.c mdb.c util.c
|
|||
CPPFLAGS+= -I. -I${.CURDIR}
|
||||
YHEADER=
|
||||
|
||||
LDADD+= -ll
|
||||
DPADD+= ${LIBL}
|
||||
|
||||
.if ${MKSHARE} != "no"
|
||||
FILES= menu_sys.def
|
||||
FILESDIR= /usr/share/misc
|
||||
.endif
|
||||
|
||||
.ifndef HOSTPROG
|
||||
LDADD+= -ll
|
||||
DPADD+= ${LIBL}
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
.endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mkdep.c,v 1.9 2002/01/21 19:25:00 tv Exp $ */
|
||||
/* $NetBSD: mkdep.c,v 1.10 2002/01/31 22:43:55 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
|
@ -36,25 +36,24 @@
|
|||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#define HAVE_ERR_H 1
|
||||
#endif
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if defined(__COPYRIGHT) && !defined(lint)
|
||||
__COPYRIGHT("@(#) Copyright (c) 1999 The NetBSD Foundation, Inc.\n\
|
||||
All rights reserved.\n");
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: mkdep.c,v 1.9 2002/01/21 19:25:00 tv Exp $");
|
||||
#if defined(__RCSID) && !defined(lint)
|
||||
__RCSID("$NetBSD: mkdep.c,v 1.10 2002/01/31 22:43:55 tv Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/wait.h>
|
||||
#include <ctype.h>
|
||||
#include <err.h>
|
||||
#include <locale.h>
|
||||
#include <paths.h>
|
||||
#include <stdio.h>
|
||||
|
@ -62,10 +61,6 @@ __RCSID("$NetBSD: mkdep.c,v 1.9 2002/01/21 19:25:00 tv Exp $");
|
|||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
|
||||
#define DEFAULT_CC "cc"
|
||||
#define DEFAULT_PATH _PATH_DEFPATH
|
||||
#define DEFAULT_FILENAME ".depend"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: yacc.y,v 1.7 2002/01/29 10:20:35 tv Exp $ */
|
||||
/* $NetBSD: yacc.y,v 1.8 2002/01/31 22:43:56 tv Exp $ */
|
||||
|
||||
%{
|
||||
/*-
|
||||
|
@ -39,8 +39,6 @@
|
|||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#define HAVE_ERR_H 1
|
||||
#endif
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
@ -49,11 +47,12 @@
|
|||
static char sccsid[] = "@(#)yacc.y 8.1 (Berkeley) 6/6/93";
|
||||
static char rcsid[] = "$FreeBSD$";
|
||||
#else
|
||||
__RCSID("$NetBSD: yacc.y,v 1.7 2002/01/29 10:20:35 tv Exp $");
|
||||
__RCSID("$NetBSD: yacc.y,v 1.8 2002/01/31 22:43:56 tv Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <ctype.h>
|
||||
#include <err.h>
|
||||
#if !defined(__FreeBSD__)
|
||||
#define _BSD_RUNE_T_ int
|
||||
#define _BSD_CT_RUNE_T_ rune_t
|
||||
|
@ -69,10 +68,6 @@ __RCSID("$NetBSD: yacc.y,v 1.7 2002/01/29 10:20:35 tv Exp $");
|
|||
|
||||
#include "ldef.h"
|
||||
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
|
||||
const char *locale_file = "<stdout>";
|
||||
|
||||
rune_map maplower = { { 0, }, };
|
||||
|
@ -260,7 +255,7 @@ map : LBRK RUNE RUNE RBRK
|
|||
%%
|
||||
|
||||
int debug = 0;
|
||||
FILE *fp = stdout;
|
||||
FILE *ofile;
|
||||
|
||||
int
|
||||
main(ac, av)
|
||||
|
@ -279,7 +274,7 @@ main(ac, av)
|
|||
break;
|
||||
case 'o':
|
||||
locale_file = optarg;
|
||||
if ((fp = fopen(locale_file, "w")) == 0)
|
||||
if ((ofile = fopen(locale_file, "w")) == 0)
|
||||
err(1, "unable to open output file %s", locale_file);
|
||||
break;
|
||||
default:
|
||||
|
@ -610,6 +605,7 @@ dump_tables()
|
|||
int x, n;
|
||||
rune_list *list;
|
||||
_FileRuneLocale file_new_locale;
|
||||
FILE *fp = (ofile ? ofile : stdout);
|
||||
|
||||
memset(&file_new_locale, 0, sizeof(file_new_locale));
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.10 2001/11/12 20:26:55 tv Exp $
|
||||
# $NetBSD: Makefile,v 1.11 2002/01/31 22:43:56 tv Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
|
@ -8,9 +8,6 @@ SRCS= msgmain.c msgparse.y msgscan.l msgdb.c util.c avl.c
|
|||
CPPFLAGS+= -I. -I${.CURDIR}
|
||||
YHEADER=
|
||||
|
||||
LDADD+= -ll
|
||||
DPADD+= ${LIBL}
|
||||
|
||||
MLINKS+= msgc.1 msg_window.1 \
|
||||
msgc.1 msg_window.1 \
|
||||
msgc.1 msg_string.1 \
|
||||
|
@ -30,5 +27,8 @@ FILESDIR= /usr/share/misc
|
|||
.endif
|
||||
|
||||
.ifndef HOSTPROG
|
||||
LDADD+= -ll
|
||||
DPADD+= ${LIBL}
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
.endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rpc_cout.c,v 1.18 2002/01/29 10:20:35 tv Exp $ */
|
||||
/* $NetBSD: rpc_cout.c,v 1.19 2002/01/31 22:43:57 tv Exp $ */
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
* unrestricted use provided that this legend is included on all tape
|
||||
|
@ -30,29 +30,26 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if defined(__RCSID) && !defined(lint)
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)rpc_cout.c 1.13 89/02/22 (C) 1987 SMI";
|
||||
#else
|
||||
__RCSID("$NetBSD: rpc_cout.c,v 1.18 2002/01/29 10:20:35 tv Exp $");
|
||||
__RCSID("$NetBSD: rpc_cout.c,v 1.19 2002/01/31 22:43:57 tv Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* rpc_cout.c, XDR routine outputter for the RPC protocol compiler
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <err.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "rpc_scan.h"
|
||||
#include "rpc_parse.h"
|
||||
#include "rpc_util.h"
|
||||
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
|
||||
static int findtype __P((definition *, char *));
|
||||
static int undefined __P((char *));
|
||||
static void print_generic_header __P((char *, int));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rpc_hout.c,v 1.16 2002/01/29 10:20:36 tv Exp $ */
|
||||
/* $NetBSD: rpc_hout.c,v 1.17 2002/01/31 22:43:57 tv Exp $ */
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
* unrestricted use provided that this legend is included on all tape
|
||||
|
@ -30,27 +30,24 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if defined(__RCSID) && !defined(lint)
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)rpc_hout.c 1.12 89/02/22 (C) 1987 SMI";
|
||||
#else
|
||||
__RCSID("$NetBSD: rpc_hout.c,v 1.16 2002/01/29 10:20:36 tv Exp $");
|
||||
__RCSID("$NetBSD: rpc_hout.c,v 1.17 2002/01/31 22:43:57 tv Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* rpc_hout.c, Header file outputter for the RPC protocol compiler
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <err.h>
|
||||
#include <stdio.h>
|
||||
#include "rpc_scan.h"
|
||||
#include "rpc_parse.h"
|
||||
#include "rpc_util.h"
|
||||
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
|
||||
static void pconstdef __P((definition *));
|
||||
static void pargdef __P((definition *));
|
||||
static void pstructdef __P((definition *));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rpc_main.c,v 1.21 2002/01/29 10:20:36 tv Exp $ */
|
||||
/* $NetBSD: rpc_main.c,v 1.22 2002/01/31 22:43:57 tv Exp $ */
|
||||
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
|
@ -31,11 +31,11 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if defined(__RCSID) && !defined(lint)
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)rpc_main.c 1.30 89/03/30 (C) 1987 SMI";
|
||||
#else
|
||||
__RCSID("$NetBSD: rpc_main.c,v 1.21 2002/01/29 10:20:36 tv Exp $");
|
||||
__RCSID("$NetBSD: rpc_main.c,v 1.22 2002/01/31 22:43:57 tv Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -45,29 +45,20 @@ __RCSID("$NetBSD: rpc_main.c,v 1.21 2002/01/29 10:20:36 tv Exp $");
|
|||
|
||||
#define RPCGEN_VERSION "199506"/* This program's version (year & month) */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/stat.h>
|
||||
#include <ctype.h>
|
||||
#include <err.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef __TURBOC__
|
||||
#define MAXPATHLEN 80
|
||||
#include <process.h>
|
||||
#include <dir.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/file.h>
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
#include "rpc_scan.h"
|
||||
#include "rpc_parse.h"
|
||||
#include "rpc_util.h"
|
||||
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
|
||||
#define EXTEND 1 /* alias for TRUE */
|
||||
#define DONT_EXTEND 0 /* alias for FALSE */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rpc_scan.h,v 1.5 2002/01/29 10:20:36 tv Exp $ */
|
||||
/* $NetBSD: rpc_scan.h,v 1.6 2002/01/31 22:43:58 tv Exp $ */
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
* unrestricted use provided that this legend is included on all tape
|
||||
|
@ -33,8 +33,6 @@
|
|||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#define HAVE_ERR_H 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tsort.c,v 1.16 2002/01/21 19:24:08 tv Exp $ */
|
||||
/* $NetBSD: tsort.c,v 1.17 2002/01/31 22:43:58 tv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993, 1994
|
||||
|
@ -36,28 +36,27 @@
|
|||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#define HAVE_ERR_H 1
|
||||
#endif
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if defined(__COPYRIGHT) && !defined(lint)
|
||||
__COPYRIGHT("@(#) Copyright (c) 1989, 1993, 1994\n\
|
||||
The Regents of the University of California. All rights reserved.\n");
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef lint
|
||||
#if defined(__RCSID) && !defined(lint)
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)tsort.c 8.3 (Berkeley) 5/4/95";
|
||||
#endif
|
||||
__RCSID("$NetBSD: tsort.c,v 1.16 2002/01/21 19:24:08 tv Exp $");
|
||||
__RCSID("$NetBSD: tsort.c,v 1.17 2002/01/31 22:43:58 tv Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <ctype.h>
|
||||
#include <db.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
|
@ -65,10 +64,6 @@ __RCSID("$NetBSD: tsort.c,v 1.16 2002/01/21 19:24:08 tv Exp $");
|
|||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Topological sort. Input is a list of pairs of strings separated by
|
||||
* white space (spaces, tabs, and/or newlines); strings are written to
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: xinstall.c,v 1.66 2002/01/28 19:44:03 tv Exp $ */
|
||||
/* $NetBSD: xinstall.c,v 1.67 2002/01/31 22:43:59 tv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1987, 1993
|
||||
|
@ -36,24 +36,21 @@
|
|||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#define HAVE_ERR_H 1
|
||||
#define HAVE_FUTIMES 1
|
||||
#define HAVE_LIBGEN_H 1
|
||||
#define HAVE_STRUCT_STAT_ST_FLAGS 1
|
||||
#define HAVE_VIS_H 1
|
||||
#endif
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if defined(__COPYRIGHT) && !defined(lint)
|
||||
__COPYRIGHT("@(#) Copyright (c) 1987, 1993\n\
|
||||
The Regents of the University of California. All rights reserved.\n");
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef lint
|
||||
#if defined(__RCSID) && !defined(lint)
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)xinstall.c 8.1 (Berkeley) 7/21/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: xinstall.c,v 1.66 2002/01/28 19:44:03 tv Exp $");
|
||||
__RCSID("$NetBSD: xinstall.c,v 1.67 2002/01/31 22:43:59 tv Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -63,25 +60,18 @@ __RCSID("$NetBSD: xinstall.c,v 1.66 2002/01/28 19:44:03 tv Exp $");
|
|||
#include <sys/wait.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <grp.h>
|
||||
#include <libgen.h>
|
||||
#include <paths.h>
|
||||
#include <pwd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
#if HAVE_LIBGEN_H
|
||||
#include <libgen.h>
|
||||
#endif
|
||||
#if HAVE_VIS_H
|
||||
#include <vis.h>
|
||||
#endif
|
||||
|
||||
#include "pathnames.h"
|
||||
#include "stat_flags.h"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: lint.h,v 1.2 2002/01/21 19:49:51 tv Exp $ */
|
||||
/* $NetBSD: lint.h,v 1.3 2002/01/31 22:44:00 tv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Jochen Pohl
|
||||
|
@ -34,17 +34,13 @@
|
|||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#define HAVE_ERR_H 1
|
||||
#define HAVE_DECL_SYS_SIGNAME 1
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
|
||||
#include "param.h"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.23 2002/01/18 21:01:39 thorpej Exp $
|
||||
# $NetBSD: Makefile,v 1.24 2002/01/31 22:44:00 tv Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
|
@ -6,8 +6,6 @@ PROG= lint1
|
|||
SRCS= cgram.y scan.l mem1.c mem.c err.c main1.c decl.c tree.c func.c \
|
||||
init.c emit.c emit1.c inittyp.c
|
||||
MAN= lint.7
|
||||
LDADD+= -ll
|
||||
DPADD+= ${LIBL}
|
||||
YHEADER=
|
||||
|
||||
CPPFLAGS+= -I${.CURDIR} -I.
|
||||
|
@ -41,5 +39,8 @@ ${MAN}: makeman ${LINT1:C/^\.\///} Makefile
|
|||
sh ${.ALLSRC:M*makeman} ${LINT1} -m >${.TARGET}
|
||||
|
||||
.ifndef HOSTPROG
|
||||
LDADD+= -ll
|
||||
DPADD+= ${LIBL}
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
.endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: defs.h,v 1.1 2002/01/29 10:20:36 tv Exp $ */
|
||||
/* $NetBSD: defs.h,v 1.2 2002/01/31 22:44:01 tv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -50,9 +50,6 @@
|
|||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#define HAVE_ERR_H 1
|
||||
#define HAVE_VIS_H 1
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: main.c,v 1.66 2002/01/29 10:20:37 tv Exp $ */
|
||||
/* $NetBSD: main.c,v 1.67 2002/01/31 22:44:01 tv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -60,6 +60,7 @@ COPYRIGHT("@(#) Copyright (c) 1992, 1993\n\
|
|||
#include <sys/stat.h>
|
||||
#include <sys/param.h>
|
||||
#include <ctype.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -67,13 +68,7 @@ COPYRIGHT("@(#) Copyright (c) 1992, 1993\n\
|
|||
#include <unistd.h>
|
||||
#include "defs.h"
|
||||
#include "sem.h"
|
||||
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
#if HAVE_VIS_H
|
||||
#include <vis.h>
|
||||
#endif
|
||||
|
||||
int vflag; /* verbose output */
|
||||
int Pflag; /* pack locators */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.7 2002/01/24 03:21:07 lukem Exp $
|
||||
# $NetBSD: Makefile,v 1.8 2002/01/31 22:44:02 tv Exp $
|
||||
#
|
||||
|
||||
PROG= makefs
|
||||
|
@ -7,8 +7,6 @@ SRCS= makefs.c walk.c \
|
|||
getid.c misc.c spec.c pack_dev.c stat_flags.c strsuftoull.c \
|
||||
ffs_alloc.c ffs_balloc.c ffs_bswap.c ffs_subr.c ffs_tables.c ufs_bmap.c
|
||||
MAN= makefs.8
|
||||
DPADD+= ${LIBUTIL}
|
||||
LDADD+= -lutil
|
||||
|
||||
DDSRC= ${.CURDIR}/../../bin/dd
|
||||
LSSRC= ${.CURDIR}/../../bin/ls
|
||||
|
@ -24,5 +22,8 @@ CPPFLAGS+= -I${.CURDIR} \
|
|||
WARNS?= 2
|
||||
|
||||
.ifndef HOSTPROG
|
||||
DPADD+= ${LIBUTIL}
|
||||
LDADD+= -lutil
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
.endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ffs.c,v 1.11 2002/01/26 13:27:53 lukem Exp $ */
|
||||
/* $NetBSD: ffs.c,v 1.12 2002/01/31 22:44:02 tv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Wasabi Systems, Inc.
|
||||
|
@ -70,15 +70,14 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef __lint
|
||||
__RCSID("$NetBSD: ffs.c,v 1.11 2002/01/26 13:27:53 lukem Exp $");
|
||||
#if defined(__RCSID) && !defined(__lint)
|
||||
__RCSID("$NetBSD: ffs.c,v 1.12 2002/01/31 22:44:02 tv Exp $");
|
||||
#endif /* !__lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdarg.h>
|
||||
|
@ -421,7 +420,9 @@ ffs_dump_fsinfo(fsinfo_t *f)
|
|||
static int
|
||||
ffs_create_image(const char *image, fsinfo_t *fsopts)
|
||||
{
|
||||
#if HAVE_STRUCT_STATFS_F_IOSIZE
|
||||
struct statfs sfs;
|
||||
#endif
|
||||
struct fs *fs;
|
||||
char *buf;
|
||||
int i, bufsize;
|
||||
|
@ -438,12 +439,16 @@ ffs_create_image(const char *image, fsinfo_t *fsopts)
|
|||
}
|
||||
|
||||
/* zero image */
|
||||
#if HAVE_STRUCT_STATFS_F_IOSIZE
|
||||
if (fstatfs(fsopts->fd, &sfs) == -1) {
|
||||
#endif
|
||||
bufsize = 8192;
|
||||
#if HAVE_STRUCT_STATFS_F_IOSIZE
|
||||
warn("can't fstatfs `%s', using default %d byte chunk",
|
||||
image, bufsize);
|
||||
} else
|
||||
bufsize = sfs.f_iosize;
|
||||
#endif
|
||||
bufrem = fsopts->size;
|
||||
if (debug & DEBUG_FS_CREATE_IMAGE)
|
||||
printf(
|
||||
|
@ -633,13 +638,19 @@ ffs_populate_dir(const char *dir, fsnode *root, fsinfo_t *fsopts)
|
|||
din.di_nlink = cur->inode->nlink;
|
||||
din.di_size = cur->inode->st.st_size;
|
||||
din.di_atime = cur->inode->st.st_atime;
|
||||
din.di_atimensec = cur->inode->st.st_atimensec;
|
||||
din.di_mtime = cur->inode->st.st_mtime;
|
||||
din.di_mtimensec = cur->inode->st.st_mtimensec;
|
||||
din.di_ctime = cur->inode->st.st_ctime;
|
||||
#if HAVE_STRUCT_STAT_ST_MTIMENSEC
|
||||
din.di_atimensec = cur->inode->st.st_atimensec;
|
||||
din.di_mtimensec = cur->inode->st.st_mtimensec;
|
||||
din.di_ctimensec = cur->inode->st.st_ctimensec;
|
||||
#endif
|
||||
#if HAVE_STRUCT_STAT_ST_FLAGS
|
||||
din.di_flags = cur->inode->st.st_flags;
|
||||
#endif
|
||||
#if HAVE_STRUCT_STAT_ST_GEN
|
||||
din.di_gen = cur->inode->st.st_gen;
|
||||
#endif
|
||||
din.di_uid = cur->inode->st.st_uid;
|
||||
din.di_gid = cur->inode->st.st_gid;
|
||||
/* not set: di_db, di_ib, di_blocks, di_spare */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: buf.c,v 1.8 2002/01/08 06:00:14 lukem Exp $ */
|
||||
/* $NetBSD: buf.c,v 1.9 2002/01/31 22:44:03 tv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Wasabi Systems, Inc.
|
||||
|
@ -36,15 +36,14 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef __lint
|
||||
__RCSID("$NetBSD: buf.c,v 1.8 2002/01/08 06:00:14 lukem Exp $");
|
||||
#if defined(__RCSID) && !defined(__lint)
|
||||
__RCSID("$NetBSD: buf.c,v 1.9 2002/01/31 22:44:03 tv Exp $");
|
||||
#endif /* !__lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ffs_alloc.c,v 1.7 2002/01/08 06:00:14 lukem Exp $ */
|
||||
/* $NetBSD: ffs_alloc.c,v 1.8 2002/01/31 22:44:03 tv Exp $ */
|
||||
/* From: NetBSD: ffs_alloc.c,v 1.50 2001/09/06 02:16:01 lukem Exp */
|
||||
|
||||
/*
|
||||
|
@ -37,14 +37,13 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef __lint
|
||||
__RCSID("$NetBSD: ffs_alloc.c,v 1.7 2002/01/08 06:00:14 lukem Exp $");
|
||||
#if defined(__RCSID) && !defined(__lint)
|
||||
__RCSID("$NetBSD: ffs_alloc.c,v 1.8 2002/01/31 22:44:03 tv Exp $");
|
||||
#endif /* !__lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "makefs.h"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ffs_balloc.c,v 1.8 2002/01/08 06:00:14 lukem Exp $ */
|
||||
/* $NetBSD: ffs_balloc.c,v 1.9 2002/01/31 22:44:04 tv Exp $ */
|
||||
/* From NetBSD: ffs_balloc.c,v 1.25 2001/08/08 08:36:36 lukem Exp */
|
||||
|
||||
/*
|
||||
|
@ -37,15 +37,14 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef __lint
|
||||
__RCSID("$NetBSD: ffs_balloc.c,v 1.8 2002/01/08 06:00:14 lukem Exp $");
|
||||
#if defined(__RCSID) && !defined(__lint)
|
||||
__RCSID("$NetBSD: ffs_balloc.c,v 1.9 2002/01/31 22:44:04 tv Exp $");
|
||||
#endif /* !__lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mkfs.c,v 1.8 2002/01/26 13:22:17 lukem Exp $ */
|
||||
/* $NetBSD: mkfs.c,v 1.9 2002/01/31 22:44:04 tv Exp $ */
|
||||
/* From NetBSD: mkfs.c,v 1.59 2001/12/31 07:07:58 lukem Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -35,11 +35,11 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if defined(__RCSID) && !defined(lint)
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)mkfs.c 8.11 (Berkeley) 5/3/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: mkfs.c,v 1.8 2002/01/26 13:22:17 lukem Exp $");
|
||||
__RCSID("$NetBSD: mkfs.c,v 1.9 2002/01/31 22:44:04 tv Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -47,7 +47,6 @@ __RCSID("$NetBSD: mkfs.c,v 1.8 2002/01/26 13:22:17 lukem Exp $");
|
|||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
#include <err.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: makefs.c,v 1.12 2002/01/26 13:22:16 lukem Exp $ */
|
||||
/* $NetBSD: makefs.c,v 1.13 2002/01/31 22:44:02 tv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001-2002 Wasabi Systems, Inc.
|
||||
|
@ -36,17 +36,12 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef __lint
|
||||
__RCSID("$NetBSD: makefs.c,v 1.12 2002/01/26 13:22:16 lukem Exp $");
|
||||
#if defined(__RCSID) && !defined(__lint)
|
||||
__RCSID("$NetBSD: makefs.c,v 1.13 2002/01/31 22:44:02 tv Exp $");
|
||||
#endif /* !__lint */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
|
@ -58,7 +53,6 @@ __RCSID("$NetBSD: makefs.c,v 1.12 2002/01/26 13:22:16 lukem Exp $");
|
|||
#include "mtree.h"
|
||||
#include "strsuftoull.h"
|
||||
|
||||
|
||||
/*
|
||||
* list of supported file systems and dispatch functions
|
||||
*/
|
||||
|
@ -121,7 +115,9 @@ main(int argc, char *argv[])
|
|||
specfile = NULL;
|
||||
if (gettimeofday(&start, NULL) == -1)
|
||||
err(1, "Unable to get system time");
|
||||
TIMEVAL_TO_TIMESPEC(&start, &start_time);
|
||||
|
||||
start_time.tv_sec = start.tv_sec;
|
||||
start_time.tv_nsec = start.tv_usec * 1000;
|
||||
|
||||
while ((ch = getopt(argc, argv, "B:b:d:f:F:M:m:N:o:s:S:t:")) != -1) {
|
||||
switch (ch) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: makefs.h,v 1.6 2002/01/26 13:22:16 lukem Exp $ */
|
||||
/* $NetBSD: makefs.h,v 1.7 2002/01/31 22:44:03 tv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Wasabi Systems, Inc.
|
||||
|
@ -38,8 +38,17 @@
|
|||
#ifndef _MAKEFS_H
|
||||
#define _MAKEFS_H
|
||||
|
||||
#include <sys/stat.h>
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#define HAVE_STRUCT_STAT_ST_FLAGS 1
|
||||
#define HAVE_STRUCT_STAT_ST_GEN 1
|
||||
#define HAVE_STRUCT_STAT_ST_MTIMENSEC 1
|
||||
#define HAVE_STRUCT_STATFS_F_IOSIZE 1
|
||||
#endif
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <err.h>
|
||||
|
||||
/*
|
||||
* fsnode -
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: walk.c,v 1.7 2002/01/23 02:26:21 lukem Exp $ */
|
||||
/* $NetBSD: walk.c,v 1.8 2002/01/31 22:44:03 tv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Wasabi Systems, Inc.
|
||||
|
@ -76,14 +76,13 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef __lint
|
||||
__RCSID("$NetBSD: walk.c,v 1.7 2002/01/23 02:26:21 lukem Exp $");
|
||||
#if defined(__RCSID) && !defined(__lint)
|
||||
__RCSID("$NetBSD: walk.c,v 1.8 2002/01/31 22:44:03 tv Exp $");
|
||||
#endif /* !__lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
|
@ -309,8 +308,10 @@ apply_specdir(const char *dir, NODE *specnode, fsnode *dirnode)
|
|||
stbuf.st_nlink = 1;
|
||||
stbuf.st_mtime = stbuf.st_atime =
|
||||
stbuf.st_ctime = start_time.tv_sec;
|
||||
#if HAVE_STRUCT_STAT_ST_MTIMENSEC
|
||||
stbuf.st_mtimensec = stbuf.st_atimensec =
|
||||
stbuf.st_ctimensec = start_time.tv_nsec;
|
||||
#endif
|
||||
curfsnode = create_fsnode(curnode->name, &stbuf);
|
||||
curfsnode->parent = dirnode->parent;
|
||||
curfsnode->first = dirnode;
|
||||
|
@ -393,25 +394,29 @@ apply_specentry(const char *dir, NODE *specnode, fsnode *dirnode)
|
|||
if (specnode->flags & F_TIME) {
|
||||
ASEPRINT("time", "%ld",
|
||||
(long)dirnode->inode->st.st_mtime,
|
||||
(long)specnode->st_mtime);
|
||||
dirnode->inode->st.st_mtime = specnode->st_mtime;
|
||||
dirnode->inode->st.st_mtimensec = specnode->st_mtimensec;
|
||||
dirnode->inode->st.st_atime = specnode->st_mtime;
|
||||
dirnode->inode->st.st_atimensec = specnode->st_mtimensec;
|
||||
(long)specnode->st_mtimespec.tv_sec);
|
||||
dirnode->inode->st.st_mtime = specnode->st_mtimespec.tv_sec;
|
||||
dirnode->inode->st.st_atime = specnode->st_mtimespec.tv_sec;
|
||||
dirnode->inode->st.st_ctime = start_time.tv_sec;
|
||||
#if HAVE_STRUCT_STAT_ST_MTIMENSEC
|
||||
dirnode->inode->st.st_mtimensec = specnode->st_mtimensec;
|
||||
dirnode->inode->st.st_atimensec = specnode->st_mtimensec;
|
||||
dirnode->inode->st.st_ctimensec = start_time.tv_nsec;
|
||||
#endif
|
||||
}
|
||||
if (specnode->flags & (F_UID | F_UNAME)) {
|
||||
ASEPRINT("uid", "%d",
|
||||
dirnode->inode->st.st_uid, specnode->st_uid);
|
||||
dirnode->inode->st.st_uid = specnode->st_uid;
|
||||
}
|
||||
#if HAVE_STRUCT_STAT_ST_FLAGS
|
||||
if (specnode->flags & F_FLAGS) {
|
||||
ASEPRINT("flags", "%#lX",
|
||||
(ulong)dirnode->inode->st.st_flags,
|
||||
(ulong)specnode->st_flags);
|
||||
dirnode->inode->st.st_flags = specnode->st_flags;
|
||||
}
|
||||
#endif
|
||||
if (specnode->flags & F_DEV) {
|
||||
ASEPRINT("rdev", "%#x",
|
||||
dirnode->inode->st.st_rdev, specnode->st_rdev);
|
||||
|
|
|
@ -38,12 +38,10 @@ static const char rcsid[] =
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <util.h>
|
||||
|
||||
#include "extern.h"
|
||||
|
||||
#if HAVE_UTIL_H
|
||||
#include <util.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* We're assuming that there won't be a whole lot of excludes,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: extern.h,v 1.21 2002/01/29 10:20:38 tv Exp $ */
|
||||
/* $NetBSD: extern.h,v 1.22 2002/01/31 22:44:05 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
|
@ -40,26 +40,17 @@
|
|||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#define HAVE_ERR_H 1
|
||||
#define HAVE_FTS_H 1
|
||||
#define HAVE_VIS_H 1
|
||||
#define HAVE_UTIL_H 1
|
||||
#define HAVE_STRUCT_STAT_ST_FLAGS 1
|
||||
#endif
|
||||
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
#if HAVE_FTS_H
|
||||
#include <fts.h>
|
||||
#endif
|
||||
#include <vis.h>
|
||||
|
||||
#if HAVE_NETDB_H
|
||||
/* For MAXHOSTNAMELEN on some platforms. */
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
#if HAVE_VIS_H
|
||||
#include <vis.h>
|
||||
#endif
|
||||
|
||||
#ifndef MAXHOSTNAMELEN
|
||||
#define MAXHOSTNAMELEN 256
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: spec.c,v 1.44 2002/01/29 10:20:38 tv Exp $ */
|
||||
/* $NetBSD: spec.c,v 1.45 2002/01/31 22:44:05 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1989, 1993
|
||||
|
@ -70,11 +70,11 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if defined(__RCSID) && !defined(lint)
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)spec.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: spec.c,v 1.44 2002/01/29 10:20:38 tv Exp $");
|
||||
__RCSID("$NetBSD: spec.c,v 1.45 2002/01/31 22:44:05 tv Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -89,14 +89,11 @@ __RCSID("$NetBSD: spec.c,v 1.44 2002/01/29 10:20:38 tv Exp $");
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <util.h>
|
||||
|
||||
#include "extern.h"
|
||||
#include "pack_dev.h"
|
||||
|
||||
#if HAVE_UTIL_H
|
||||
#include <util.h>
|
||||
#endif
|
||||
|
||||
size_t mtree_lineno; /* Current spec line number */
|
||||
int Wflag; /* Don't "whack" permissions */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pwd_mkdb.c,v 1.23 2002/01/29 10:20:38 tv Exp $ */
|
||||
/* $NetBSD: pwd_mkdb.c,v 1.24 2002/01/31 22:44:06 tv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991, 1993, 1994
|
||||
|
@ -36,25 +36,23 @@
|
|||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
#define HAVE_ERR_H 1
|
||||
#define HAVE_UTIL_H 1
|
||||
#endif
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if defined(__RCSID) && !defined(lint)
|
||||
__COPYRIGHT("@(#) Copyright (c) 2000\n\
|
||||
The NetBSD Foundation, Inc. All rights reserved.\n\
|
||||
Copyright (c) 1991, 1993, 1994\n\
|
||||
The Regents of the University of California. All rights reserved.\n");
|
||||
__SCCSID("from: @(#)pwd_mkdb.c 8.5 (Berkeley) 4/20/94");
|
||||
__RCSID("$NetBSD: pwd_mkdb.c,v 1.23 2002/01/29 10:20:38 tv Exp $");
|
||||
__RCSID("$NetBSD: pwd_mkdb.c,v 1.24 2002/01/31 22:44:06 tv Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <db.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
|
@ -63,18 +61,13 @@ __RCSID("$NetBSD: pwd_mkdb.c,v 1.23 2002/01/29 10:20:38 tv Exp $");
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <util.h>
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "compat_pwd.h"
|
||||
#else
|
||||
#include <pwd.h>
|
||||
#endif
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
#if HAVE_UTIL_H
|
||||
#include <util.h>
|
||||
#endif
|
||||
|
||||
#define MAX_CACHESIZE 8*1024*1024
|
||||
#define MIN_CACHESIZE 2*1024*1024
|
||||
|
|
Loading…
Reference in New Issue