Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/apply fix nested extern



details:   https://anonhg.NetBSD.org/src/rev/c232b2ef23f5
branches:  trunk
changeset: 503367:c232b2ef23f5
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Feb 05 01:20:12 2001 +0000

description:
fix nested extern
rename system to shell_system so that it does not conflict with libc

diffstat:

 usr.bin/apply/apply.c |  15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diffs (61 lines):

diff -r 3167a34b3aa2 -r c232b2ef23f5 usr.bin/apply/apply.c
--- a/usr.bin/apply/apply.c     Mon Feb 05 01:12:46 2001 +0000
+++ b/usr.bin/apply/apply.c     Mon Feb 05 01:20:12 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: apply.c,v 1.8 2000/01/14 06:21:25 mjl Exp $    */
+/*     $NetBSD: apply.c,v 1.9 2001/02/05 01:20:12 christos Exp $       */
 
 /*-
  * Copyright (c) 1994
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = "@(#)apply.c    8.4 (Berkeley) 4/4/94";
 #else
-__RCSID("$NetBSD: apply.c,v 1.8 2000/01/14 06:21:25 mjl Exp $");
+__RCSID("$NetBSD: apply.c,v 1.9 2001/02/05 01:20:12 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -58,7 +58,9 @@
 
 int    main __P((int, char **));
 void   usage __P((void));
-int    system __P((const char *));
+int    shell_system __P((const char *));
+
+extern char *__progname;
 
 int
 main(argc, argv)
@@ -180,7 +182,7 @@
                if (debug)
                        (void)printf("%s\n", c);
                else
-                       if (system(c))
+                       if (shell_system(c))
                                rval = 1;
        }
 
@@ -191,12 +193,12 @@
 }
 
 /*
- * system --
+ * shell_system --
  *     Private version of system(3).  Use the user's SHELL environment
  *     variable as the shell to execute.
  */
 int
-system(command)
+shell_system(command)
        const char *command;
 {
        static char *name, *shell;
@@ -238,7 +240,6 @@
 void
 usage()
 {
-       extern char *__progname;
        (void)fprintf(stderr,
            "Usage: %s [-a magic] [-0123456789] command arguments ...\n",
            __progname);



Home | Main Index | Thread Index | Old Index