Add compat #ifdefs from pkgsrc, to make syncing easier between the
two versions.
This commit is contained in:
parent
e3fd6c6a46
commit
f0f9d6a437
@ -1,10 +1,11 @@
|
||||
# $NetBSD: Makefile.inc,v 1.25 2003/09/23 05:39:41 grant Exp $
|
||||
# $NetBSD: Makefile.inc,v 1.26 2005/11/05 13:11:02 wiz Exp $
|
||||
# Original from FreeBSD, no rcs id.
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIBINSTALL != cd ${.CURDIR}/../lib && ${PRINTOBJDIR}
|
||||
CPPFLAGS+=-I${.CURDIR}/../lib ${DEBUG} -DBINDIR='"${BINDIR}"'
|
||||
CPPFLAGS+=-DHAVE_CONFIG_H
|
||||
|
||||
# UNDER NO CIRCUMSTANCES SHOULD THIS MAKEFILE TEST THE OUTPUT OF uname!!
|
||||
# DOING SO BREAKS CROSS COMPILING.
|
||||
|
@ -1,11 +1,17 @@
|
||||
/* $NetBSD: extract.c,v 1.35 2005/06/29 01:39:37 hubertf Exp $ */
|
||||
/* $NetBSD: extract.c,v 1.36 2005/11/05 13:11:02 wiz Exp $ */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <nbcompat.h>
|
||||
#if HAVE_SYS_CDEFS_H
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static const char *rcsid = "FreeBSD - Id: extract.c,v 1.17 1997/10/08 07:45:35 charnier Exp";
|
||||
#else
|
||||
__RCSID("$NetBSD: extract.c,v 1.35 2005/06/29 01:39:37 hubertf Exp $");
|
||||
__RCSID("$NetBSD: extract.c,v 1.36 2005/11/05 13:11:02 wiz Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -29,7 +35,9 @@ __RCSID("$NetBSD: extract.c,v 1.35 2005/06/29 01:39:37 hubertf Exp $");
|
||||
*
|
||||
*/
|
||||
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
#include "lib.h"
|
||||
#include "add.h"
|
||||
|
||||
@ -80,7 +88,9 @@ rollback(char *name, char *home, plist_t *start, plist_t *stop)
|
||||
if (q->type == PLIST_FILE) {
|
||||
(void) snprintf(try, sizeof(try), "%s/%s", dir, q->name);
|
||||
if (make_preserve_name(bup, sizeof(bup), name, try) && fexists(bup)) {
|
||||
#if HAVE_CHFLAGS
|
||||
(void) chflags(try, 0);
|
||||
#endif
|
||||
(void) unlink(try);
|
||||
if (rename(bup, try))
|
||||
warnx("rollback: unable to rename %s back to %s", bup, try);
|
||||
@ -175,7 +185,9 @@ extract_plist(char *home, package_t *pkg)
|
||||
/* first try to rename it into place */
|
||||
(void) snprintf(try, sizeof(try), "%s/%s", Directory, p->name);
|
||||
if (fexists(try)) {
|
||||
#if HAVE_CHFLAGS
|
||||
(void) chflags(try, 0); /* XXX hack - if truly immutable, rename fails */
|
||||
#endif
|
||||
if (preserve && PkgName) {
|
||||
char pf[MaxPathSize];
|
||||
|
||||
|
@ -1,11 +1,17 @@
|
||||
/* $NetBSD: futil.c,v 1.14 2003/09/24 06:18:16 agc Exp $ */
|
||||
/* $NetBSD: futil.c,v 1.15 2005/11/05 13:11:02 wiz Exp $ */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <nbcompat.h>
|
||||
#if HAVE_SYS_CDEFS_H
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static const char *rcsid = "from FreeBSD Id: futil.c,v 1.7 1997/10/08 07:45:39 charnier Exp";
|
||||
#else
|
||||
__RCSID("$NetBSD: futil.c,v 1.14 2003/09/24 06:18:16 agc Exp $");
|
||||
__RCSID("$NetBSD: futil.c,v 1.15 2005/11/05 13:11:02 wiz Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -29,7 +35,9 @@ __RCSID("$NetBSD: futil.c,v 1.14 2003/09/24 06:18:16 agc Exp $");
|
||||
*
|
||||
*/
|
||||
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
#include "lib.h"
|
||||
#include "add.h"
|
||||
|
||||
|
@ -1,11 +1,17 @@
|
||||
/* $NetBSD: main.c,v 1.35 2005/11/03 21:16:41 dillo Exp $ */
|
||||
/* $NetBSD: main.c,v 1.36 2005/11/05 13:11:02 wiz Exp $ */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <nbcompat.h>
|
||||
#if HAVE_SYS_CDEFS_H
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char *rcsid = "from FreeBSD Id: main.c,v 1.16 1997/10/08 07:45:43 charnier Exp";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.35 2005/11/03 21:16:41 dillo Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.36 2005/11/05 13:11:02 wiz Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -30,9 +36,15 @@ __RCSID("$NetBSD: main.c,v 1.35 2005/11/03 21:16:41 dillo Exp $");
|
||||
*
|
||||
*/
|
||||
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
#if HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#if HAVE_SYS_RESOURCE_H
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
#include "lib.h"
|
||||
#include "add.h"
|
||||
#include "verify.h"
|
||||
|
@ -1,11 +1,17 @@
|
||||
/* $NetBSD: perform.c,v 1.112 2005/11/03 21:16:41 dillo Exp $ */
|
||||
/* $NetBSD: perform.c,v 1.113 2005/11/05 13:11:02 wiz Exp $ */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <nbcompat.h>
|
||||
#if HAVE_SYS_CDEFS_H
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.44 1997/10/13 15:03:46 jkh Exp";
|
||||
#else
|
||||
__RCSID("$NetBSD: perform.c,v 1.112 2005/11/03 21:16:41 dillo Exp $");
|
||||
__RCSID("$NetBSD: perform.c,v 1.113 2005/11/05 13:11:02 wiz Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -29,18 +35,34 @@ __RCSID("$NetBSD: perform.c,v 1.112 2005/11/03 21:16:41 dillo Exp $");
|
||||
*
|
||||
*/
|
||||
|
||||
#if HAVE_ASSERT_H
|
||||
#include <assert.h>
|
||||
#endif
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
#if HAVE_ERRNO_H
|
||||
#include <errno.h>
|
||||
#endif
|
||||
#include "lib.h"
|
||||
#include "add.h"
|
||||
#include "verify.h"
|
||||
|
||||
#if HAVE_INTTYPES_H
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
#if HAVE_SIGNAL_H
|
||||
#include <signal.h>
|
||||
#endif
|
||||
#if HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
#if HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#if HAVE_SYS_UTSNAME_H
|
||||
#include <sys/utsname.h>
|
||||
#endif
|
||||
|
||||
static char LogDir[MaxPathSize];
|
||||
static int zapLogDir; /* Should we delete LogDir? */
|
||||
@ -48,6 +70,26 @@ static int zapLogDir; /* Should we delete LogDir? */
|
||||
static package_t Plist;
|
||||
static char *Home;
|
||||
|
||||
/*
|
||||
* Some systems such as OpenBSD-3.6 do not provide PRIu64.
|
||||
* Others such as AIX-4.3.2 have a broken PRIu64 which includes
|
||||
* a leading "%".
|
||||
*/
|
||||
#ifdef NEED_PRI_MACRO
|
||||
# ifdef PRIu64
|
||||
# undef PRIu64
|
||||
# endif
|
||||
# if SIZEOF_INT == 8
|
||||
# define PRIu64 "u"
|
||||
# elif SIZEOF_LONG == 8
|
||||
# define PRIu64 "lu"
|
||||
# elif SIZEOF_LONG_LONG == 8
|
||||
# define PRIu64 "llu"
|
||||
# else
|
||||
# error "unable to find a suitable PRIu64"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* used in build information */
|
||||
enum {
|
||||
Good,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: verify.c,v 1.6 2004/12/29 11:34:59 agc Exp $ */
|
||||
/* $NetBSD: verify.c,v 1.7 2005/11/05 13:11:02 wiz Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Alistair G. Crooks. All rights reserved.
|
||||
@ -30,22 +30,42 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <nbcompat.h>
|
||||
#if HAVE_SYS_CDEFS_H
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
|
||||
#ifndef lint
|
||||
__COPYRIGHT("@(#) Copyright (c) 1999 \
|
||||
The NetBSD Foundation, Inc. All rights reserved.");
|
||||
__RCSID("$NetBSD: verify.c,v 1.6 2004/12/29 11:34:59 agc Exp $");
|
||||
__RCSID("$NetBSD: verify.c,v 1.7 2005/11/05 13:11:02 wiz Exp $");
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#if HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#if HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#if HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
#if HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "verify.h"
|
||||
#include "lib.h"
|
||||
|
@ -1,8 +1,14 @@
|
||||
/* $NetBSD: main.c,v 1.49 2005/11/03 21:16:41 dillo Exp $ */
|
||||
/* $NetBSD: main.c,v 1.50 2005/11/05 13:11:02 wiz Exp $ */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <nbcompat.h>
|
||||
#if HAVE_SYS_CDEFS_H
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: main.c,v 1.49 2005/11/03 21:16:41 dillo Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.50 2005/11/05 13:11:02 wiz Exp $");
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -35,16 +41,36 @@ __RCSID("$NetBSD: main.c,v 1.49 2005/11/03 21:16:41 dillo Exp $");
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
#if HAVE_DIRENT_H
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
#if HAVE_ERRNO_H
|
||||
#include <errno.h>
|
||||
#endif
|
||||
#if HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
#if HAVE_MD5_H
|
||||
#include <md5.h>
|
||||
#endif
|
||||
#if HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
#endif
|
||||
#if HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#if HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include "lib.h"
|
||||
|
||||
|
@ -1,11 +1,17 @@
|
||||
/* $NetBSD: main.c,v 1.27 2004/12/29 11:35:00 agc Exp $ */
|
||||
/* $NetBSD: main.c,v 1.28 2005/11/05 13:11:02 wiz Exp $ */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <nbcompat.h>
|
||||
#if HAVE_SYS_CDEFS_H
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static const char *rcsid = "from FreeBSD Id: main.c,v 1.17 1997/10/08 07:46:23 charnier Exp";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.27 2004/12/29 11:35:00 agc Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.28 2005/11/05 13:11:02 wiz Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -20,7 +26,9 @@ __RCSID("$NetBSD: main.c,v 1.27 2004/12/29 11:35:00 agc Exp $");
|
||||
*
|
||||
*/
|
||||
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
#include "lib.h"
|
||||
#include "create.h"
|
||||
|
||||
|
@ -1,11 +1,17 @@
|
||||
/* $NetBSD: perform.c,v 1.40 2004/12/29 11:35:00 agc Exp $ */
|
||||
/* $NetBSD: perform.c,v 1.41 2005/11/05 13:11:02 wiz Exp $ */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <nbcompat.h>
|
||||
#if HAVE_SYS_CDEFS_H
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.38 1997/10/13 15:03:51 jkh Exp";
|
||||
#else
|
||||
__RCSID("$NetBSD: perform.c,v 1.40 2004/12/29 11:35:00 agc Exp $");
|
||||
__RCSID("$NetBSD: perform.c,v 1.41 2005/11/05 13:11:02 wiz Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -32,10 +38,18 @@ __RCSID("$NetBSD: perform.c,v 1.40 2004/12/29 11:35:00 agc Exp $");
|
||||
#include "lib.h"
|
||||
#include "create.h"
|
||||
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
#if HAVE_SIGNAL_H
|
||||
#include <signal.h>
|
||||
#endif
|
||||
#if HAVE_SYS_WAIT_H
|
||||
#include <sys/wait.h>
|
||||
#endif
|
||||
#if HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
static char *Home;
|
||||
|
||||
|
@ -1,11 +1,17 @@
|
||||
/* $NetBSD: pl.c,v 1.32 2004/12/29 11:35:00 agc Exp $ */
|
||||
/* $NetBSD: pl.c,v 1.33 2005/11/05 13:11:02 wiz Exp $ */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <nbcompat.h>
|
||||
#if HAVE_SYS_CDEFS_H
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static const char *rcsid = "from FreeBSD Id: pl.c,v 1.11 1997/10/08 07:46:35 charnier Exp";
|
||||
#else
|
||||
__RCSID("$NetBSD: pl.c,v 1.32 2004/12/29 11:35:00 agc Exp $");
|
||||
__RCSID("$NetBSD: pl.c,v 1.33 2005/11/05 13:11:02 wiz Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -31,8 +37,12 @@ __RCSID("$NetBSD: pl.c,v 1.32 2004/12/29 11:35:00 agc Exp $");
|
||||
|
||||
#include "lib.h"
|
||||
#include "create.h"
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
#if HAVE_MD5_H
|
||||
#include <md5.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Check that any symbolic link is relative to the prefix
|
||||
|
@ -1,11 +1,17 @@
|
||||
/* $NetBSD: main.c,v 1.34 2004/12/29 11:35:00 agc Exp $ */
|
||||
/* $NetBSD: main.c,v 1.35 2005/11/05 13:11:02 wiz Exp $ */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <nbcompat.h>
|
||||
#if HAVE_SYS_CDEFS_H
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char *rcsid = "from FreeBSD Id: main.c,v 1.11 1997/10/08 07:46:48 charnier Exp";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.34 2004/12/29 11:35:00 agc Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.35 2005/11/05 13:11:02 wiz Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -30,7 +36,9 @@ __RCSID("$NetBSD: main.c,v 1.34 2004/12/29 11:35:00 agc Exp $");
|
||||
*
|
||||
*/
|
||||
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
#include "lib.h"
|
||||
#include "delete.h"
|
||||
|
||||
|
@ -1,11 +1,17 @@
|
||||
/* $NetBSD: perform.c,v 1.56 2005/05/10 00:06:57 rillig Exp $ */
|
||||
/* $NetBSD: perform.c,v 1.57 2005/11/05 13:11:02 wiz Exp $ */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <nbcompat.h>
|
||||
#if HAVE_SYS_CDEFS_H
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.15 1997/10/13 15:03:52 jkh Exp";
|
||||
#else
|
||||
__RCSID("$NetBSD: perform.c,v 1.56 2005/05/10 00:06:57 rillig Exp $");
|
||||
__RCSID("$NetBSD: perform.c,v 1.57 2005/11/05 13:11:02 wiz Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -57,8 +63,12 @@ __RCSID("$NetBSD: perform.c,v 1.56 2005/05/10 00:06:57 rillig Exp $");
|
||||
* Added the require find and require delete code
|
||||
*/
|
||||
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
#if HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
#include "lib.h"
|
||||
#include "delete.h"
|
||||
|
||||
|
@ -1,11 +1,17 @@
|
||||
/* $NetBSD: main.c,v 1.46 2005/11/03 21:16:41 dillo Exp $ */
|
||||
/* $NetBSD: main.c,v 1.47 2005/11/05 13:11:02 wiz Exp $ */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <nbcompat.h>
|
||||
#if HAVE_SYS_CDEFS_H
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char *rcsid = "from FreeBSD Id: main.c,v 1.14 1997/10/08 07:47:26 charnier Exp";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.46 2005/11/03 21:16:41 dillo Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.47 2005/11/05 13:11:02 wiz Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -30,10 +36,16 @@ __RCSID("$NetBSD: main.c,v 1.46 2005/11/03 21:16:41 dillo Exp $");
|
||||
*
|
||||
*/
|
||||
|
||||
#if HAVE_SYS_IOCTL_H
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_TERMIOS_H
|
||||
#include <termios.h>
|
||||
#endif
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
|
||||
#include "lib.h"
|
||||
#include "info.h"
|
||||
|
@ -1,11 +1,17 @@
|
||||
/* $NetBSD: perform.c,v 1.63 2005/11/03 21:16:41 dillo Exp $ */
|
||||
/* $NetBSD: perform.c,v 1.64 2005/11/05 13:11:02 wiz Exp $ */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <nbcompat.h>
|
||||
#if HAVE_SYS_CDEFS_H
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.23 1997/10/13 15:03:53 jkh Exp";
|
||||
#else
|
||||
__RCSID("$NetBSD: perform.c,v 1.63 2005/11/03 21:16:41 dillo Exp $");
|
||||
__RCSID("$NetBSD: perform.c,v 1.64 2005/11/05 13:11:02 wiz Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -32,13 +38,25 @@ __RCSID("$NetBSD: perform.c,v 1.63 2005/11/03 21:16:41 dillo Exp $");
|
||||
#include "lib.h"
|
||||
#include "info.h"
|
||||
|
||||
#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
#if HAVE_SIGNAL_H
|
||||
#include <signal.h>
|
||||
#endif
|
||||
#if HAVE_DIRENT_H
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
#if HAVE_CTYPE_H
|
||||
#include <ctype.h>
|
||||
#endif
|
||||
|
||||
static char *Home;
|
||||
|
||||
|
@ -1,11 +1,17 @@
|
||||
/* $NetBSD: show.c,v 1.32 2005/11/03 21:16:41 dillo Exp $ */
|
||||
/* $NetBSD: show.c,v 1.33 2005/11/05 13:11:02 wiz Exp $ */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <nbcompat.h>
|
||||
#if HAVE_SYS_CDEFS_H
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static const char *rcsid = "from FreeBSD Id: show.c,v 1.11 1997/10/08 07:47:38 charnier Exp";
|
||||
#else
|
||||
__RCSID("$NetBSD: show.c,v 1.32 2005/11/03 21:16:41 dillo Exp $");
|
||||
__RCSID("$NetBSD: show.c,v 1.33 2005/11/05 13:11:02 wiz Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -58,7 +64,9 @@ __RCSID("$NetBSD: show.c,v 1.32 2005/11/03 21:16:41 dillo Exp $");
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
|
||||
#include "lib.h"
|
||||
#include "info.h"
|
||||
|
193
usr.sbin/pkg_install/lib/config.h
Normal file
193
usr.sbin/pkg_install/lib/config.h
Normal file
@ -0,0 +1,193 @@
|
||||
/* lib/config.h. Generated by configure. */
|
||||
/* lib/config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the <assert.h> header file. */
|
||||
#define HAVE_ASSERT_H 1
|
||||
|
||||
/* Define to 1 if you have the `chflags' function. */
|
||||
#define HAVE_CHFLAGS 1
|
||||
|
||||
/* Define to 1 if you have the <ctype.h> header file. */
|
||||
#define HAVE_CTYPE_H 1
|
||||
|
||||
/* Define to 1 if you have the <db1/db.h> header file. */
|
||||
/* #undef HAVE_DB1_DB_H */
|
||||
|
||||
/* Define to 1 if you have the `dbopen' function. */
|
||||
#define HAVE_DBOPEN 1
|
||||
|
||||
/* Define to 1 if you have the <db.h> header file. */
|
||||
#define HAVE_DB_H 1
|
||||
|
||||
/* Define to 1 if you have the <dirent.h> header file. */
|
||||
#define HAVE_DIRENT_H 1
|
||||
|
||||
/* Define to 1 if you have the <errno.h> header file. */
|
||||
#define HAVE_ERRNO_H 1
|
||||
|
||||
/* Define to 1 if you have the <err.h> header file. */
|
||||
#define HAVE_ERR_H 1
|
||||
|
||||
/* Define to 1 if you have the <fnctl.h> header file. */
|
||||
/* #undef HAVE_FNCTL_H */
|
||||
|
||||
/* Define to 1 if you have the <fnmatch.h> header file. */
|
||||
#define HAVE_FNMATCH_H 1
|
||||
|
||||
/* Define to 1 if you have the `getrlimit' function. */
|
||||
#define HAVE_GETRLIMIT 1
|
||||
|
||||
/* Define to 1 if you have the <glob.h> header file. */
|
||||
#define HAVE_GLOB_H 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the `db1' library (-ldb1). */
|
||||
/* #undef HAVE_LIBDB1 */
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* Define to 1 if you have the <md5.h> header file. */
|
||||
#define HAVE_MD5_H 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the <netdb.h> header file. */
|
||||
#define HAVE_NETDB_H 1
|
||||
|
||||
/* Define to 1 if you have the <pwd.h> header file. */
|
||||
#define HAVE_PWD_H 1
|
||||
|
||||
/* Define to 1 if you have the <regex.h> header file. */
|
||||
#define HAVE_REGEX_H 1
|
||||
|
||||
/* Define to 1 if you have the `setrlimit' function. */
|
||||
#define HAVE_SETRLIMIT 1
|
||||
|
||||
/* Define to 1 if you have the <signal.h> header file. */
|
||||
#define HAVE_SIGNAL_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdarg.h> header file. */
|
||||
#define HAVE_STDARG_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdio.h> header file. */
|
||||
#define HAVE_STDIO_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/cdefs.h> header file. */
|
||||
#define HAVE_SYS_CDEFS_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/file.h> header file. */
|
||||
#define HAVE_SYS_FILE_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
#define HAVE_SYS_IOCTL_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/mount.h> header file. */
|
||||
#define HAVE_SYS_MOUNT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#define HAVE_SYS_PARAM_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/poll.h> header file. */
|
||||
#define HAVE_SYS_POLL_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/queue.h> header file. */
|
||||
#define HAVE_SYS_QUEUE_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/resource.h> header file. */
|
||||
#define HAVE_SYS_RESOURCE_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/signal.h> header file. */
|
||||
#define HAVE_SYS_SIGNAL_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/statvfs.h> header file. */
|
||||
#define HAVE_SYS_STATVFS_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/utsname.h> header file. */
|
||||
#define HAVE_SYS_UTSNAME_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/vfs.h> header file. */
|
||||
/* #undef HAVE_SYS_VFS_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/wait.h> header file. */
|
||||
#define HAVE_SYS_WAIT_H 1
|
||||
|
||||
/* Define to 1 if you have the <termcap.h> header file. */
|
||||
#define HAVE_TERMCAP_H 1
|
||||
|
||||
/* Define to 1 if you have the <termios.h> header file. */
|
||||
#define HAVE_TERMIOS_H 1
|
||||
|
||||
/* Define to 1 if you have the `tgetent' function. */
|
||||
#define HAVE_TGETENT 1
|
||||
|
||||
/* Define to 1 if you have the <time.h> header file. */
|
||||
#define HAVE_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to 1 if you have the `vfork' function. */
|
||||
#define HAVE_VFORK 1
|
||||
|
||||
/* Define to 1 if you have the <vis.h> header file. */
|
||||
#define HAVE_VIS_H 1
|
||||
|
||||
/* Defined when PRIu64 is missing or broken */
|
||||
/* #undef NEED_PRI_MACRO */
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "grant@NetBSD.org"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "pkg_install"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "pkg_install 20050607"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "pkg_install"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "20050607"
|
||||
|
||||
/* The size of a `int', as computed by sizeof. */
|
||||
#define SIZEOF_INT 4
|
||||
|
||||
/* The size of a `long', as computed by sizeof. */
|
||||
#define SIZEOF_LONG 4
|
||||
|
||||
/* The size of a `long long', as computed by sizeof. */
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
#if !HAVE_VFORK
|
||||
# define vfork fork
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: defs.h,v 1.1 2002/01/09 16:17:08 agc Exp $ */
|
||||
/* $NetBSD: defs.h,v 1.2 2005/11/05 13:11:02 wiz Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999-2000 Alistair G. Crooks. All rights reserved.
|
||||
@ -33,9 +33,19 @@
|
||||
#ifndef DEFS_H_
|
||||
#define DEFS_H_
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <nbcompat.h>
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
#if HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#if HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#define NEWARRAY(type,ptr,size,where,action) do { \
|
||||
if ((ptr = (type *) calloc(sizeof(type), (unsigned)(size))) == NULL) { \
|
||||
|
@ -35,19 +35,37 @@
|
||||
*/
|
||||
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <nbcompat.h>
|
||||
#if HAVE_SYS_CDEFS_H
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
#if HAVE_SYS_WAIT_H
|
||||
#include <sys/wait.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
#if HAVE_ERRNO_H
|
||||
#include <errno.h>
|
||||
#endif
|
||||
#if HAVE_STDARG_H
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
#if HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#if HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "lib.h"
|
||||
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: fexec.c,v 1.7 2003/09/23 15:07:43 christos Exp $");
|
||||
__RCSID("$NetBSD: fexec.c,v 1.8 2005/11/05 13:11:02 wiz Exp $");
|
||||
#endif
|
||||
|
||||
static int vfcexec(const char *, int, const char *, va_list);
|
||||
|
@ -1,11 +1,17 @@
|
||||
/* $NetBSD: file.c,v 1.73 2005/02/04 09:03:03 jlam Exp $ */
|
||||
/* $NetBSD: file.c,v 1.74 2005/11/05 13:11:02 wiz Exp $ */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <nbcompat.h>
|
||||
#if HAVE_SYS_CDEFS_H
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static const char *rcsid = "from FreeBSD Id: file.c,v 1.29 1997/10/08 07:47:54 charnier Exp";
|
||||
#else
|
||||
__RCSID("$NetBSD: file.c,v 1.73 2005/02/04 09:03:03 jlam Exp $");
|
||||
__RCSID("$NetBSD: file.c,v 1.74 2005/11/05 13:11:02 wiz Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -31,15 +37,31 @@ __RCSID("$NetBSD: file.c,v 1.73 2005/02/04 09:03:03 jlam Exp $");
|
||||
|
||||
#include "lib.h"
|
||||
|
||||
#if HAVE_SYS_WAIT_H
|
||||
#include <sys/wait.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_ASSERT_H
|
||||
#include <assert.h>
|
||||
#endif
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
#if HAVE_GLOB_H
|
||||
#include <glob.h>
|
||||
#endif
|
||||
#if HAVE_NETDB_H
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
#if HAVE_PWD_H
|
||||
#include <pwd.h>
|
||||
#endif
|
||||
#if HAVE_TIME_H
|
||||
#include <time.h>
|
||||
#endif
|
||||
#if HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
|
@ -1,8 +1,14 @@
|
||||
/* $NetBSD: ftpio.c,v 1.68 2005/10/30 21:52:02 joerg Exp $ */
|
||||
/* $NetBSD: ftpio.c,v 1.69 2005/11/05 13:11:02 wiz Exp $ */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <nbcompat.h>
|
||||
#if HAVE_SYS_CDEFS_H
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: ftpio.c,v 1.68 2005/10/30 21:52:02 joerg Exp $");
|
||||
__RCSID("$NetBSD: ftpio.c,v 1.69 2005/11/05 13:11:02 wiz Exp $");
|
||||
#endif
|
||||
|
||||
/*-
|
||||
@ -71,25 +77,62 @@ __RCSID("$NetBSD: ftpio.c,v 1.68 2005/10/30 21:52:02 joerg Exp $");
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#if HAVE_SYS_POLL_H
|
||||
#include <sys/poll.h>
|
||||
#endif
|
||||
#if HAVE_SYS_WAIT_H
|
||||
#include <sys/wait.h>
|
||||
#endif
|
||||
#if HAVE_SIGNAL_H
|
||||
#include <signal.h>
|
||||
#endif
|
||||
#if HAVE_ASSERT_H
|
||||
#include <assert.h>
|
||||
#endif
|
||||
#if HAVE_CTYPE_H
|
||||
#include <ctype.h>
|
||||
#endif
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
#if HAVE_ERRNO_H
|
||||
#include <errno.h>
|
||||
#endif
|
||||
#if HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
#if HAVE_NETDB_H
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
#if HAVE_REGEX_H
|
||||
#include <regex.h>
|
||||
#endif
|
||||
#if HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
#if HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#if HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#if HAVE_TERMCAP_H
|
||||
#include <termcap.h>
|
||||
#endif
|
||||
#if HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef EXPECT_DEBUG
|
||||
#if HAVE_VIS_H
|
||||
#include <vis.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "../lib/lib.h"
|
||||
|
||||
|
@ -1,11 +1,17 @@
|
||||
/* $NetBSD: global.c,v 1.6 1999/08/24 00:48:39 hubertf Exp $ */
|
||||
/* $NetBSD: global.c,v 1.7 2005/11/05 13:11:02 wiz Exp $ */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <nbcompat.h>
|
||||
#if HAVE_SYS_CDEFS_H
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static const char *rcsid = "from FreeBSD Id: global.c,v 1.6 1997/10/08 07:47:58 charnier Exp";
|
||||
#else
|
||||
__RCSID("$NetBSD: global.c,v 1.6 1999/08/24 00:48:39 hubertf Exp $");
|
||||
__RCSID("$NetBSD: global.c,v 1.7 2005/11/05 13:11:02 wiz Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lib.h,v 1.77 2005/11/03 21:16:41 dillo Exp $ */
|
||||
/* $NetBSD: lib.h,v 1.78 2005/11/05 13:11:02 wiz Exp $ */
|
||||
|
||||
/* from FreeBSD Id: lib.h,v 1.25 1997/10/08 07:48:03 charnier Exp */
|
||||
|
||||
@ -25,18 +25,44 @@
|
||||
#ifndef _INST_LIB_LIB_H_
|
||||
#define _INST_LIB_LIB_H_
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <nbcompat.h>
|
||||
#if HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#if HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
#if HAVE_SYS_FILE_H
|
||||
#include <sys/file.h>
|
||||
#endif
|
||||
#if HAVE_SYS_QUEUE_H
|
||||
#include <sys/queue.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_CTYPE_H
|
||||
#include <ctype.h>
|
||||
#endif
|
||||
#if HAVE_DIRENT_H
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
#if HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#if HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#if HAVE_STDARG_H
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
#if HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
#if HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "path.h"
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lpkg.c,v 1.5 2003/09/02 07:35:02 jlam Exp $ */
|
||||
/* $NetBSD: lpkg.c,v 1.6 2005/11/05 13:11:02 wiz Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 Christian E. Hopps
|
||||
@ -29,7 +29,13 @@
|
||||
* Package-list auxiliary functions
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <nbcompat.h>
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
#include "lib.h"
|
||||
|
||||
/*
|
||||
|
0
usr.sbin/pkg_install/lib/nbcompat.h
Normal file
0
usr.sbin/pkg_install/lib/nbcompat.h
Normal file
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: path.c,v 1.7 2004/12/29 11:35:03 agc Exp $ */
|
||||
/* $NetBSD: path.c,v 1.8 2005/11/05 13:11:02 wiz Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)2002 YAMAMOTO Takashi,
|
||||
@ -26,12 +26,20 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <nbcompat.h>
|
||||
#if HAVE_SYS_CDEFS_H
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: path.c,v 1.7 2004/12/29 11:35:03 agc Exp $");
|
||||
__RCSID("$NetBSD: path.c,v 1.8 2005/11/05 13:11:02 wiz Exp $");
|
||||
#endif
|
||||
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
|
||||
#include "lib.h"
|
||||
|
||||
|
@ -1,11 +1,17 @@
|
||||
/* $NetBSD: pen.c,v 1.34 2005/02/20 09:04:18 grant Exp $ */
|
||||
/* $NetBSD: pen.c,v 1.35 2005/11/05 13:11:02 wiz Exp $ */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <nbcompat.h>
|
||||
#if HAVE_SYS_CDEFS_H
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static const char *rcsid = "from FreeBSD Id: pen.c,v 1.25 1997/10/08 07:48:12 charnier Exp";
|
||||
#else
|
||||
__RCSID("$NetBSD: pen.c,v 1.34 2005/02/20 09:04:18 grant Exp $");
|
||||
__RCSID("$NetBSD: pen.c,v 1.35 2005/11/05 13:11:02 wiz Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -29,11 +35,19 @@ __RCSID("$NetBSD: pen.c,v 1.34 2005/02/20 09:04:18 grant Exp $");
|
||||
*
|
||||
*/
|
||||
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
#include "lib.h"
|
||||
#if HAVE_SYS_SIGNAL_H
|
||||
#include <sys/signal.h>
|
||||
#endif
|
||||
#if HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#if HAVE_SYS_MOUNT_H
|
||||
#include <sys/mount.h>
|
||||
#endif
|
||||
|
||||
/* For keeping track of where we are */
|
||||
static char Current[MaxPathSize];
|
||||
|
@ -1,8 +1,14 @@
|
||||
/* $NetBSD: pkgdb.c,v 1.21 2005/02/04 12:13:18 drochner Exp $ */
|
||||
/* $NetBSD: pkgdb.c,v 1.22 2005/11/05 13:11:02 wiz Exp $ */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <nbcompat.h>
|
||||
#if HAVE_SYS_CDEFS_H
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: pkgdb.c,v 1.21 2005/02/04 12:13:18 drochner Exp $");
|
||||
__RCSID("$NetBSD: pkgdb.c,v 1.22 2005/11/05 13:11:02 wiz Exp $");
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -35,13 +41,29 @@ __RCSID("$NetBSD: pkgdb.c,v 1.21 2005/02/04 12:13:18 drochner Exp $");
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if HAVE_DB1_DB_H
|
||||
#include <db1/db.h>
|
||||
#elif HAVE_DB_H
|
||||
#include <db.h>
|
||||
#endif
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
#if HAVE_ERRNO_H
|
||||
#include <errno.h>
|
||||
#endif
|
||||
#if HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
#if HAVE_STDARG_H
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
#if HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#if HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include "lib.h"
|
||||
|
||||
@ -57,10 +79,13 @@ __RCSID("$NetBSD: pkgdb.c,v 1.21 2005/02/04 12:13:18 drochner Exp $");
|
||||
/* just in case we change the environment variable name */
|
||||
#define PKG_DBDIR "PKG_DBDIR"
|
||||
|
||||
#if HAVE_DBOPEN
|
||||
static DB *pkgdbp;
|
||||
#endif
|
||||
static char *pkgdb_dir = NULL;
|
||||
static char pkgdb_cache[MaxPathSize];
|
||||
|
||||
#if HAVE_DBOPEN
|
||||
/*
|
||||
* Open the pkg-database
|
||||
* Return value:
|
||||
@ -240,6 +265,18 @@ pkgdb_remove_pkg(const char *pkg)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#else /* !HAVE_DBOPEN */
|
||||
|
||||
int pkgdb_open(int mode) { return 1; }
|
||||
void pkgdb_close(void) {}
|
||||
int pkgdb_store(const char *key, const char *val) { return 0; }
|
||||
char *pkgdb_retrieve(const char *key) { return NULL; }
|
||||
void pkgdb_dump(void) {}
|
||||
int pkgdb_remove(const char *key) { return 0; }
|
||||
int pkgdb_remove_pkg(const char *pkg) { return 1; }
|
||||
|
||||
#endif /* HAVE_DBOPEN */
|
||||
|
||||
/*
|
||||
* Return the location of the package reference counts database directory.
|
||||
*/
|
||||
|
@ -1,11 +1,17 @@
|
||||
/* $NetBSD: plist.c,v 1.49 2005/05/31 22:29:41 wiz Exp $ */
|
||||
/* $NetBSD: plist.c,v 1.50 2005/11/05 13:11:02 wiz Exp $ */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <nbcompat.h>
|
||||
#if HAVE_SYS_CDEFS_H
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static const char *rcsid = "from FreeBSD Id: plist.c,v 1.24 1997/10/08 07:48:15 charnier Exp";
|
||||
#else
|
||||
__RCSID("$NetBSD: plist.c,v 1.49 2005/05/31 22:29:41 wiz Exp $");
|
||||
__RCSID("$NetBSD: plist.c,v 1.50 2005/11/05 13:11:02 wiz Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -30,9 +36,15 @@ __RCSID("$NetBSD: plist.c,v 1.49 2005/05/31 22:29:41 wiz Exp $");
|
||||
*/
|
||||
|
||||
#include "lib.h"
|
||||
#if HAVE_ERRNO_H
|
||||
#include <errno.h>
|
||||
#endif
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
#if HAVE_MD5_H
|
||||
#include <md5.h>
|
||||
#endif
|
||||
|
||||
/* This struct defines a plist command type */
|
||||
typedef struct cmd_t {
|
||||
|
@ -1,11 +1,17 @@
|
||||
/* $NetBSD: str.c,v 1.55 2005/11/03 21:59:55 dillo Exp $ */
|
||||
/* $NetBSD: str.c,v 1.56 2005/11/05 13:11:02 wiz Exp $ */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <nbcompat.h>
|
||||
#if HAVE_SYS_CDEFS_H
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static const char *rcsid = "Id: str.c,v 1.5 1997/10/08 07:48:21 charnier Exp";
|
||||
#else
|
||||
__RCSID("$NetBSD: str.c,v 1.55 2005/11/03 21:59:55 dillo Exp $");
|
||||
__RCSID("$NetBSD: str.c,v 1.56 2005/11/05 13:11:02 wiz Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -29,9 +35,15 @@ __RCSID("$NetBSD: str.c,v 1.55 2005/11/03 21:59:55 dillo Exp $");
|
||||
*
|
||||
*/
|
||||
|
||||
#if HAVE_ASSERT_H
|
||||
#include <assert.h>
|
||||
#endif
|
||||
#if HAVE_ERR_H
|
||||
#include <err.h>
|
||||
#endif
|
||||
#if HAVE_FNMATCH_H
|
||||
#include <fnmatch.h>
|
||||
#endif
|
||||
#include "lib.h"
|
||||
#include "dewey.h"
|
||||
|
||||
|
@ -1,8 +1,14 @@
|
||||
/* $NetBSD: version.c,v 1.1 2001/03/05 16:53:14 wiz Exp $ */
|
||||
/* $NetBSD: version.c,v 1.2 2005/11/05 13:11:02 wiz Exp $ */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <nbcompat.h>
|
||||
#if HAVE_SYS_CDEFS_H
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: version.c,v 1.1 2001/03/05 16:53:14 wiz Exp $");
|
||||
__RCSID("$NetBSD: version.c,v 1.2 2005/11/05 13:11:02 wiz Exp $");
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -35,7 +41,9 @@ __RCSID("$NetBSD: version.c,v 1.1 2001/03/05 16:53:14 wiz Exp $");
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#include "lib.h"
|
||||
#include "version.h"
|
||||
|
Loading…
Reference in New Issue
Block a user