Skip to content

Add structured version info for dbm.ndbm #157480

Description

@serhiy-storchaka

Feature or enhancement

dbm.ndbm can be built with GDBM's compatibility interface, with Berkeley DB, or with a classic NDBM library, and only exposes library, the name of the implementation. No version information is available, and library is 'GNU gdbm' even for a classic NDBM library, because the USE_NDBM build assumes GDBM.

The library used by dbm.ndbm may differ from the one used by dbm.gnu (different builds of GDBM, or Berkeley DB), so dbm.ndbm needs its own constants, named after the library it was built with:

  • if library is 'GNU gdbm': GDBM_VERSION_INFO, gdbm_version_info and gdbm_version, as in dbm.gnu (Add structured version info for dbm.gnu #157478).
  • if library is 'Berkeley DB': DB_VERSION and DB_VERSION_INFO for the build-time version (DB_VERSION_STRING, DB_VERSION_MAJOR/MINOR/PATCH), db_version and db_version_info for the runtime version (db_version()).
  • for a classic NDBM library there is no version information; library should be 'ndbm'.

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.16new features, bugs and security fixesextension-modulesC modules in the Modules dirtype-featureA feature request or enhancement

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions