summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorguy <guy>2005-01-04 00:11:46 +0000
committerguy <guy>2005-01-04 00:11:46 +0000
commita0320219fe7f1c474d80eac7cffa90044ce2e7e9 (patch)
tree8fc97688f5770d9d59efb8c8414a9da598024e29 /win32
parent48ae91da0cd87ef593cc3c330bfc949613f9d8b0 (diff)
downloadtcpdump-a0320219fe7f1c474d80eac7cffa90044ce2e7e9.tar.gz
From Gisle Vanem: use the correct program name.
Diffstat (limited to 'win32')
-rw-r--r--win32/Src/getopt.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/win32/Src/getopt.c b/win32/Src/getopt.c
index 03c2086e..be74ef0d 100644
--- a/win32/Src/getopt.c
+++ b/win32/Src/getopt.c
@@ -59,11 +59,7 @@ getopt(nargc, nargv, ostr)
char * const *nargv;
const char *ostr;
{
-#ifdef WIN32
- char *__progname="windump";
-#else
- extern char *__progname;
-#endif
+ extern char *program_name;
static char *place = EMSG; /* option letter processing */
char *oli; /* option letter list index */
@@ -91,7 +87,7 @@ getopt(nargc, nargv, ostr)
++optind;
if (opterr && *ostr != ':')
(void)fprintf(stderr,
- "%s: illegal option -- %c\n", __progname, optopt);
+ "%s: illegal option -- %c\n", program_name, optopt);
return (BADCH);
}
if (*++oli != ':') { /* don't need argument */
@@ -109,7 +105,7 @@ getopt(nargc, nargv, ostr)
if (opterr)
(void)fprintf(stderr,
"%s: option requires an argument -- %c\n",
- __progname, optopt);
+ program_name, optopt);
return (BADCH);
}
else /* white space */