Source-Changes-HG archive

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

[src/trunk]: src/sbin fix nested extern



details:   https://anonhg.NetBSD.org/src/rev/486f012a198e
branches:  trunk
changeset: 503314:486f012a198e
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Feb 04 20:09:40 2001 +0000

description:
fix nested extern

diffstat:

 sbin/mknod/mknod.c  |  8 ++++----
 sbin/mount/Makefile |  5 +++--
 2 files changed, 7 insertions(+), 6 deletions(-)

diffs (56 lines):

diff -r f34c7dd2b53e -r 486f012a198e sbin/mknod/mknod.c
--- a/sbin/mknod/mknod.c        Sun Feb 04 20:08:24 2001 +0000
+++ b/sbin/mknod/mknod.c        Sun Feb 04 20:09:40 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mknod.c,v 1.19 2000/07/03 03:38:02 matt Exp $  */
+/*     $NetBSD: mknod.c,v 1.20 2001/02/04 20:09:40 christos Exp $      */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
 #include <sys/cdefs.h>
 #ifndef lint
 __COPYRIGHT("@(#) Copyright (c) 1998 The NetBSD Foundation, Inc.  All rights reserved.\n");
-__RCSID("$NetBSD: mknod.c,v 1.19 2000/07/03 03:38:02 matt Exp $");
+__RCSID("$NetBSD: mknod.c,v 1.20 2001/02/04 20:09:40 christos Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -88,6 +88,8 @@
 
 pack_t pack_netbsd;
 
+extern char *__progname;
+
 dev_t
 pack_netbsd(n, numbers)
        int n;
@@ -414,8 +416,6 @@
 static void
 usage()
 {
-       extern char *__progname;
-
        (void)fprintf(stderr,
            "Usage: %s [-F format] name [b | c] major minor\n", __progname);
        (void)fprintf(stderr,
diff -r f34c7dd2b53e -r 486f012a198e sbin/mount/Makefile
--- a/sbin/mount/Makefile       Sun Feb 04 20:08:24 2001 +0000
+++ b/sbin/mount/Makefile       Sun Feb 04 20:09:40 2001 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.18 2001/01/16 02:37:35 cgd Exp $
+#      $NetBSD: Makefile,v 1.19 2001/02/04 20:12:32 christos Exp $
 #      @(#)Makefile    8.6 (Berkeley) 5/8/95
 
 PROG=  mount
@@ -47,8 +47,9 @@
          done;                                                 \
          echo "void checkname(int, char **);";                 \
          echo;                                                 \
+         echo "extern const char *__progname;";                \
+         echo;                                                 \
          echo "void checkname(int argc, char **argv) {";       \
-         echo "  extern const char *__progname;";              \
          echo "if (strcmp(__progname, \"mount\") == 0) return;";       \
          for p in ${MOUNT_PROGS}; do                           \
                echo "if (strcmp(__progname, \"$$p\") == 0)";   \



Home | Main Index | Thread Index | Old Index