Bug 50420 - rpm 4.0.3 CVS: static vs. non-static fdFileno
rpm 4.0.3 CVS: static vs. non-static fdFileno
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: rpm (Show other bugs)
1.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-07-30 22:10 EDT by Red Hat Bugzilla
Modified: 2008-03-13 15:18 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-07-30 23:39:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Red Hat Bugzilla 2001-07-30 22:10:20 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
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-30 22:58:11 EDT
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-30 23:39:45 EDT
"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 14:18:47 EDT
frFilno in rpmio/rpmio_api removed in my next checkin, Should
be in rpm-4.0.3-0.87.

Note You need to log in before you can comment on or make changes to this bug.