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

Constants TCIOFLUSH, TCIFLUSH, TCOFLUSH incorrect on Linux #6

Closed
notinaboat opened this issue Jul 6, 2021 · 4 comments · Fixed by #7
Closed

Constants TCIOFLUSH, TCIFLUSH, TCOFLUSH incorrect on Linux #6

notinaboat opened this issue Jul 6, 2021 · 4 comments · Fixed by #7

Comments

@notinaboat
Copy link

notinaboat commented Jul 6, 2021

See
https://github.com/lattera/glibc/blob/895ef79e04a953cac1493863bcae29ad85657ee1/sysdeps/unix/sysv/linux/bits/termios.h#L208-L210
vs

TERMIOS.jl/src/TERMIOS.jl

Lines 421 to 428 in 3c32ffd

"""Discard data received but not yet read."""
const TCIFLUSH = 1
"""Discard data written but not yet sent."""
const TCOFLUSH = 2
"""Discard all pending data."""
const TCIOFLUSH = 3

@kdheepak
Copy link
Owner

kdheepak commented Jul 6, 2021

Huh, that’s strange. I thought I had put in an if else for all the values that were different for Linux.

Can you submit a PR? If not, I’ll make the change tomorrow.

@notinaboat
Copy link
Author

Hi @kdheepak, I won't be able to submit a PR in the next week or so due to competing priorities.

@notinaboat
Copy link
Author

Hi @kdheepak, you may be interested in this as an alternative to hand-coding constants: https://github.com/notinaboat/CInclude.jl

@kdheepak
Copy link
Owner

Yeah that looks like a good package! I’ll have to refactor and experiment with it. I’m also juggling tasks so I’m not sure when I’ll get to this though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants