#include <ac/string.h>
#include <ac/unistd.h>
+#ifdef HAVE_IO_H
+#include <io.h>
+#endif
+
+#ifndef STDERR_FILENO
+#define STDERR_FILENO 2
+#endif
+
int opterr = 1;
int optind = 1;
int optopt;
char * optarg;
-static void ERR (char ** argv, char * s, char c)
+static void ERR (char * const argv[], const char * s, char c)
{
char errbuf[2];
}
}
-int getopt (int argc, char ** argv, char * opts)
+int getopt (int argc, char * const argv [], const char * opts)
{
static int sp = 1, error = (int) '?';
static char sw = '-', eos = '\0', arg = ':';