Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/mkdep Recognize --sysroot but don't document it or d...



details:   https://anonhg.NetBSD.org/src/rev/0546c917ee6e
branches:  trunk
changeset: 764360:0546c917ee6e
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Apr 17 22:35:22 2011 +0000

description:
Recognize --sysroot but don't document it or do anything about it for now.

diffstat:

 usr.bin/mkdep/mkdep.c |  15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diffs (57 lines):

diff -r 708e0c5007c1 -r 0546c917ee6e usr.bin/mkdep/mkdep.c
--- a/usr.bin/mkdep/mkdep.c     Sun Apr 17 20:37:43 2011 +0000
+++ b/usr.bin/mkdep/mkdep.c     Sun Apr 17 22:35:22 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mkdep.c,v 1.35 2010/05/26 18:07:34 christos Exp $ */
+/* $NetBSD: mkdep.c,v 1.36 2011/04/17 22:35:22 christos Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 #if !defined(lint)
 __COPYRIGHT("@(#) Copyright (c) 1999 The NetBSD Foundation, Inc.\
  All rights reserved.");
-__RCSID("$NetBSD: mkdep.c,v 1.35 2010/05/26 18:07:34 christos Exp $");
+__RCSID("$NetBSD: mkdep.c,v 1.36 2011/04/17 22:35:22 christos Exp $");
 #endif /* not lint */
 
 #include <sys/mman.h>
@@ -46,6 +46,7 @@
 #include <ctype.h>
 #include <err.h>
 #include <fcntl.h>
+#include <getopt.h>
 #include <locale.h>
 #include <paths.h>
 #include <stdio.h>
@@ -183,6 +184,11 @@
        return fbuf;
 }
 
+static struct option longopt[] = {
+       { "sysroot", 1, NULL, 'R' },
+       { NULL, 0, NULL, '\0' },
+};
+
 int
 main(int argc, char **argv)
 {
@@ -214,7 +220,7 @@
        opterr = 0;     /* stop getopt() bleating about errors. */
        for (;;) {
                ok_ind = optind;
-               ch = getopt(argc, argv, "aDdf:opqs:");
+               ch = getopt_long(argc, argv, "aDdf:opqRs:", longopt, NULL);
                switch (ch) {
                case -1:
                        ok_ind = optind;
@@ -242,6 +248,9 @@
                case 'q':       /* Quiet */
                        qflag = 1;
                        continue;
+               case 'R':
+                       /* sysroot = optarg */
+                       continue;
                case 's':       /* Suffix list */
                        suffixes = optarg;
                        continue;



Home | Main Index | Thread Index | Old Index