Red Hat Bugzilla – Bug 50420
rpm 4.0.3 CVS: static vs. non-static fdFileno
Last modified: 2008-03-13 15:18:51 EDT
rpm 4.0.3 CVS has a rpmio/rpmio_internal.h that declares and defines
fdFileno as static,
but rpmio/rpmio.h declares it without the static. Many C compilers flag
this as an error,
and Solaris' is among them:
"../rpmio/rpmio_internal.h", line 9: identifier redeclared: fdFileno
current : static function(pointer to void) returning int
previous: function(pointer to void) returning int :
"../rpmio/rpmio.h", line 366
This simple (and therefore wrong) fix is to remove the static from the
I hope Jeff finds a different fix than that. ;-) I'll send a patch if he
wants to go that
The two copies of fdFileno are there to attempt to satisfy legacy
needs in both the API and the ABI. I'm gonna rip the version
from the library in the next version of rpm, preferring instead to have
applications compile in a static inline wrapper from the API (i.e. c code
in the include file), as that is far easier to maintain legacy compatibility
the more traditional ABI using symbols in libraries.
I can be convinced otherwise, however. Speak now ... :-)
"Next version" meaning post 4.0.3, or 4.0.3?
I think your proposition seems fine. With that in mind, my local strategy
changed -- I added
the `static' back into the rpmio/rpmio_internal.h , and just removed the
declaration of fdFileno
in rpmio/rpmio.h, and that works fine for me.
frFilno in rpmio/rpmio_api removed in my next checkin, Should
be in rpm-4.0.3-0.87.