PATCH/RFA: regerror link error

H . J . Lu hjl@lucon.org
Thu Mar 30 17:33:00 GMT 2000


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.


More information about the Gdb-patches mailing list