Bug 50420

Summary: rpm 4.0.3 CVS: static vs. non-static fdFileno
Product: [Retired] Red Hat Raw Hide Reporter: Red Hat Bugzilla <bugzilla>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-07-31 03:39:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Red Hat Bugzilla 2001-07-31 02:10:20 UTC
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
rpmio_internal.h.
I hope Jeff finds a different fix than that.  ;-)   I'll send a patch if he
wants to go that
route.

Comment 1 Red Hat Bugzilla 2001-07-31 02:58:11 UTC
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
than
the more traditional ABI using symbols in libraries.

I can be convinced otherwise, however. Speak now ... :-)

Comment 2 Red Hat Bugzilla 2001-07-31 03:39:45 UTC
"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.

Comment 3 Red Hat Bugzilla 2001-08-04 18:18:47 UTC
frFilno in rpmio/rpmio_api removed in my next checkin, Should
be in rpm-4.0.3-0.87.