Module Name:    src
Committed By:   christos
Date:           Fri Jun  5 20:12:56 UTC 2015

Modified Files:
        src/lib/libintl: libintl.h

Log Message:
Make the cpp protection macro name consistent with other headers.
Fix problems caused by the new macros introduced for gnu gettext compatibility.
XXX: Must be a better way...


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libintl/libintl.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libintl/libintl.h
diff -u src/lib/libintl/libintl.h:1.5 src/lib/libintl/libintl.h:1.6
--- src/lib/libintl/libintl.h:1.5	Fri May 29 08:26:28 2015
+++ src/lib/libintl/libintl.h	Fri Jun  5 16:12:56 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: libintl.h,v 1.5 2015/05/29 12:26:28 christos Exp $	*/
+/*	$NetBSD: libintl.h,v 1.6 2015/06/05 20:12:56 christos Exp $	*/
 
 /*-
  * Copyright (c) 2000 Citrus Project,
@@ -26,11 +26,17 @@
  * SUCH DAMAGE.
  */
 
-#ifndef __LIBINTL_H_DEFINED__
-#define __LIBINTL_H_DEFINED__
+#ifndef _LIBINTL_H_
+#define _LIBINTL_H_
 
 #include <sys/cdefs.h>
 
+#ifndef _LIBGETTEXT_H
+/*
+ * Avoid defining these if the GNU gettext compatibility header includes
+ * us, since it re-defines those unconditionally and creates inline functions
+ * for some of them. This is horrible.
+ */
 #define pgettext_expr(msgctxt, msgid) pgettext((msgctxt), (msgid))
 #define dpggettext_expr(domainname, msgctxt, msgid) \
     dpgettext((domainname), (msgctxt), (msgid))
@@ -42,6 +48,7 @@
     dnpgettext((domainname), (msgctxt), (msgid1), (msgid2), (n))
 #define dcnpgettext_expr(domainname, msgctxt, msgid1, msgid2, n, category) \
     dcnpgettext((domainname), (msgctxt), (msgid1), (msgid2), (n), (category))
+#endif
 
 __BEGIN_DECLS
 char *gettext(const char *) __format_arg(1);
@@ -72,4 +79,4 @@ char *bindtextdomain(const char *, const
 char *bind_textdomain_codeset(const char *, const char *);
 __END_DECLS
 
-#endif /*__LIBINTL_H_DEFINED__*/
+#endif /* _LIBINTL_H_ */

Reply via email to