From 71669b18588d4369e7287eaa9c41c1a5770af9ea Mon Sep 17 00:00:00 2001 From: Ron Koenderink Date: Sun, 19 Aug 2007 01:37:25 +0000 Subject: [PATCH] (getopt) [_WIN32]: In order to prevent namespace conflict between MSC and 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 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/w32/unistd.h b/src/lib/w32/unistd.h index 5d5d77642..5bce09be1 100644 --- a/src/lib/w32/unistd.h +++ b/src/lib/w32/unistd.h @@ -38,9 +38,15 @@ #include #undef fileno #include "sys/socket.h" -#include "getopt.h" #include +/* + * getopt.c + */ +extern int getopt(int, char * const[], const char *); +extern char *optarg; +extern int optind, opterr, optopt; + /* * posixfile.c */ -- 2.43.0