Page MenuHomeFreeBSD

Further refinements of ptsname_r(3) interface:
ClosedPublic

Authored by delphij on Oct 18 2020, 7:47 PM.
Tags
None
Referenced Files
F132295815: D26845.id78393.diff
Wed, Oct 15, 3:20 PM
F132295811: D26845.id.diff
Wed, Oct 15, 3:20 PM
F132295809: D26845.id78483.diff
Wed, Oct 15, 3:20 PM
F132295804: D26845.id78410.diff
Wed, Oct 15, 3:20 PM
Unknown Object (File)
Wed, Oct 15, 4:26 AM
Unknown Object (File)
Mon, Oct 13, 1:00 AM
Unknown Object (File)
Sat, Sep 27, 5:35 AM
Unknown Object (File)
Sat, Sep 27, 12:24 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

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

Event Timeline

delphij created this revision.
include/stdlib.h
239 ↗(On Diff #78393)

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

lib/libc/stdlib/ptsname.c
104 ↗(On Diff #78393)

Why do you want to make the function weak ?

106 ↗(On Diff #78393)

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.