diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-11-01 16:24:47 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-11-01 16:25:30 -0800 |
commit | a77491e209e49a16cda89508e86cf71c04d6a2c4 (patch) | |
tree | 4de74d3c42651543192c3ec8527b4fdd8962d9c5 /tests/valgrindtest.c | |
parent | 4093bb2c65f88be21036e7f443eeb0abd5ce3ff1 (diff) |
Add a "getopt.h" header and include it instead of <unistd.h> on Windows.
We include <unistd.h> for getopt(), but, on Windows, we supply our own
getopt() (as it's a UN*X API), so supply our own header and include that
instead.
While we're at it, mark the copyright strings as unused (to squelch
compiler warnings), and don't include the headers for select() or poll()
in capturetest.c, as we don't use those APIs there (that's what
selpolltest(), which is UN*X-only, is for). <unistd.h> or "getopt.h"
should declare the getopt() external variables, so don't declare them
ourselves.
Diffstat (limited to 'tests/valgrindtest.c')
-rw-r--r-- | tests/valgrindtest.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/tests/valgrindtest.c b/tests/valgrindtest.c index 72786e41..c825952e 100644 --- a/tests/valgrindtest.c +++ b/tests/valgrindtest.c @@ -85,10 +85,6 @@ static void error(const char *, ...) 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()". |