From 28a2150521548582386dcadda9e25f8124cb0e9a Mon Sep 17 00:00:00 2001 From: oetiker Date: Tue, 31 Aug 2010 07:31:43 +0000 Subject: [PATCH] fix MSVC2008 compilation ... it does not understand char *const *argv iin rrd_getopt -- jkane mail.com git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@2124 a5681a0c-68f1-0310-ab6d-d61299d08faa --- src/rrd_getopt.c | 4 ++++ src/rrd_getopt1.c | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/src/rrd_getopt.c b/src/rrd_getopt.c index 0556c86..5f938f3 100644 --- a/src/rrd_getopt.c +++ b/src/rrd_getopt.c @@ -465,7 +465,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, diff --git a/src/rrd_getopt1.c b/src/rrd_getopt1.c index 32e5491..15bd2a9 100644 --- a/src/rrd_getopt1.c +++ b/src/rrd_getopt1.c @@ -66,7 +66,11 @@ #endif int getopt_long(int argc, +#ifdef WIN32 + char** argv, +#else // WIN32 char* const* argv, +#endif //WIN32 const char* options, const struct option* long_options, int* opt_index) @@ -80,7 +84,11 @@ int getopt_long(int argc, instead. */ int getopt_long_only(int argc, +#ifdef WIN32 + char** argv, +#else // WIN32 char* const* argv, +#endif //WIN32 const char* options, const struct option* long_options, int* opt_index) -- 2.30.2