* %End-Header%
*/
+#include "config.h"
#include <stdio.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#else
+extern int getopt(int argc, char * const argv[], const char *optstring);
extern char *optarg;
extern int optind;
#endif
#include "uuid/uuid.h"
-#include "nls-enable.h"
+#include "support/nls-enable.h"
#define DO_TYPE_TIME 1
#define DO_TYPE_RANDOM 2
char str[37];
uuid_t uu;
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+#endif
+
while ((c = getopt (argc, argv, "tr")) != EOF)
switch (c) {
case 't':
default:
usage(argv[0]);
}
-
+
switch (do_type) {
case DO_TYPE_TIME:
uuid_generate_time(uu);
uuid_generate(uu);
break;
}
-
+
uuid_unparse(uu, str);
printf("%s\n", str);