summaryrefslogtreecommitdiffstats
path: root/sbin/ldconfig/ldconfig.c
diff options
context:
space:
mode:
authornate <nate@FreeBSD.org>1994-12-23 22:31:35 +0000
committernate <nate@FreeBSD.org>1994-12-23 22:31:35 +0000
commit7f56eb7b93f7774321c3f5924447d96ffcb858b9 (patch)
tree44d4ecee16a0e6d497426a41a2bdd4542c4c3342 /sbin/ldconfig/ldconfig.c
parent92495f8331471c4b72fe0037463cdac16b87b02e (diff)
downloadFreeBSD-src-7f56eb7b93f7774321c3f5924447d96ffcb858b9.zip
FreeBSD-src-7f56eb7b93f7774321c3f5924447d96ffcb858b9.tar.gz
Updated to recent version of Paul K.'s shlib code. This code has better
warning handling and allows for link-time warnings with a modified version of gas. Note: Not all of the newer bits were updated such as some of the non-x86 machine-dependant code is relevant to FreeBSD right now. Obtained from: NetBSD
Diffstat (limited to 'sbin/ldconfig/ldconfig.c')
-rw-r--r--sbin/ldconfig/ldconfig.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/sbin/ldconfig/ldconfig.c b/sbin/ldconfig/ldconfig.c
index b31271f..74f7f15 100644
--- a/sbin/ldconfig/ldconfig.c
+++ b/sbin/ldconfig/ldconfig.c
@@ -27,7 +27,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: ldconfig.c,v 1.6 1994/06/05 19:04:11 ats Exp $
+ * $Id: ldconfig.c,v 1.7 1994/06/15 22:40:56 rich Exp $
*/
#include <sys/param.h>
@@ -54,7 +54,8 @@
#undef major
#undef minor
-char *progname;
+extern char *__progname;
+
static int verbose;
static int nostd;
static int justread;
@@ -84,12 +85,6 @@ char *argv[];
{
int i, c;
int rval = 0;
- extern int optind;
-
- if ((progname = strrchr(argv[0], '/')) == NULL)
- progname = argv[0];
- else
- progname++;
while ((c = getopt(argc, argv, "rsv")) != EOF) {
switch (c) {
@@ -103,7 +98,8 @@ char *argv[];
justread = 1;
break;
default:
- fprintf(stderr, "Usage: %s [-r] [-s] [-v] [dir ...]\n", progname);
+ fprintf(stderr, "Usage: %s [-r][-s][-v][dir ...]\n",
+ __progname);
exit(1);
break;
}
@@ -368,7 +364,7 @@ listhints()
}
msize = PAGSIZ;
- addr = mmap(0, msize, PROT_READ, MAP_FILE|MAP_COPY, fd, 0);
+ addr = mmap(0, msize, PROT_READ, MAP_COPY, fd, 0);
if (addr == (caddr_t)-1) {
perror(_PATH_LD_HINTS);
@@ -389,7 +385,7 @@ listhints()
if (hdr->hh_ehints > msize) {
if (mmap(addr+msize, hdr->hh_ehints - msize,
- PROT_READ, MAP_FILE|MAP_COPY|MAP_FIXED,
+ PROT_READ, MAP_COPY|MAP_FIXED,
fd, msize) != (caddr_t)(addr+msize)) {
perror(_PATH_LD_HINTS);
OpenPOWER on IntegriCloud