This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: PATCH/RFA: regerror link error
- To: Philippe De Muyter <phdm at macqel dot be>
- Subject: Re: PATCH/RFA: regerror link error
- From: "H . J . Lu" <hjl at lucon dot org>
- Date: Thu, 30 Mar 2000 17:33:20 -0800
- Cc: "gdb-patches at sourceware dot cygnus dot com" <gdb-patches at sourceware dot cygnus dot com>
- References: <200003271122.NAA25753@mail.macqel.be>
On Mon, Mar 27, 2000 at 01:22:26PM +0200, Philippe De Muyter wrote:
> I wrote :
> > the compilation of gdb fails on my system (m68k-motorola-sysv) :
> >
> > gcc -g -O2 -W -Wall -o gdb main.o libgdb.a ../bfd/libbfd.a ../readline
> > /libreadline.a ../opcodes/libopcodes.a ./../intl/libintl.a ../libiberty/libibert
> > y.a -lncurses -lm ../libiberty/libiberty.a
> > libgdb.a(command.o): In function `apropos_command':
> > command.c:481: undefined reference to `regerror'
> > collect2: ld returned 1 exit status
> >
> > Actually, I have found a __regerror, but no regerror. How can we fix that ?
> >
>
> Following advice from Todd Whitesel and J.T. Conklin,
>
> jtc> I think the __regerror() function in gnu-regex.c needs to be renamed
> jtc> regerror().
>
> Todd> Absolutely agree.
>
> Todd> The __ should only be used (and must be used) if the file is part of a
> Todd> library provided with a compiler.
>
> Todd> If the file is part of our app, then we should not be defining a __ symbol
> Todd> because ANSI C reserves all __ symbols for the compiler's library!
>
> here is a patch :
> OK to commit ?
>
> Mon Mar 27 12:23:37 2000 Philippe De Muyter <phdm@macqel.be>
>
> * gnu-regex.c (regerror): Function renamed from `__regerror'.
>
This bug among many others have been long fixed in the master source.
H.J.