Page MenuHomeFreeBSD

Further refinements of ptsname_r(3) interface:
ClosedPublic

Authored by delphij on Oct 18 2020, 7:47 PM.
Tags
None
Referenced Files
F153473263: D26845.id78483.diff
Tue, Apr 21, 8:59 AM
F153443185: D26845.diff
Tue, Apr 21, 5:10 AM
Unknown Object (File)
Sun, Apr 12, 12:39 AM
Unknown Object (File)
Thu, Apr 9, 7:40 PM
Unknown Object (File)
Thu, Apr 9, 10:37 AM
Unknown Object (File)
Wed, Apr 8, 11:45 AM
Unknown Object (File)
Tue, Mar 31, 6:44 AM
Unknown Object (File)
Mar 20 2026, 3:55 AM
Subscribers

Details

Summary
  • Hide ptsname_r under __BSD_VISIBLE for now as the specification is not finalized at this time.
  • Keep Symbol.map sorted.
  • Avoid the interposing of ptsname_r(3) from an user application from breaking ptsname(3) by making the implementation a static method and call the static function from ptsname(3) instead.

Reported by: kib

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 34246
Build 31390: arc lint + arc unit

Event Timeline

delphij created this revision.
include/stdlib.h
239

This should probably go with the other function prototypes in a logical order (it seems mostly alphabetical now).

lib/libc/stdlib/ptsname.c
104

Why do you want to make the function weak ?

106

It is better to

  1. Make __ptsname_r non-static (but do not add it to Symbol.map)
  2. Define ptsname_r as an alias for __ptsname_r. Look above how e.g. grantpt is defined.

Then you do not need this trivial wrapper.

delphij marked 3 inline comments as done.

Address reviewer comments.

Please take another look, thanks!

This revision is now accepted and ready to land.Oct 19 2020, 7:09 AM
This revision was automatically updated to reflect the committed changes.