]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Poor PLAN9, it isn't supported
authorAntoine Pitrou <solipsis@pitrou.net>
Mon, 22 Feb 2010 19:41:37 +0000 (19:41 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Mon, 22 Feb 2010 19:41:37 +0000 (19:41 +0000)
Modules/timemodule.c
Python/errors.c

index c101819a676aba8a47db184d7aea86f9c875f04f..0161ac0fd0acefd16cba851ae2ba480d0f345ad9 100644 (file)
@@ -1084,22 +1084,6 @@ floatsleep(double secs)
                return -1;
        }
        Py_END_ALLOW_THREADS
-#elif defined(PLAN9)
-       {
-               double millisecs = secs * 1000.0;
-               if (millisecs > (double)LONG_MAX) {
-                       PyErr_SetString(PyExc_OverflowError, "sleep length is too large");
-                       return -1;
-               }
-               /* This sleep *CAN BE* interrupted. */
-               Py_BEGIN_ALLOW_THREADS
-               if(sleep((long)millisecs) < 0){
-                       Py_BLOCK_THREADS
-                       PyErr_SetFromErrno(PyExc_IOError);
-                       return -1;
-               }
-               Py_END_ALLOW_THREADS
-       }
 #else
        /* XXX Can't interrupt this sleep */
        Py_BEGIN_ALLOW_THREADS
index 42e0e6f3d5a3a572f9bc581d92284e85da4e3fed..062658d737ef5a729692c0501937a9cb74ba345e 100644 (file)
@@ -360,25 +360,17 @@ PyErr_SetFromErrnoWithFilenameObject(PyObject *exc, PyObject *filenameObject)
        PyObject *message;
        PyObject *v;
        int i = errno;
-#ifdef PLAN9
-       char errbuf[ERRMAX];
-#else
 #ifndef MS_WINDOWS
        char *s;
 #else
        WCHAR *s_buf = NULL;
 #endif /* Unix/Windows */
-#endif /* PLAN 9*/
 
 #ifdef EINTR
        if (i == EINTR && PyErr_CheckSignals())
                return NULL;
 #endif
 
-#ifdef PLAN9
-       rerrstr(errbuf, sizeof errbuf);
-       message = PyUnicode_DecodeUTF8(errbuf, strlen(errbuf), "ignore");
-#else
 #ifndef MS_WINDOWS
        if (i == 0)
                s = "Error"; /* Sometimes errno didn't get set */
@@ -425,7 +417,6 @@ PyErr_SetFromErrnoWithFilenameObject(PyObject *exc, PyObject *filenameObject)
                }
        }
 #endif /* Unix/Windows */
-#endif /* PLAN 9*/
 
        if (message == NULL)
        {