Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dc8c2ad

Browse files
committed
Poor PLAN9, it isn't supported
1 parent 4e260c5 commit dc8c2ad

2 files changed

Lines changed: 0 additions & 25 deletions

File tree

Modules/timemodule.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,22 +1084,6 @@ floatsleep(double secs)
10841084
return -1;
10851085
}
10861086
Py_END_ALLOW_THREADS
1087-
#elif defined(PLAN9)
1088-
{
1089-
double millisecs = secs * 1000.0;
1090-
if (millisecs > (double)LONG_MAX) {
1091-
PyErr_SetString(PyExc_OverflowError, "sleep length is too large");
1092-
return -1;
1093-
}
1094-
/* This sleep *CAN BE* interrupted. */
1095-
Py_BEGIN_ALLOW_THREADS
1096-
if(sleep((long)millisecs) < 0){
1097-
Py_BLOCK_THREADS
1098-
PyErr_SetFromErrno(PyExc_IOError);
1099-
return -1;
1100-
}
1101-
Py_END_ALLOW_THREADS
1102-
}
11031087
#else
11041088
/* XXX Can't interrupt this sleep */
11051089
Py_BEGIN_ALLOW_THREADS

Python/errors.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -360,25 +360,17 @@ PyErr_SetFromErrnoWithFilenameObject(PyObject *exc, PyObject *filenameObject)
360360
PyObject *message;
361361
PyObject *v;
362362
int i = errno;
363-
#ifdef PLAN9
364-
char errbuf[ERRMAX];
365-
#else
366363
#ifndef MS_WINDOWS
367364
char *s;
368365
#else
369366
WCHAR *s_buf = NULL;
370367
#endif /* Unix/Windows */
371-
#endif /* PLAN 9*/
372368

373369
#ifdef EINTR
374370
if (i == EINTR && PyErr_CheckSignals())
375371
return NULL;
376372
#endif
377373

378-
#ifdef PLAN9
379-
rerrstr(errbuf, sizeof errbuf);
380-
message = PyUnicode_DecodeUTF8(errbuf, strlen(errbuf), "ignore");
381-
#else
382374
#ifndef MS_WINDOWS
383375
if (i == 0)
384376
s = "Error"; /* Sometimes errno didn't get set */
@@ -425,7 +417,6 @@ PyErr_SetFromErrnoWithFilenameObject(PyObject *exc, PyObject *filenameObject)
425417
}
426418
}
427419
#endif /* Unix/Windows */
428-
#endif /* PLAN 9*/
429420

430421
if (message == NULL)
431422
{

0 commit comments

Comments
 (0)