Code

fix MSVC2008 compilation ... it does not understand char *const *argv iin rrd_getopt
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Tue, 31 Aug 2010 07:31:43 +0000 (07:31 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Tue, 31 Aug 2010 07:31:43 +0000 (07:31 +0000)
-- jkane mail.com

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@2124 a5681a0c-68f1-0310-ab6d-d61299d08faa

program/src/rrd_getopt.c
program/src/rrd_getopt1.c

index 0556c86a82602e2a3ea5c413d4e17cbd56a8a181..5f938f398b691366fd2165c68d4e1b65c18297f4 100644 (file)
@@ -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,
index 32e54915debc31989234ca87b960230f569f4f3d..15bd2a974be276ee5b0dc18a9387771c032fc576 100644 (file)
 #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)