diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 2000-03-28 20:20:11 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 2000-03-28 20:20:11 +0000 |
commit | c317b042a8e3ecb1fc973ed1ea50793dda057bde (patch) | |
tree | ce47426a23e1b82bbcf72f23556a8e4d14484b4b /tethereal.c | |
parent | e38645134590c8a82bad7b5e2987bcff662fac6f (diff) | |
download | wireshark-c317b042a8e3ecb1fc973ed1ea50793dda057bde.tar.gz wireshark-c317b042a8e3ecb1fc973ed1ea50793dda057bde.tar.bz2 wireshark-c317b042a8e3ecb1fc973ed1ea50793dda057bde.zip |
Add getopt.c (from GNU libc) for use on Win32.
Ethereal/win32 now supports command-line options.
Tethereal now compiles on win32, except for the fact that I haven't
put the Makefile.nmake changes in for that yet.
svn path=/trunk/; revision=1758
Diffstat (limited to 'tethereal.c')
-rw-r--r-- | tethereal.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tethereal.c b/tethereal.c index 96c9857fcc..ff219f75f8 100644 --- a/tethereal.c +++ b/tethereal.c @@ -1,6 +1,6 @@ /* tethereal.c * - * $Id: tethereal.c,v 1.20 2000/02/22 07:07:46 guy Exp $ + * $Id: tethereal.c,v 1.21 2000/03/28 20:20:02 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -65,6 +65,10 @@ #include "strerror.h" #endif +#ifdef NEED_GETOPT_H +#include "getopt.h" +#endif + #include "globals.h" #include "timestamp.h" #include "packet.h" @@ -169,8 +173,12 @@ main(int argc, char *argv[]) extern char *optarg; gboolean arg_error = FALSE; #ifdef HAVE_LIBPCAP +#ifdef WIN32 + char pcap_version[] = "0.4a6"; +#else extern char pcap_version[]; #endif +#endif char *pf_path; int err; #ifdef HAVE_LIBPCAP @@ -586,8 +594,10 @@ capture(int packet_count, int out_file_type) use "sigaction()" and be done with it? */ signal(SIGTERM, capture_cleanup); signal(SIGINT, capture_cleanup); +#if !defined(WIN32) if ((oldhandler = signal(SIGHUP, capture_cleanup)) != SIG_DFL) signal(SIGHUP, oldhandler); +#endif /* Let the user know what interface was chosen. */ printf("Capturing on %s\n", cf.iface); |