Page MenuHomeFreeBSD

Fix prototype of dbm_open().
ClosedPublic

Authored by ed on May 30 2016, 5:33 PM.
Tags
None
Referenced Files
F135840924: D6650.id.diff
Thu, Nov 13, 10:15 AM
F135831294: D6650.id17156.diff
Thu, Nov 13, 8:03 AM
F135831172: D6650.id17156.diff
Thu, Nov 13, 8:01 AM
Unknown Object (File)
Sat, Nov 8, 1:27 AM
Unknown Object (File)
Mon, Nov 3, 10:11 PM
Unknown Object (File)
Mon, Nov 3, 10:11 PM
Unknown Object (File)
Mon, Nov 3, 10:11 PM
Unknown Object (File)
Mon, Nov 3, 6:28 PM
Subscribers

Details

Reviewers
kib
pfg
jhb
Group Reviewers
manpages
Commits
rS301066: Fix prototype of dbm_open().
Summary

The last argument of dbm_open() should be a mode_t according to POSIX;
not an int. mode_t is smaller than an integer, as it's only 16 bits.

Adding jhb@: John, can such a change be made without breaking the ABI?

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ed retitled this revision from to Fix prototype of dbm_open()..
ed updated this object.
ed edited the test plan for this revision. (Show Details)
ed added a reviewer: pfg.

Just wondering ... perhaps the change is not very significant nowadays. At least on amd64, won't the compiler promote the 16 bit mode_t to an int anyways?

In D6650#140413, @pfg wrote:

Just wondering ... perhaps the change is not very significant nowadays. At least on amd64, won't the compiler promote the 16 bit mode_t to an int anyways?

It does that for in-language arithmetic, but I'm not sure what happens at the ABI level.

pfg edited edge metadata.
This revision is now accepted and ready to land.May 31 2016, 5:04 PM

I don't really know. kib@ might know? Given that it's libc, we can use symbol versioning if it does break the ABI.

kib added a reviewer: kib.
kib added a subscriber: kib.

I believe all FreeBSD ABIs (and all Tier-1 ABIs definitely) would be fine with this change.

This revision was automatically updated to reflect the committed changes.