OSDN Git Service

getopt[-susv3].c: use libintl's _(x)
authorPeter S. Mazinger <ps.m@gmx.net>
Sun, 13 Mar 2011 14:36:32 +0000 (15:36 +0100)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Fri, 15 Jun 2012 12:00:23 +0000 (14:00 +0200)
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
libc/unistd/getopt-susv3.c
libc/unistd/getopt.c

index d7b8d0d..49f9626 100644 (file)
 #include <string.h>
 #include <stdio.h>
 #include <getopt.h>
-
-
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning TODO: Enable gettext awareness.
-#endif /* __UCLIBC_MJN3_ONLY__ */
-
-#undef _
-#define _(X)   X
+#include <libintl.h>
 
 #ifdef __BCC__
 static const char missing[] = "option requires an argument";
index f1ee0f4..a709b42 100644 (file)
 # include <unixlib.h>
 #endif
 
-#if !defined __UCLIBC__ && !defined __UCLIBC_HAS_GETTEXT_AWARENESS__
 #ifdef _LIBC
 # include <libintl.h>
 #else
 # include "gettext.h"
 # define _(msgid) gettext (msgid)
 #endif
-#else
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning TODO: Enable gettext awareness.
-#endif /* __UCLIBC_MJN3_ONLY__ */
-
-#undef _
-#define _(X)   X
-
-#endif
 
 /* Treat '-W foo' the same as the long option '--foo',
  * disabled for the moment since it costs about 2k... */