The previous code relied on the assumption that pthread_cond_init(&cond)
[rrdtool.git] / src / rrd_getopt.c
index d03b456..50a61e8 100644 (file)
 #define _NO_PROTO
 #endif
 
-#ifdef HAVE_CONFIG_H
-#include "../rrd_config.h"
-#endif
-
 #if !defined (__STDC__) || !__STDC__
 /* This is a separate conditional since some stdc systems
    reject `defined (const)'.  */
 #endif
 #endif
 
+
+#ifdef HAVE_CONFIG_H
+#include "../rrd_config.h"
+#endif
+
+#include "rrd_i18n.h"
+
+
 #include <stdio.h>
 
 /* Comment out all this code if we are using the GNU C Library, and are not
 #define getpid() GetCurrentProcessId()
 #endif
 
-#ifndef _
-/* This is for other GNU distributions with internationalized messages.
-   When compiling libc, the _ macro is predefined.  */
-#ifdef HAVE_LIBINTL_H
-# include <libintl.h>
-# define _(msgid)      gettext (msgid)
-#else
-# define _(msgid)      (msgid)
-#endif
-#endif
-
 /* This version of `getopt' appears to the caller like standard Unix `getopt'
    but it behaves differently for the user, since it allows the user
    to intersperse the options with the other arguments.
@@ -190,7 +183,7 @@ int       optopt = '?';
    of the value of `ordering'.  In the case of RETURN_IN_ORDER, only
    `--' can cause `getopt' to return -1 with `optind' != ARGC.  */
 
-static const enum {
+static enum {
     REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
 } ordering;