#endif
#endif
-
+#ifndef WIN32
#ifdef HAVE_CONFIG_H
#include "../rrd_config.h"
#endif
+#endif
#include "rrd_i18n.h"
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
considered as options. */
char var[100];
- sprintf(var, "_%d_GNU_nonoption_argv_flags_", getpid());
+ snprintf(var, sizeof var, "_%d_GNU_nonoption_argv_flags_", getpid());
nonoption_flags = getenv(var);
if (nonoption_flags == NULL)
nonoption_flags_len = 0;
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,
}
}
-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. */
\f
#ifdef TEST