summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoerg <joerg>2008-02-04 14:28:27 +0000
committerjoerg <joerg>2008-02-04 14:28:27 +0000
commit341ea06b914937208b58066688f51ae12d55f949 (patch)
treed05b90ac6dc5d7c61e6e90aac1288038aba43712
parent9996c240858d8b06893cb3dda12e12c7aa01f56c (diff)
downloadpkgsrc-341ea06b914937208b58066688f51ae12d55f949.tar.gz
pen.c only uses statvfs.h and the necessary headers are included by
libnbcompat.h already. So don't include sys/param.h and sys/mount.h in it and remove the configure test for sys/mount.h. While here, remove some #if 0'd code from pen.c.
-rwxr-xr-xpkgtools/pkg_install/files/configure3
-rw-r--r--pkgtools/pkg_install/files/configure.ac2
-rw-r--r--pkgtools/pkg_install/files/lib/config.h.in3
-rw-r--r--pkgtools/pkg_install/files/lib/pen.c41
4 files changed, 4 insertions, 45 deletions
diff --git a/pkgtools/pkg_install/files/configure b/pkgtools/pkg_install/files/configure
index 3ae0db43b66..903c903899b 100755
--- a/pkgtools/pkg_install/files/configure
+++ b/pkgtools/pkg_install/files/configure
@@ -4818,8 +4818,7 @@ done
-
-for ac_header in sys/cdefs.h sys/file.h sys/ioctl.h sys/mount.h sys/param.h \
+for ac_header in sys/cdefs.h sys/file.h sys/ioctl.h sys/param.h \
sys/poll.h sys/queue.h sys/resource.h sys/signal.h sys/stat.h \
sys/statvfs.h sys/time.h sys/types.h sys/utsname.h sys/vfs.h \
sys/wait.h
diff --git a/pkgtools/pkg_install/files/configure.ac b/pkgtools/pkg_install/files/configure.ac
index 6dc7ec792e6..9dceb2014a0 100644
--- a/pkgtools/pkg_install/files/configure.ac
+++ b/pkgtools/pkg_install/files/configure.ac
@@ -78,7 +78,7 @@ AC_CHECK_HEADERS([assert.h ctype.h dirent.h err.h errno.h fnctl.h \
pwd.h regex.h signal.h stdarg.h stdio.h stdlib.h string.h \
termcap.h termios.h time.h unistd.h vis.h])
AC_CHECK_HEADERS([db1/db.h db_185.h db.h])
-AC_CHECK_HEADERS([sys/cdefs.h sys/file.h sys/ioctl.h sys/mount.h sys/param.h \
+AC_CHECK_HEADERS([sys/cdefs.h sys/file.h sys/ioctl.h sys/param.h \
sys/poll.h sys/queue.h sys/resource.h sys/signal.h sys/stat.h \
sys/statvfs.h sys/time.h sys/types.h sys/utsname.h sys/vfs.h \
sys/wait.h])
diff --git a/pkgtools/pkg_install/files/lib/config.h.in b/pkgtools/pkg_install/files/lib/config.h.in
index e6d54d1af52..f662a6f1994 100644
--- a/pkgtools/pkg_install/files/lib/config.h.in
+++ b/pkgtools/pkg_install/files/lib/config.h.in
@@ -102,9 +102,6 @@
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
-/* Define to 1 if you have the <sys/mount.h> header file. */
-#undef HAVE_SYS_MOUNT_H
-
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
diff --git a/pkgtools/pkg_install/files/lib/pen.c b/pkgtools/pkg_install/files/lib/pen.c
index d952e0a98b9..dd73a0de2e5 100644
--- a/pkgtools/pkg_install/files/lib/pen.c
+++ b/pkgtools/pkg_install/files/lib/pen.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pen.c,v 1.21 2007/09/08 09:45:22 rillig Exp $ */
+/* $NetBSD: pen.c,v 1.22 2008/02/04 14:28:27 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -11,7 +11,7 @@
#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.21 2007/09/08 09:45:22 rillig Exp $");
+__RCSID("$NetBSD: pen.c,v 1.22 2008/02/04 14:28:27 joerg Exp $");
#endif
#endif
@@ -42,12 +42,6 @@ __RCSID("$NetBSD: pen.c,v 1.21 2007/09/08 09:45:22 rillig Exp $");
#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];
@@ -57,37 +51,6 @@ static int CurrentSet; /* rm -fr Current only if it's really set! */
* to prevent rm'ing of a partial string
* when interrupted by ^C */
-#if 0
-/*
- * Backup Current and Previous into temp. strings that are later
- * restored & freed by restore_dirs
- * This is to make nested calls to make_playpen/leave_playpen work
- */
-void
-save_dirs(char **c, char **p)
-{
- *c = strdup(Current); /* XXX */
- *p = strdup(Previous);
-}
-
-/*
- * Restore Current and Previous from temp strings that were created
- * by safe_dirs.
- * This is to make nested calls to make_playpen/leave_playpen work
- */
-void
-restore_dirs(char *c, char *p)
-{
- CurrentSet = 0; /* prevent from deleting */
- strlcpy(Current, c, sizeof(Current));
- CurrentSet = 1; /* rm -fr Current is safe now */
- free(c);
-
- strlcpy(Previous, p, sizeof(Previous));
- free(p);
-}
-#endif
-
char *
where_playpen(void)
{