bug-texinfo
[Top][All Lists]
Advanced

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

Compile error for texinfo-4.0 with gcc-3.0


From: Richard Lightman
Subject: Compile error for texinfo-4.0 with gcc-3.0
Date: Mon, 18 Jun 2001 18:21:30 +0100
User-agent: Mutt/1.2.5i

I got the following error compiling texinfo-4.0 with gcc-3.0
on linux-2.4.5, glibc-2.2.3, i686 pc

gcc -DINFODIR=\"/usr/share/info\" -DLOCALEDIR=\"/usr/share/locale\" 
-DHAVE_CONFIG_H -I. -I../../source/lib -I../intl -I.. -I../../source/info    
-O3 -march=i686 -pipe -c ../../source/info/info.c
../../source/info/info.c:567:1: directives may not be used inside a macro 
argument
../../source/info/info.c:567:1: unterminated argument list invoking macro 
"printf"
../../source/info/info.c: In function `info_short_help':
../../source/info/info.c:571: parse error before string constant
make[2]: *** [info.o] Error 1
make[2]: Leaving directory `/mnt/build/urusai_1/texinfo/build/info'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/build/urusai_1/texinfo/build'
make: *** [all-recursive-am] Error 2


Here is is the trivial patch to fix it. (Produced in my
own time, contributed free and without any conditions.)

--
Richard

diff -cr texinfo-4.0/ChangeLog texinfo-4.0r/ChangeLog
*** texinfo-4.0/ChangeLog       Tue Sep 28 20:38:04 1999
--- texinfo-4.0r/ChangeLog      Mon Jun 18 18:10:52 2001
***************
*** 1,3 ****
--- 1,8 ----
+ 2000-06-18  Richard Lightman <address@hidden>
+ 
+       * info/info.c: Moved #ifdef out of a printf macro for
+       compatibilty with gcc-3.0
+ 
  1999-09-28  Karl Berry  <address@hidden>
  
        * doc/texinfo.txi: New isbn.
diff -cr texinfo-4.0/info/info.c texinfo-4.0r/info/info.c
*** texinfo-4.0/info/info.c     Sat Sep 25 17:10:13 1999
--- texinfo-4.0r/info/info.c    Mon Jun 18 18:08:38 2001
***************
*** 527,532 ****
--- 527,539 ----
  static void
  info_short_help ()
  {
+ #ifdef __MSDOS__
+ # define SPEECH_FRIENDLY \
+ " --speech-friendly        be friendly to speech synthesizers.\n"
+ #else
+ # define SPEECH_FRIENDLY ""
+ #endif
+ 
    printf (_("\
  Usage: %s [OPTION]... [MENU-ITEM...]\n\
  \n\
***************
*** 564,576 ****
  general questions and discussion to address@hidden
  "),
    program_name,
! #ifdef __MSDOS__
! "\
!  --speech-friendly        be friendly to speech synthesizers.\n"
! #else
! ""
! #endif
          );
  
    xexit (0);
  }
--- 571,580 ----
  general questions and discussion to address@hidden
  "),
    program_name,
!   SPEECH_FRIENDLY
          );
+ 
+ #undef SPEECH_FRIENDLY
  
    xexit (0);
  }



reply via email to

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