mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
Remove all traces of HAVE_STRERROR.
The removal of strerror.c led to the function check being removed from configure.in.
This commit is contained in:
parent
50a24d8bfd
commit
10ed0f50a9
5 changed files with 2 additions and 31 deletions
|
@ -104,11 +104,7 @@ dircheck(PyFileIOObject* self)
|
|||
if (self->fd < 0)
|
||||
return 0;
|
||||
if (fstat(self->fd, &buf) == 0 && S_ISDIR(buf.st_mode)) {
|
||||
#ifdef HAVE_STRERROR
|
||||
char *msg = strerror(EISDIR);
|
||||
#else
|
||||
char *msg = "Is a directory";
|
||||
#endif
|
||||
PyObject *exc;
|
||||
internal_close(self);
|
||||
|
||||
|
@ -295,12 +291,8 @@ fileio_dealloc(PyFileIOObject *self)
|
|||
if (self->fd >= 0 && self->closefd) {
|
||||
errno = internal_close(self);
|
||||
if (errno < 0) {
|
||||
#ifdef HAVE_STRERROR
|
||||
PySys_WriteStderr("close failed: [Errno %d] %s\n",
|
||||
errno, strerror(errno));
|
||||
#else
|
||||
PySys_WriteStderr("close failed: [Errno %d]\n", errno);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue