bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Texinfo bug/patch


From: Eli Zaretskii
Subject: Re: Texinfo bug/patch
Date: Fri, 11 Jan 2002 22:08:10 +0200

> Date: Fri, 11 Jan 2002 13:24:27 -0500 (EST)
> From: Tyler <address@hidden>
> 
> Error message received was:
> -DINFODIR=\"/usr/local/info\" -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE
> _CONFIG_H -I. -I../lib -I../intl -I.. -I.    -g -O2 -c info.c
> info.c:567:1: directives may not be used inside a macro argument
> info.c:567:1: unterminated argument list invoking macro "printf"
> info.c: In function `info_short_help':
> info.c:571: parse error before string constant
> make[2]: *** [info.o] Error 1

Does the patch below fix this?

2002-01-11  Eli Zaretskii  <address@hidden>

        * info/info.c (info_short_help): Use a conditionally defined
        variable instead of a conditional preprocessor directive inside
        printf.

--- info/info.c~0       Wed Dec 26 13:42:00 2001
+++ info/info.c Fri Jan 11 22:06:54 2002
@@ -527,6 +527,16 @@ info_error (format, arg1, arg2)
 static void
 info_short_help ()
 {
+#ifdef __MSDOS__
+  /* GCC 3.x barfs if you put a conditional cpp directive inside
+     printf if printf is a macro (as in glibc).  Work around that by
+     defining a variable.  */
+  static const char speech_friendly[] =
+    _(" --speech-friendly        be friendly to speech synthesizers.\n");
+#else
+  static const char speech_friendly[] = "";
+#endif
+
   printf (_("\
 Usage: %s [OPTION]... [MENU-ITEM...]\n\
 \n\
@@ -563,14 +573,7 @@ Examples:\n\
 Email bug reports to address@hidden,\n\
 general questions and discussion to address@hidden
 "),
-  program_name,
-#ifdef __MSDOS__
-  _("\
- --speech-friendly        be friendly to speech synthesizers.\n")
-#else
-""
-#endif
-         );
+  program_name, speech_friendly);
 
   xexit (0);
 }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]