pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_install/files pen.c only uses statvfs.h a...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/77075a84a444
branches:  trunk
changeset: 538275:77075a84a444
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Mon Feb 04 14:28:27 2008 +0000

description:
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.

diffstat:

 pkgtools/pkg_install/files/configure       |   3 +-
 pkgtools/pkg_install/files/configure.ac    |   2 +-
 pkgtools/pkg_install/files/lib/config.h.in |   3 --
 pkgtools/pkg_install/files/lib/pen.c       |  41 +----------------------------
 4 files changed, 4 insertions(+), 45 deletions(-)

diffs (107 lines):

diff -r 32e8f917d733 -r 77075a84a444 pkgtools/pkg_install/files/configure
--- a/pkgtools/pkg_install/files/configure      Mon Feb 04 14:03:10 2008 +0000
+++ b/pkgtools/pkg_install/files/configure      Mon Feb 04 14:28:27 2008 +0000
@@ -4818,8 +4818,7 @@
 
 
 
-
-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 -r 32e8f917d733 -r 77075a84a444 pkgtools/pkg_install/files/configure.ac
--- a/pkgtools/pkg_install/files/configure.ac   Mon Feb 04 14:03:10 2008 +0000
+++ b/pkgtools/pkg_install/files/configure.ac   Mon Feb 04 14:28:27 2008 +0000
@@ -78,7 +78,7 @@
        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 -r 32e8f917d733 -r 77075a84a444 pkgtools/pkg_install/files/lib/config.h.in
--- a/pkgtools/pkg_install/files/lib/config.h.in        Mon Feb 04 14:03:10 2008 +0000
+++ b/pkgtools/pkg_install/files/lib/config.h.in        Mon Feb 04 14:28:27 2008 +0000
@@ -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 -r 32e8f917d733 -r 77075a84a444 pkgtools/pkg_install/files/lib/pen.c
--- a/pkgtools/pkg_install/files/lib/pen.c      Mon Feb 04 14:03:10 2008 +0000
+++ b/pkgtools/pkg_install/files/lib/pen.c      Mon Feb 04 14:28:27 2008 +0000
@@ -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 @@
 #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 @@
                                 * 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)
 {



Home | Main Index | Thread Index | Old Index