Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
14e73b18
Commit
14e73b18
authored
Jan 01, 2003
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose I_ constants. Auto-detect stropts.h. Properly configure the slave terminal.
parent
33fb554a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
98 additions
and
7 deletions
+98
-7
Lib/pty.py
Lib/pty.py
+11
-1
Misc/NEWS
Misc/NEWS
+38
-0
Modules/fcntlmodule.c
Modules/fcntlmodule.c
+38
-1
Modules/posixmodule.c
Modules/posixmodule.c
+2
-2
configure
configure
+4
-2
configure.in
configure.in
+2
-1
pyconfig.h.in
pyconfig.h.in
+3
-0
No files found.
Lib/pty.py
View file @
14e73b18
...
...
@@ -86,7 +86,17 @@ def slave_open(tty_name):
opened filedescriptor.
Deprecated, use openpty() instead."""
return
os
.
open
(
tty_name
,
os
.
O_RDWR
)
result
=
os
.
open
(
tty_name
,
os
.
O_RDWR
)
try
:
from
fcntl
import
ioctl
,
I_PUSH
except
ImportError
:
return
result
try
:
ioctl
(
result
,
I_PUSH
,
"ptem"
)
ioctl
(
result
,
I_PUSH
,
"ldterm"
)
except
IOError
:
pass
return
result
def
fork
():
"""fork() -> (pid, master_fd)
...
...
Misc/NEWS
View file @
14e73b18
...
...
@@ -4,6 +4,44 @@ Python News
(
editors
:
check
NEWS
.
help
for
information
about
editing
NEWS
using
ReST
.)
What
's New in Python 2.3 alpha 2?
=================================
*Release date: XX-XXX-2003
Core and builtins
-----------------
Extension modules
-----------------
- fcntl now exposes the strops.h I_* constants.
Library
-------
Tools/Demos
-----------
Build
-----
C API
-----
New platforms
-------------
Tests
-----
Windows
-------
Mac
---
What'
s
New
in
Python
2.3
alpha
1
?
=================================
...
...
Modules/fcntlmodule.c
View file @
14e73b18
...
...
@@ -9,7 +9,9 @@
#include <sys/ioctl.h>
#include <fcntl.h>
#ifdef HAVE_STROPTS_H
#include <stropts.h>
#endif
static
int
conv_descriptor
(
PyObject
*
object
,
int
*
target
)
...
...
@@ -337,6 +339,8 @@ ins(PyObject* d, char* symbol, long value)
return
0
;
}
#define INS(x) if (ins(d, #x, (long)x)) return -1
static
int
all_ins
(
PyObject
*
d
)
{
...
...
@@ -459,6 +463,39 @@ all_ins(PyObject* d)
if
(
ins
(
d
,
"DN_MULTISHOT"
,
(
long
)
DN_MULTISHOT
))
return
-
1
;
#endif
#ifdef HAVE_STROPTS_H
/* Unix 98 guarantees that these are in stropts.h. */
INS
(
I_PUSH
);
INS
(
I_POP
);
INS
(
I_LOOK
);
INS
(
I_FLUSH
);
INS
(
I_FLUSHBAND
);
INS
(
I_SETSIG
);
INS
(
I_GETSIG
);
INS
(
I_FIND
);
INS
(
I_PEEK
);
INS
(
I_SRDOPT
);
INS
(
I_GRDOPT
);
INS
(
I_NREAD
);
INS
(
I_FDINSERT
);
INS
(
I_STR
);
INS
(
I_SWROPT
);
INS
(
I_GWROPT
);
INS
(
I_SENDFD
);
INS
(
I_RECVFD
);
INS
(
I_LIST
);
INS
(
I_ATMARK
);
INS
(
I_CKBAND
);
INS
(
I_GETBAND
);
INS
(
I_CANPUT
);
INS
(
I_SETCLTIME
);
INS
(
I_GETCLTIME
);
INS
(
I_LINK
);
INS
(
I_UNLINK
);
INS
(
I_PLINK
);
INS
(
I_PUNLINK
);
#endif
return
0
;
}
...
...
Modules/posixmodule.c
View file @
14e73b18
...
...
@@ -2726,8 +2726,8 @@ posix_fork(PyObject *self, PyObject *args)
#include <libutil.h>
#endif
/* HAVE_LIBUTIL_H */
#endif
/* HAVE_PTY_H */
#if
defined(sun) || defined(__hpux)
#include <s
ys/s
tropts.h>
#if
def HAVE_STROPTS_H
#include <stropts.h>
#endif
#endif
/* defined(HAVE_OPENPTY) || defined(HAVE_FORKPTY) || defined(HAVE_DEV_PTMX */
...
...
configure
View file @
14e73b18
#! /bin/sh
# From configure.in Revision: 1.38
1
.
# From configure.in Revision: 1.38
2
.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.53 for python 2.3.
#
...
...
@@ -3975,11 +3975,13 @@ fi
for
ac_header
in
dlfcn.h fcntl.h grp.h limits.h langinfo.h
\
libintl.h locale.h ncurses.h poll.h pthread.h
\
signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h
\
signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h
\
unistd.h utime.h
\
sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h
\
sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h
\
sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h
\
...
...
configure.in
View file @
14e73b18
...
...
@@ -690,7 +690,8 @@ dnl AC_MSG_RESULT($cpp_type)
AC_HEADER_STDC
AC_CHECK_HEADERS(dlfcn.h fcntl.h grp.h limits.h langinfo.h \
libintl.h locale.h ncurses.h poll.h pthread.h \
signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
unistd.h utime.h \
sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
...
...
pyconfig.h.in
View file @
14e73b18
...
...
@@ -439,6 +439,9 @@
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <stropts.h> header file. */
#undef HAVE_STROPTS_H
/* Define to 1 if you have the `strptime' function. */
#undef HAVE_STRPTIME
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment