PATCH dllwrap.c: Build error with GCC 3.5: static mismatch

Nick Clifton nickc@redhat.com
Tue Jul 13 16:50:00 GMT 2004


Hi Aaron,

> GCC gives an error about program_name in dllwrap.c conflicting with a
> non-static version in bucomm.h.  The following patch corrects this by
> not making the global variable static.

Actually this is not entirely correct since a) the variable is supposed 
to be static - it is not used outside of dllwrap.c, b) the variable 
referred to in bucomm.h is actually defined in bucomm.c.  A better fix 
in my opinion is to rename the variable so as to avoid the name 
conflict.  In doing this I also came across another, related problem: 
dllwrap.c:deduce_name() has a parameter called 'program_name' which 
shadows the global variable.

So I have applied a patch to fix both of these issues.

binutils/ChangeLog
2004-07-13  Nick Clifton  <nickc@redhat.com>

	* dllwrap.c: Replace 'program_name' with 'prog_name' to avoid
	conflicts with exported global defined in bucomm.h.
	(deduce_name): Rename parameter 'program_name' to 'name' to avoid
	shadowing the global defined in bucomm.h.

Cheers
   Nick

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dllwrap.c.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20040713/44995f15/attachment.ksh>


More information about the Binutils mailing list