lbl/os-sunos4.h \
lbl/os-ultrix4.h \
missing/getopt.c \
+ missing/getopt.h \
missing/snprintf.c \
mkdep \
msdos/bin2c.c \
--- /dev/null
+/*
+ * Header for the getopt() we supply if the platform doesn't supply it.
+ */
+extern char *optarg; /* getopt(3) external variables */
+extern int optind, opterr, optopt;
+
+extern int getopt(int nargc, char * const *nargv, const char *ostr);
*/
#ifndef lint
-static const char copyright[] =
+static const char copyright[] _U_ =
"@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000\n\
The Regents of the University of California. All rights reserved.\n";
#endif
*/
#ifndef lint
-static const char copyright[] =
+static const char copyright[] _U_ =
"@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000\n\
The Regents of the University of California. All rights reserved.\n";
#endif
#include <string.h>
#include <stdarg.h>
#include <limits.h>
-#ifndef _WIN32
+#ifdef _WIN32
+#include "getopt.h"
+#else
#include <unistd.h>
#endif
#include <errno.h>
#include <sys/types.h>
-#ifndef _WIN32
-#include <sys/select.h>
-#include <poll.h>
-#endif
#include <pcap.h>
static pcap_t *pd;
-extern int optind;
-extern int opterr;
-extern char *optarg;
-
int
main(int argc, char **argv)
{
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
-#ifndef _WIN32
+#ifdef _WIN32
+#include "getopt.h"
+#else
#include <unistd.h>
#endif
#include <fcntl.h>
static void warn(const char *, ...)
__attribute__((format (printf, 1, 2)));
-extern int optind;
-extern int opterr;
-extern char *optarg;
#ifdef BDEBUG
int dflag;
#endif
*/
#ifndef lint
-static const char copyright[] =
+static const char copyright[] _U_ =
"@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000\n\
The Regents of the University of California. All rights reserved.\n";
#endif
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
+#ifdef _WIN32
+#include "getopt.h"
+#else
#include <unistd.h>
+#endif
#include <errno.h>
#define MAXIMUM_SNAPLEN 65535
static void error(const char *, ...);
static void warning(const char *, ...);
-extern int optind;
-extern int opterr;
-extern char *optarg;
-
int
main(int argc, char **argv)
{
*/
#ifndef lint
-static const char copyright[] =
+static const char copyright[] _U_ =
"@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000\n\
The Regents of the University of California. All rights reserved.\n";
#endif
*/
#ifndef lint
-static const char copyright[] =
+static const char copyright[] _U_ =
"@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000\n\
The Regents of the University of California. All rights reserved.\n";
#endif
static pcap_t *pd;
-extern int optind;
-extern int opterr;
-extern char *optarg;
-
int
main(int argc, char **argv)
{
static void warning(const char *, ...)
__attribute__((format (printf, 1, 2)));
-extern int optind;
-extern int opterr;
-extern char *optarg;
-
/*
* On Windows, we need to open the file in binary mode, so that
* we get all the bytes specified by the size we get from "fstat()".