------- Forwarded Message
Date: Thu, 13 Apr 1995 19:08:59 +0100
From: <Michael.Scharf@EMBL-Heidelberg.de>
To: Guido.van.Rossum@cwi.nl
Subject: posix.WNOHANG ** )-: FLAME ON ME :-( ***
Hallo Guido,
I was very glad that you added posix.WNOHANG to the posix module. A few weeks
ago, I send you a patch and you added it to the new release. You even included
it to the manual. But ** FLAME ON ME **, I did'nt send you a complete patch.
This is what you added to the module.
#ifdef WNOHANG
/* Export WNOHANG symbol */
v = newintobject((long)WNOHANG);
if (v == NULL || dictinsert(d, "WNOHANG", v) != 0)
fatal("can't define posix.WNOHANG");
DECREF(v);
#endif
Ok, that's fine, but WNOHANG is on no architecture defined because you don't
include "sys/wait.h" in posixmodule.c. I thought you would have included it,
because you use wait and waitpid, but you don't.
To make it work, you 'd have to check in configure.in for sys/wait.h and in
config.h add HAVE_SYS_WAIT_H.
Here is the complete patch to fix it.
I really really feel bad for the incomplete information I gave you.
Michael
___ _ _ ___ _
| __) | \/ | | ) | | Michael Scharf Tel: +49 6221 387 305 FAX: 517
| _) | | | -< | |_ EMail: Michael.Scharf@EMBL-Heidelberg.de
|___) |_||_| |___) |___) http://www.EMBL-Heidelberg.de/~scharf/
diff -buN +recursive ../pub/Python-1.2//Modules/posixmodule.c Python-1.2//Modul
es/posixmodule.c
- --- ../pub/Python-1.2//Modules/posixmodule.c Thu Mar 30 11:56:54 1995
+++ Python-1.2//Modules/posixmodule.c Thu Apr 13 17:09:50 1995
@@ -117,6 +117,10 @@
#include <sys/utsname.h>
#endif /* HAVE_SYS_UTSNAME_H */
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif /* HAVE_SYS_WAIT_H */
+
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024
#endif /* MAXPATHLEN */
diff -buN +recursive ../pub/Python-1.2//config.h.in Python-1.2//config.h.in
- --- ../pub/Python-1.2//config.h.in Wed Jan 4 20:02:32 1995
+++ Python-1.2//config.h.in Thu Apr 13 17:11:48 1995
@@ -278,6 +278,9 @@
/* Define if you have the <sys/utsname.h> header file. */
#undef HAVE_SYS_UTSNAME_H
+/* Define if you have the <sys/wait.h> header file. */
+#undef HAVE_SYS_WAIT_H
+
/* Define if you have the <thread.h> header file. */
#undef HAVE_THREAD_H
diff -buN +recursive ../pub/Python-1.2//configure Python-1.2//configure
- --- ../pub/Python-1.2//configure Thu Mar 9 15:10:13 1995
+++ Python-1.2//configure Thu Apr 13 16:54:55 1995
@@ -886,7 +886,7 @@
fi
- -for ac_hdr in dlfcn.h fcntl.h limits.h signal.h stdarg.h stddef.h stdlib.h thr
ead.h unistd.h utime.h sys/audioio.h sys/param.h sys/select.h sys/time.h sys/ti
mes.h sys/un.h sys/utsname.h
+for ac_hdr in dlfcn.h fcntl.h limits.h signal.h stdarg.h stddef.h stdlib.h thr
ead.h unistd.h utime.h sys/audioio.h sys/param.h sys/select.h sys/time.h sys/ti
mes.h sys/un.h sys/utsname.h sys/wait.h
do
ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&4
diff -buN +recursive ../pub/Python-1.2//configure.in Python-1.2//configure.in
- --- ../pub/Python-1.2//configure.in Thu Mar 9 15:09:54 1995
+++ Python-1.2//configure.in Thu Apr 13 16:53:39 1995
@@ -64,7 +64,7 @@
# checks for header files
AC_HEADER_STDC
- -AC_CHECK_HEADERS(dlfcn.h fcntl.h limits.h signal.h stdarg.h stddef.h stdlib.h
thread.h unistd.h utime.h sys/audioio.h sys/param.h sys/select.h sys/time.h sys
/times.h sys/un.h sys/utsname.h)
+AC_CHECK_HEADERS(dlfcn.h fcntl.h limits.h signal.h stdarg.h stddef.h stdlib.h
thread.h unistd.h utime.h sys/audioio.h sys/param.h sys/select.h sys/time.h sys
/times.h sys/un.h sys/utsname.h sys/wait.h)
AC_HEADER_DIRENT
# checks for typedefs
------- End of Forwarded Message