Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing termios constants #51944

Closed
conorh mannequin opened this issue Jan 13, 2010 · 6 comments
Closed

missing termios constants #51944

conorh mannequin opened this issue Jan 13, 2010 · 6 comments
Labels
OS-mac stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@conorh
Copy link
Mannequin

conorh mannequin commented Jan 13, 2010

BPO 7695
Nosy @vstinner, @tiran
Files
  • patch_termios_consts_issue7695.diff
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2010-01-13.20:02:29.631>
    labels = ['type-feature', 'library']
    title = 'missing termios constants'
    updated_at = <Date 2014-12-31.16:20:36.861>
    user = 'https://bugs.python.org/conorh'

    bugs.python.org fields:

    activity = <Date 2014-12-31.16:20:36.861>
    actor = 'akuchling'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2010-01-13.20:02:29.631>
    creator = 'conorh'
    dependencies = []
    files = ['20015']
    hgrepos = []
    issue_num = 7695
    keywords = ['patch']
    message_count = 5.0
    messages = ['97736', '97749', '123803', '174714', '174727']
    nosy_count = 4.0
    nosy_names = ['vstinner', 'christian.heimes', 'conorh', 'Rodolpho.Eckhardt']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue7695'
    versions = ['Python 3.4']

    Linked PRs

    @conorh
    Copy link
    Mannequin Author

    conorh mannequin commented Jan 13, 2010

    Module termios is missing some constants useful for handling control characters under Mac OS X (and Solaris, and probably BSD but I don't have a pure BSD system to test against).

    In particular, these systems support a control character "DSUSP" (which is similar to SUSP), but there is no provided symbol for the index into the cc array to use. The correct value for the proposed termios.VDSUSP would be 11 on MacOS and Solaris. I'm no Linux wizard but I don't believe it has this control character.

    In addition, MacOS supports a control character STATUS, and the correct value for the proposed termios.VSTATUS would be 18.

    Likewise, _POSIX_VDISABLE (or some similar identifier) is missing from the module. I believe the correct value on Solaris would be '\x00', MacOS '\xff', Linux '\x00'.

    @conorh conorh mannequin added type-bug An unexpected behavior, bug, or error stdlib Python modules in the Lib dir labels Jan 13, 2010
    @conorh
    Copy link
    Mannequin Author

    conorh mannequin commented Jan 14, 2010

    As these aren't POSIX, changing to feature request.

    @conorh conorh mannequin added type-feature A feature request or enhancement and removed type-bug An unexpected behavior, bug, or error labels Jan 14, 2010
    @RodolphoEckhardt
    Copy link
    Mannequin

    RodolphoEckhardt mannequin commented Dec 11, 2010

    Because these constants might not exist on all platforms, the patch uses ifdef's around them.

    @akuchling
    Copy link
    Member

    Patch seems clearly correct; compiles & works on MacOS. We could just apply this.

    @tiran
    Copy link
    Member

    tiran commented Nov 4, 2012

    The patch looks good to me but it's missing doc updates.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    ronaldoussoren added a commit to ronaldoussoren/cpython that referenced this issue Dec 7, 2023
    This changeset adds all public constants in <termio.h>
    and <sys/termios.h> on macOS that weren't present
    already.
    ronaldoussoren added a commit that referenced this issue Dec 7, 2023
    * gh-51944: Add some macOS constants to termios
    
    This changeset adds all public constants in <termio.h>
    and <sys/termios.h> on macOS that weren't present
    already.
    
    Based on the macOS 14.2 SDK
    
    Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
    @ronaldoussoren
    Copy link
    Contributor

    #112823 adds all missing public symbols, but does not add _POSIX_VDISABLE because that's a private name.

    ronaldoussoren added a commit to ronaldoussoren/cpython that referenced this issue Dec 12, 2023
    Fix the defition of VDSUSP and CCTS_OFLOW (which
    was mentioned in NEWS, but not actually addded)
    ronaldoussoren added a commit that referenced this issue Dec 12, 2023
    Fix the defition of VDSUSP and add CCTS_OFLOW (which
    was mentioned in NEWS, but not actually addded)
    aisk pushed a commit to aisk/cpython that referenced this issue Feb 11, 2024
    * pythongh-51944: Add some macOS constants to termios
    
    This changeset adds all public constants in <termio.h>
    and <sys/termios.h> on macOS that weren't present
    already.
    
    Based on the macOS 14.2 SDK
    
    Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
    aisk pushed a commit to aisk/cpython that referenced this issue Feb 11, 2024
    …hon#112996)
    
    Fix the defition of VDSUSP and add CCTS_OFLOW (which
    was mentioned in NEWS, but not actually addded)
    Glyphack pushed a commit to Glyphack/cpython that referenced this issue Sep 2, 2024
    * pythongh-51944: Add some macOS constants to termios
    
    This changeset adds all public constants in <termio.h>
    and <sys/termios.h> on macOS that weren't present
    already.
    
    Based on the macOS 14.2 SDK
    
    Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
    Glyphack pushed a commit to Glyphack/cpython that referenced this issue Sep 2, 2024
    …hon#112996)
    
    Fix the defition of VDSUSP and add CCTS_OFLOW (which
    was mentioned in NEWS, but not actually addded)
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    OS-mac stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants