diff options
author | Christian Heimes <christian@cheimes.de> | 2008-01-31 23:08:23 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2008-01-31 23:08:23 (GMT) |
commit | 951cc0f474e4757e6954f0435952804211c5637c (patch) | |
tree | 4e04f1f90d551a9fdd8b6936b7523fae0ce0a0ee /Include | |
parent | 105be7725b88ecef826ac07392a4236bae934bf6 (diff) | |
download | cpython-951cc0f474e4757e6954f0435952804211c5637c.zip cpython-951cc0f474e4757e6954f0435952804211c5637c.tar.gz cpython-951cc0f474e4757e6954f0435952804211c5637c.tar.bz2 |
Fixed bug #1983: Return from fork() is pid_t, not int
Diffstat (limited to 'Include')
-rw-r--r-- | Include/pyport.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Include/pyport.h b/Include/pyport.h index bafa0c8..ce760d2 100644 --- a/Include/pyport.h +++ b/Include/pyport.h @@ -122,6 +122,10 @@ typedef Py_intptr_t Py_ssize_t; /* Smallest negative value of type Py_ssize_t. */ #define PY_SSIZE_T_MIN (-PY_SSIZE_T_MAX-1) +#if SIZEOF_PID_T > SIZEOF_LONG +# error "Python doesn't support sizeof(pid_t) > sizeof(long)" +#endif + /* PY_FORMAT_SIZE_T is a platform-specific modifier for use in a printf * format to convert an argument with the width of a size_t or Py_ssize_t. * C99 introduced "z" for this purpose, but not all platforms support that; @@ -573,7 +577,7 @@ extern char * _getpty(int *, int, mode_t, int); functions, even though they are included in libutil. */ #include <termios.h> extern int openpty(int *, int *, char *, struct termios *, struct winsize *); -extern int forkpty(int *, char *, struct termios *, struct winsize *); +extern pid_t forkpty(int *, char *, struct termios *, struct winsize *); #endif /* !defined(HAVE_PTY_H) && !defined(HAVE_LIBUTIL_H) */ #endif /* defined(HAVE_OPENPTY) || defined(HAVE_FORKPTY) */ |