Home GnuPG
Diffusion nPth 317885a6b11f

Don't use symbol/macro which starts with _.
Concern Raised317885a6b11f

Description

Don't use symbol/macro which starts with _.

* configure.ac (npth_socklen_t): Rename from _npth_socklen_t.
(NPTH_NO_RWLOCK): Rename from _NPTH_NO_RWLOCK.
* src/npth-sigev.c (sigev_handler): Rename from _sigev_handler.
* src/npth.c: Use NPTH_NO_RWLOCK.
* src/npth.h.in: Use NPTH_H, NPTH_NO_RWLOCK, and npth_socklen_t.
* w32/npth.c (npth_debug): Rename from _npth_debug.
* w32/npth.h: Use NPTH_H.
  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Auditors
werner
Provenance
gniibeAuthored on Sep 20 2022, 6:54 AM
Parents
rPTH70fb608c3bf7: build: Update config.guess and config.sub.
Branches
Unknown
Tags
Unknown
Reverted By
rPTH61ae94a7489a: Revert "Don't use symbol/macro which starts with _."

Event Timeline

werner added a subscriber: werner.

Why? One underscrore followed by a lowercase letter is not a reserved symbol. It is common to use this for symbols which are not part of the public API but need to have global linkage. Also not all system have a way to limit the visibility and there we need to use them for internal symbols.

_NPTH_H is a different thing, here a fix is okay but changing this introduced an API change. Well,okay, the idea with the underscore was, that it is not part of the public API ;-)

This commit now has outstanding concerns.Sep 20 2022, 9:38 AM

That's from my confusion. I'll revert.