X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_getopt.c;h=46f7313473caf6bc8b57f952e3b4e05e7c6e3ed9;hb=afcd0eb5b0e71964e9c5691b4a9794c2f4059928;hp=a74ff88de7a6bcc140c492cd2da5d5158414d471;hpb=46a2db0465372eae273b1ff827e465a779339198;p=rrdtool.git diff --git a/src/rrd_getopt.c b/src/rrd_getopt.c index a74ff88..46f7313 100644 --- a/src/rrd_getopt.c +++ b/src/rrd_getopt.c @@ -39,10 +39,11 @@ #endif #endif - +#ifndef WIN32 #ifdef HAVE_CONFIG_H #include "../rrd_config.h" #endif +#endif #include "rrd_i18n.h" @@ -360,7 +361,7 @@ static const char *_getopt_initialize( const char *); #endif static const char* _getopt_initialize(int argc, - char** argv, + char* const* argv, const char* optstring) { /* Start processing options with ARGV-element 1 (since ARGV-element 0 @@ -465,7 +466,11 @@ static const char* _getopt_initialize(int argc, long-named options. */ int _getopt_internal(int argc, +#ifdef WIN32 char** argv, +#else // WIN32 + char* const* argv, +#endif //WIN32 const char *optstring, const struct option *longopts, int* longind, @@ -869,15 +874,6 @@ int _getopt_internal(int argc, } } -int getopt( - int argc, - char** argv, - const char* optstring) -{ - return _getopt_internal(argc, argv, optstring, - (const struct option *) 0, (int *) 0, 0); -} - #endif /* Not ELIDE_CODE. */ #ifdef TEST