Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-85283: Build termios extension with the limited C API#116928

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vstinner merged 1 commit intopython:mainfromvstinner:limited_termios
Mar 17, 2024

Conversation

vstinner
Copy link
Member

@vstinnervstinner commentedMar 17, 2024
edited by github-actionsbot
Loading

@kulikjak
Copy link
Contributor

Hi! After this commit, I am seeing the following errors when building main on Solaris:

/..../cpython/Modules/termios.c:430:20: error: 'errno' undeclared (first use in this function)  430 |     if (r == -1 && errno == EINVAL) {      |                    ^~~~~/..../cpython/Modules/termios.c:56:1: note: 'errno' is defined in header '<errno.h>'; did you forget to '#include <errno.h>'?   55 | #include "clinic/termios.c.h"  +++ |+#include <errno.h>

AFAICT, this is because of the newly added#define Py_LIMITED_API 0x030d0000, which "hides" theerrno.h include inPython.h (same as the newly addedstring.h include). When I add the missing include, it compiles again.

Should I create a PR with a fix?

@vstinner
Copy link
MemberAuthor

/..../cpython/Modules/termios.c:430:20: error: 'errno' undeclared (first use in this function)  430 |     if (r == -1 && errno == EINVAL) {

That's strange. I cannot find this line in the main branch.

Do you have a patch on top of the main branch? If yes, you should consider to propose it upstream?

In main, I have:

if (r==-1) {returnPyErr_SetFromErrno(state->TermiosError);// LINE 430    }

@kulikjak
Copy link
Contributor

kulikjak commentedMar 19, 2024
edited
Loading

Oh, I am very sorry. This is indeed from an internal patch and not in thetermios.c sources...

It's a patch that workarounded an issue with theTIOCGWINSZioctl on Solaris, which is already fixed, and which I forgot to remove it (and since it was just a temporary workaround, I didn't upstream it).

vstinner reacted with thumbs up emoji

@vstinner
Copy link
MemberAuthor

It's a patch that workarounded an issue with the TIOCGWINSZ ioctl on Solaris, which I forgot to remove before (and since it was just a temporary workaround, I didn't upstream it).

Well, either remove it, or propose it upstream. If you keep it, just add <errno.h> include ;-)

kulikjak reacted with thumbs up emoji

adorilson pushed a commit to adorilson/cpython that referenced this pull requestMar 25, 2024
diegorusso pushed a commit to diegorusso/cpython that referenced this pull requestApr 17, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@vstinner@kulikjak

[8]ページ先頭

©2009-2025 Movatter.jp