summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/getopt.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/getopt.c b/lib/getopt.c
index a5bc2c95e..e852127f6 100644
--- a/lib/getopt.c
+++ b/lib/getopt.c
@@ -75,11 +75,12 @@
#endif
#ifndef _
-/* This is for other GNU distributions with internationalized messages.
- When compiling libc, the _ macro is predefined. */
-# ifdef HAVE_LIBINTL_H
+/* This is for other GNU distributions with internationalized messages. */
+# if defined HAVE_LIBINTL_H || defined _LIBC
# include <libintl.h>
-# define _(msgid) gettext (msgid)
+# ifndef _
+# define _(msgid) gettext (msgid)
+# endif
# else
# define _(msgid) (msgid)
# endif