Skip to content

Commit 7ffc860

Browse files
closes issue #54
1 parent 8b5f1f0 commit 7ffc860

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

Modules/clinic/posixmodule.c.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Modules/posixmodule.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15719,7 +15719,7 @@ static PyStructSequence_Desc TerminalSize_desc = {
1571915719
2,
1572015720
};
1572115721

15722-
#if defined(TERMSIZE_USE_CONIO) || defined(TERMSIZE_USE_IOCTL)
15722+
#if defined(TERMSIZE_USE_CONIO) || defined(TERMSIZE_USE_IOCTL) || defined(__OS2__)
1572315723
/*[clinic input]
1572415724
os.get_terminal_size
1572515725
@@ -15782,6 +15782,15 @@ os_get_terminal_size_impl(PyObject *module, int fd)
1578215782
}
1578315783
#endif /* TERMSIZE_USE_CONIO */
1578415784

15785+
#ifdef __OS2__
15786+
{
15787+
int dst[2];
15788+
_scrsize(dst);
15789+
columns = dst[0];
15790+
lines = dst[1];
15791+
}
15792+
#endif /* TERMSIZE_USE_IOCTL */
15793+
1578515794
PyObject *TerminalSizeType = get_posix_state(module)->TerminalSizeType;
1578615795
termsize = PyStructSequence_New((PyTypeObject *)TerminalSizeType);
1578715796
if (termsize == NULL)

0 commit comments

Comments
 (0)