Page MenuHomeFreeBSD

Fix prototype of dbm_open().
ClosedPublic

Authored by ed on May 30 2016, 5:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 15, 11:54 AM
Unknown Object (File)
Mon, May 13, 12:37 PM
Unknown Object (File)
Mon, May 13, 12:37 PM
Unknown Object (File)
Apr 30 2024, 2:32 PM
Unknown Object (File)
Apr 24 2024, 9:45 PM
Unknown Object (File)
Apr 24 2024, 9:45 PM
Unknown Object (File)
Apr 24 2024, 9:45 PM
Unknown Object (File)
Apr 22 2024, 1:05 AM
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.