summary refs log tree commit diff
path: root/include/libintl.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libintl.h')
-rw-r--r--include/libintl.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/libintl.h b/include/libintl.h
index 3763b04c5f..a772853c02 100644
--- a/include/libintl.h
+++ b/include/libintl.h
@@ -6,4 +6,20 @@ extern char *__gettext __P ((__const char *__msgid));
 extern char *__textdomain __P ((__const char *__domainname));
 extern char *__bindtextdomain __P ((__const char *__domainname,
 				    __const char *__dirname));
+extern const char _libc_intl_domainname[];
+
+/* Define the macros `_' and `N_' for conveniently marking translatable
+   strings in the libc source code.  */
+
+# define N_(msgid)	msgid
+
+# ifdef dgettext
+/* This is defined as an optimizing macro, so use it.  */
+#  define _(msgid)	dgettext (_libc_intl_domainname, (msgid))
+# else
+/* Be sure to use only the __ name when `dgettext' is a plain function
+   instead of an optimizing macro.  */
+#  define _(msgid)	__dgettext (_libc_intl_domainname, (msgid))
+# endif
+
 #endif