]> git.pond.sub.org Git - empserver/commitdiff
(getopt) [_WIN32]: In order to prevent namespace conflict between MSC and
authorRon Koenderink <rkoenderink@yahoo.ca>
Sun, 19 Aug 2007 01:37:25 +0000 (01:37 +0000)
committerRon Koenderink <rkoenderink@yahoo.ca>
Sun, 19 Aug 2007 01:37:25 +0000 (01:37 +0000)
MinGW created an extern getopt() in unistd.h.  MinGW has getopt() in the library.
MSC does not have getopt() function.

src/lib/w32/unistd.h

index 5d5d77642b1b13e3693a92d0a8443048258ecdb8..5bce09be18e3741e4edf2ffc1d41f9c070c2c118 100644 (file)
 #include <stdio.h>
 #undef fileno
 #include "sys/socket.h"
-#include "getopt.h"
 #include <sys/stat.h>
 
+/*
+ * getopt.c
+ */
+extern int getopt(int, char * const[], const char *);
+extern char *optarg;
+extern int optind, opterr, optopt;
+
 /*
  * posixfile.c
  */