Project

General

Profile

Bug #12357

getc/putc_unlocked need to set orientation

Added by Robert Mustacchi 9 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Category:
lib - userland libraries
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

The getc(3C) and putc(3C) routines are required to set the orientation of a stdio stream if it's not set. However, the way that we have coded things up, the _unlocked variants do not do this. Because the only difference is supposed to be related to stream locking, I believe we should correctly honor the orientation. This was discovered while working on stdio memory streams and is now checked by an imported orientation test suite.


Related issues

Related to illumos gate - Feature #7092: Want support for stdio memory streamsClosedRobert Mustacchi

Actions
#1

Updated by Robert Mustacchi 8 months ago

To test this I introduced new tests as part of the stdio test suite in 7092 that cover the orientation of functions. This was actually discovered by the OpenBSD test program that I had imported for this purpose. Thanks OpenBSD!

#2

Updated by Robert Mustacchi 8 months ago

  • Related to Feature #7092: Want support for stdio memory streams added
#3

Updated by Electric Monk 8 months ago

  • Status changed from New to Closed
  • % Done changed from 90 to 100

git commit d726994754c938f91b6fd7e96b5cab3829615c58

commit  d726994754c938f91b6fd7e96b5cab3829615c58
Author: Robert Mustacchi <rm@fingolfin.org>
Date:   2020-03-26T07:42:53.000Z

    12357 getc/putc_unlocked need to set orientation
    Reviewed by: John Levon <john.levon@joyent.com>
    Reviewed by: Yuri Pankov <ypankov@fastmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF