fix nested extern

rename system to shell_system so that it does not conflict with libc
This commit is contained in:
christos 2001-02-05 01:20:12 +00:00
parent b67c82fdfe
commit ffa8eefe34
1 changed files with 8 additions and 7 deletions

View File

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