diff options
author | joerg <joerg@pkgsrc.org> | 2007-08-15 01:49:02 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2007-08-15 01:49:02 +0000 |
commit | 654318ad90d949878457890bb2ffcfeb5e77622a (patch) | |
tree | 98570159e9b4a066bfeac976212deed5432a8804 /pkgtools | |
parent | e6e218838d60c583601bcb8cca5c3622d33afa7c (diff) | |
download | pkgsrc-654318ad90d949878457890bb2ffcfeb5e77622a.tar.gz |
Make _pkgdb_getPKGDB_DIR return const char * and fix fallout.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkg_install/files/admin/main.c | 9 | ||||
-rw-r--r-- | pkgtools/pkg_install/files/audit-packages/audit-packages.c | 10 | ||||
-rw-r--r-- | pkgtools/pkg_install/files/delete/main.c | 6 | ||||
-rw-r--r-- | pkgtools/pkg_install/files/info/main.c | 6 | ||||
-rw-r--r-- | pkgtools/pkg_install/files/lib/lib.h | 4 | ||||
-rw-r--r-- | pkgtools/pkg_install/files/lib/pkgdb.c | 6 |
6 files changed, 21 insertions, 20 deletions
diff --git a/pkgtools/pkg_install/files/admin/main.c b/pkgtools/pkg_install/files/admin/main.c index 5c4468246a6..e744cf10c89 100644 --- a/pkgtools/pkg_install/files/admin/main.c +++ b/pkgtools/pkg_install/files/admin/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.29 2007/08/12 22:09:02 joerg Exp $ */ +/* $NetBSD: main.c,v 1.30 2007/08/15 01:49:02 joerg Exp $ */ #if HAVE_CONFIG_H #include "config.h" @@ -8,7 +8,7 @@ #include <sys/cdefs.h> #endif #ifndef lint -__RCSID("$NetBSD: main.c,v 1.29 2007/08/12 22:09:02 joerg Exp $"); +__RCSID("$NetBSD: main.c,v 1.30 2007/08/15 01:49:02 joerg Exp $"); #endif /* @@ -230,7 +230,8 @@ add1pkg(const char *pkgdir) plist_t *p; package_t Plist; char contents[MaxPathSize]; - char *PkgDBDir, *PkgName, *dirp; + const char *PkgDBDir; + char *PkgName, *dirp; char file[MaxPathSize]; char dir[MaxPathSize]; int cnt = 0; @@ -323,7 +324,7 @@ rebuild(void) { DIR *dp; struct dirent *de; - char *PkgDBDir; + const char *PkgDBDir; char cachename[MaxPathSize]; pkgcnt = 0; diff --git a/pkgtools/pkg_install/files/audit-packages/audit-packages.c b/pkgtools/pkg_install/files/audit-packages/audit-packages.c index 1c7f7781adc..e5828758cec 100644 --- a/pkgtools/pkg_install/files/audit-packages/audit-packages.c +++ b/pkgtools/pkg_install/files/audit-packages/audit-packages.c @@ -1,4 +1,4 @@ -/* $NetBSD: audit-packages.c,v 1.9 2007/08/10 22:50:46 adrianp Exp $ */ +/* $NetBSD: audit-packages.c,v 1.10 2007/08/15 01:49:02 joerg Exp $ */ /* * Copyright (c) 2007 Adrian Portelli <adrianp@NetBSD.org>. @@ -126,10 +126,10 @@ int check_sig(char *); int pv_message(char *[]); int ap_ignore(char *[]); void show_info(char *); -void set_pvfile(char *); +void set_pvfile(const char *); char *clean_conf(char *); int get_confvalues(void); -char *safe_strdup(char *); +char *safe_strdup(const char *); /* * TODO: @@ -1035,7 +1035,7 @@ show_info(char *varname) /* set the location for the pkg-vulnerabilities file */ void -set_pvfile(char *vuln_dir) +set_pvfile(const char *vuln_dir) { char *pvloc = NULL; size_t retval; @@ -1053,7 +1053,7 @@ set_pvfile(char *vuln_dir) /* duplicate a string and check the return value */ char * -safe_strdup(char *dupe) +safe_strdup(const char *dupe) { char *retval; diff --git a/pkgtools/pkg_install/files/delete/main.c b/pkgtools/pkg_install/files/delete/main.c index 65100fc1240..0b9eb04906d 100644 --- a/pkgtools/pkg_install/files/delete/main.c +++ b/pkgtools/pkg_install/files/delete/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.18 2007/08/08 22:33:39 joerg Exp $ */ +/* $NetBSD: main.c,v 1.19 2007/08/15 01:49:02 joerg Exp $ */ #if HAVE_CONFIG_H #include "config.h" @@ -11,7 +11,7 @@ #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.18 2007/08/08 22:33:39 joerg Exp $"); +__RCSID("$NetBSD: main.c,v 1.19 2007/08/15 01:49:02 joerg Exp $"); #endif #endif @@ -167,7 +167,7 @@ main(int argc, char **argv) errx(EXIT_FAILURE, "error expanding '%s' ('%s' nonexistent?)", *argv, _pkgdb_getPKGDB_DIR()); } } else { - char *dbdir; + const char *dbdir; dbdir = _pkgdb_getPKGDB_DIR(); if (**argv == '/' && strncmp(*argv, dbdir, strlen(dbdir)) == 0) { diff --git a/pkgtools/pkg_install/files/info/main.c b/pkgtools/pkg_install/files/info/main.c index fbf0a574732..512539023db 100644 --- a/pkgtools/pkg_install/files/info/main.c +++ b/pkgtools/pkg_install/files/info/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.19 2007/08/12 22:09:02 joerg Exp $ */ +/* $NetBSD: main.c,v 1.20 2007/08/15 01:49:02 joerg Exp $ */ #if HAVE_CONFIG_H #include "config.h" @@ -11,7 +11,7 @@ #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.19 2007/08/12 22:09:02 joerg Exp $"); +__RCSID("$NetBSD: main.c,v 1.20 2007/08/15 01:49:02 joerg Exp $"); #endif #endif @@ -315,7 +315,7 @@ main(int argc, char **argv) errx(EXIT_FAILURE, "Error during search in pkgdb for %s", *argv); } } else { - char *dbdir; + const char *dbdir; dbdir = _pkgdb_getPKGDB_DIR(); if (**argv == '/' && strncmp(*argv, dbdir, strlen(dbdir)) == 0) { diff --git a/pkgtools/pkg_install/files/lib/lib.h b/pkgtools/pkg_install/files/lib/lib.h index c55ffebf825..8082253d3c6 100644 --- a/pkgtools/pkg_install/files/lib/lib.h +++ b/pkgtools/pkg_install/files/lib/lib.h @@ -1,4 +1,4 @@ -/* $NetBSD: lib.h,v 1.34 2007/08/12 18:54:09 joerg Exp $ */ +/* $NetBSD: lib.h,v 1.35 2007/08/15 01:49:02 joerg Exp $ */ /* from FreeBSD Id: lib.h,v 1.25 1997/10/08 07:48:03 charnier Exp */ @@ -400,7 +400,7 @@ int pkgdb_remove(const char *); int pkgdb_remove_pkg(const char *); char *pkgdb_refcount_dir(void); char *_pkgdb_getPKGDB_FILE(char *, unsigned); -char *_pkgdb_getPKGDB_DIR(void); +const char *_pkgdb_getPKGDB_DIR(void); void _pkgdb_setPKGDB_DIR(const char *); /* List of packages functions */ diff --git a/pkgtools/pkg_install/files/lib/pkgdb.c b/pkgtools/pkg_install/files/lib/pkgdb.c index 5a602f6cd7d..87bca3ee1d7 100644 --- a/pkgtools/pkg_install/files/lib/pkgdb.c +++ b/pkgtools/pkg_install/files/lib/pkgdb.c @@ -1,4 +1,4 @@ -/* $NetBSD: pkgdb.c,v 1.26 2007/08/09 23:18:31 joerg Exp $ */ +/* $NetBSD: pkgdb.c,v 1.27 2007/08/15 01:49:02 joerg Exp $ */ #if HAVE_CONFIG_H #include "config.h" @@ -8,7 +8,7 @@ #include <sys/cdefs.h> #endif #ifndef lint -__RCSID("$NetBSD: pkgdb.c,v 1.26 2007/08/09 23:18:31 joerg Exp $"); +__RCSID("$NetBSD: pkgdb.c,v 1.27 2007/08/15 01:49:02 joerg Exp $"); #endif /* @@ -314,7 +314,7 @@ _pkgdb_getPKGDB_FILE(char *buf, unsigned size) /* * Return directory where pkgdb is stored */ -char * +const char * _pkgdb_getPKGDB_DIR(void) { char *tmp; |