On Mon, Apr 21, 2008 at 12:25 AM, Mark Glines <[EMAIL PROTECTED]> wrote:

>  (Still debatable whether the rest of that #else clause in parrot.h is
>  valid, if it's causing issues like this one.)

This patch can avoid future problems, by defining and using using
specific macros.

I searched the source tree, looks like textdomain and bindtextdomein
are used only in src/main.c and include/parrot/parrot.h, but I can't
test now in a system without gettext.

-- 
Salu2
Index: src/main.c
===================================================================
--- src/main.c	(revisión: 27079)
+++ src/main.c	(copia de trabajo)
@@ -44,8 +44,8 @@
 
     /* internationalization setup */
     /* setlocale(LC_ALL, ""); */
-    bindtextdomain(PACKAGE, LOCALEDIR);
-    textdomain(PACKAGE);
+    PARROT_BINDTEXTDOMAIN(PACKAGE, LOCALEDIR);
+    PARROT_TEXTDOMAIN(PACKAGE);
 
     Parrot_set_config_hash();
 
Index: include/parrot/parrot.h
===================================================================
--- include/parrot/parrot.h	(revisión: 27079)
+++ include/parrot/parrot.h	(copia de trabajo)
@@ -251,11 +251,13 @@
 #  define _(s)                 gettext(s)
 #  define gettext_noop(s)      (s)
 #  define N_(s)                gettext_noop(s)
+#  define PARROT_TEXTDOMAIN(d) textdomain(d)
+#  define PARROT_BINDTEXTDOMAIN(p, d) bindtextdomain((p), (d))
 #else
 #  define _(s)                 (s)
 #  define N_(s)                (s)
-#  define textdomain(d)
-#  define bindtextdomain(p, d)
+#  define PARROT_TEXTDOMAIN(d)
+#  define PARROT_BINDTEXTDOMAIN(p, d)
 #endif /* PARROT_HAS_GETTEXT */
 
 #define PACKAGE     "parrot"

Reply via email to