Bug 80205 - rpm-4.2 rpmds "this" keyword breaks C++
rpm-4.2 rpmds "this" keyword breaks C++
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
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-12-22 04:27 EST by Warren Togami
Modified: 2007-04-18 12:49 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-12-30 19:24:58 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Warren Togami 2002-12-22 04:27:29 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021218

Description of problem:
/usr/include/rpm/rpmds.h line 276:
int rpmdsFind(rpmds ds, /*@null@*/ rpmds this)
/usr/include/rpm/rpmds.h line 286
int rpmdsMerge(/*@out@*/ rpmds * dsp, /*@null@*/ rpmds this)

Within these prototypes the identifier "this" is a valid argument name in C, but
a reserved keyword in C++, thus if a C++ program includes the rpmds.h header it
will fail to compile.

I think a simple fix would be to change "this" variable name to any other valid
non-keyword.

For example, apt for rpm written in C++ fails with this error:
Compiling rpm/rpmlistparser.cc to /usr/src/redhat/BUILD/apt-0.5.4cnc9/obj/apt-pk
g/rpmlistparser.opic
In file included from rpm/rpmlistparser.cc:33:
/usr/include/rpm/rpmds.h:276: parse error before `this'
/usr/include/rpm/rpmds.h:286: parse error before `this'

Version-Release number of selected component (if applicable):
Rawhide rpm-4.2.0-0.25.1
Rawhide gcc-3.2.1-2
Freshrpms apt-0.5.4cnc9
Comment 1 Jeff Johnson 2002-12-23 16:26:31 EST
Will be fixed soonish.
Comment 2 Warren Togami 2002-12-30 19:24:58 EST
Oops, wrong report.

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