Skip to content

Fix #4143 termios Posix library does not work on Linux #4155

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ekrich
Copy link
Member

@ekrich ekrich commented Jan 8, 2025

Testing to try and fix this issue or at least try and find a path forward.

  • Add a test
  • Does it work on macOS?
  • Does it work on Linux?

Notes from Linux headers:

From /usr/include/x86_64-linux-gnu/bits/termios.h

typedef unsigned char   cc_t;
typedef unsigned int    speed_t;
typedef unsigned int    tcflag_t;

From /usr/include/x86_64-linux-gnu/bits/termios-struct.h

#define NCCS 32
struct termios
  {
    tcflag_t c_iflag;           /* input mode flags */
    tcflag_t c_oflag;           /* output mode flags */
    tcflag_t c_cflag;           /* control mode flags */
    tcflag_t c_lflag;           /* local mode flags */
    cc_t c_line;                        /* line discipline */
    cc_t c_cc[NCCS];            /* control characters */
    speed_t c_ispeed;           /* input speed */
    speed_t c_ospeed;           /* output speed */
#define _HAVE_STRUCT_TERMIOS_C_ISPEED 1
#define _HAVE_STRUCT_TERMIOS_C_OSPEED 1
  };

@ekrich
Copy link
Member Author

ekrich commented Mar 28, 2025

@LeeTibbert I don't have a Linux env so I am not sure I can complete this. Any chance you could look into this?

@LeeTibbert
Copy link
Contributor

@ekrich

Be glad to, but it would have to be the beginning of next week, and not Tuesday, April 1.
I hope a few day's delay does not break your momentum.

IMO, you are entirely right, any change or code not exercised or tested is, by definition, broken.

I'm trying to get a large & complicated 'Arrays` JDK9 PR off the shipping dock.

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 this pull request may close these issues.

2 participants