This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Errors compiling ar.c
- From: Nick Clifton <nickc at redhat dot com>
- To: Richard Earnshaw <rearnsha at arm dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 19 Jun 2009 16:05:02 +0100
- Subject: Re: Errors compiling ar.c
- References: <1245345728.8636.63.camel@pc960.cambridge.arm.com>
Hi Richard,
gcc -DHAVE_CONFIG_H -I. -I/home/rearnsha/gnusrc/gcc-cross/trunk/binutils -I. -I. -I/home/rearnsha/gnusrc/gcc-cross/trunk/binutils -I../bfd -I/home/rearnsha/gnusrc/gcc-cross/trunk/binutils/../bfd -I/home/rearnsha/gnusrc/gcc-cross/trunk/binutils/../include -DLOCALEDIR="\"/work/rearnsha/gnu/trunk/testinstall/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c /home/rearnsha/gnusrc/gcc-cross/trunk/binutils/ar.c
/home/rearnsha/gnusrc/gcc-cross/trunk/binutils/ar.c:282:1: directives
may not be used inside a macro argument
/home/rearnsha/gnusrc/gcc-cross/trunk/binutils/ar.c:280:21: unterminated
argument list invoking macro "_"
In summary, you can't use #ifdef in the middle of _(...).
It doesn't seem like a good idea for translation purposes to have this
string change in this way anyway.
Fair enough. The nm.c sources also have the same problem so I am
checking in the attached patch.
Cheers
Nick
binutils/ChangeLog
2009-06-19 Nick Clifton <nickc@redhat.com>
* ar.c (usage): Do not use #ifdef inside _("...).
* nm.c (usage): Likewise.
Index: binutils/ar.c
===================================================================
RCS file: /cvs/src/src/binutils/ar.c,v
retrieving revision 1.59
diff -c -3 -p -r1.59 ar.c
*** binutils/ar.c 28 May 2009 11:30:49 -0000 1.59
--- binutils/ar.c 19 Jun 2009 15:03:09 -0000
*************** usage (int help)
*** 278,288 ****
fprintf (s, _("Usage: %s [options] archive\n"), program_name);
fprintf (s, _(" Generate an index to speed access to archives\n"));
fprintf (s, _(" The options are:\n\
! @<file> Read options from <file>\n"
#if BFD_SUPPORTS_PLUGINS
! " --plugin <name> Load the specified plugin\n"
#endif
! " -t Update the archive's symbol map timestamp\n\
-h --help Print this help message\n\
-v --version Print version information\n"));
}
--- 278,290 ----
fprintf (s, _("Usage: %s [options] archive\n"), program_name);
fprintf (s, _(" Generate an index to speed access to archives\n"));
fprintf (s, _(" The options are:\n\
! @<file> Read options from <file>\n"));
#if BFD_SUPPORTS_PLUGINS
! fprintf (s, _("\
! --plugin <name> Load the specified plugin\n"));
#endif
! fprintf (s, _("\
! -t Update the archive's symbol map timestamp\n\
-h --help Print this help message\n\
-v --version Print version information\n"));
}
Index: binutils/nm.c
===================================================================
RCS file: /cvs/src/src/binutils/nm.c,v
retrieving revision 1.58
diff -c -3 -p -r1.58 nm.c
*** binutils/nm.c 28 May 2009 11:30:49 -0000 1.58
--- binutils/nm.c 19 Jun 2009 15:03:09 -0000
*************** usage (FILE *stream, int status)
*** 240,250 ****
-o Same as -A\n\
-p, --no-sort Do not sort the symbols\n\
-P, --portability Same as --format=posix\n\
! -r, --reverse-sort Reverse the sense of the sort\n"
#if BFD_SUPPORTS_PLUGINS
! " --plugin NAME Load the specified plugin\n"
#endif
! " -S, --print-size Print size of defined symbols\n\
-s, --print-armap Include index for symbols from archive members\n\
--size-sort Sort symbols by size\n\
--special-syms Include special symbols in the output\n\
--- 240,252 ----
-o Same as -A\n\
-p, --no-sort Do not sort the symbols\n\
-P, --portability Same as --format=posix\n\
! -r, --reverse-sort Reverse the sense of the sort\n"));
#if BFD_SUPPORTS_PLUGINS
! fprintf (stream, _("\
! --plugin NAME Load the specified plugin\n"));
#endif
! fprintf (stream, _("\
! -S, --print-size Print size of defined symbols\n \
-s, --print-armap Include index for symbols from archive members\n\
--size-sort Sort symbols by size\n\
--special-syms Include special symbols in the output\n\