@@ -180,7 +180,6 @@ fileio_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
180180static int
181181check_fd (int fd )
182182{
183- #if defined(HAVE_FSTAT ) || defined(MS_WINDOWS )
184183 struct _Py_stat_struct buf ;
185184 if (_Py_fstat (fd , & buf ) < 0 &&
186185#ifdef MS_WINDOWS
@@ -197,7 +196,6 @@ check_fd(int fd)
197196 Py_XDECREF (exc );
198197 return -1 ;
199198 }
200- #endif
201199 return 0 ;
202200}
203201
@@ -228,9 +226,7 @@ fileio_init(PyObject *oself, PyObject *args, PyObject *kwds)
228226#elif !defined(MS_WINDOWS )
229227 int * atomic_flag_works = NULL ;
230228#endif
231- #if defined(HAVE_FSTAT ) || defined(MS_WINDOWS )
232229 struct _Py_stat_struct fdfstat ;
233- #endif
234230 int async_err = 0 ;
235231
236232 assert (PyFileIO_Check (oself ));
@@ -427,7 +423,6 @@ fileio_init(PyObject *oself, PyObject *args, PyObject *kwds)
427423 }
428424
429425 self -> blksize = DEFAULT_BUFFER_SIZE ;
430- #if defined(HAVE_FSTAT ) || defined(MS_WINDOWS )
431426 if (_Py_fstat (self -> fd , & fdfstat ) < 0 ) {
432427 PyErr_SetFromErrno (PyExc_OSError );
433428 goto error ;
@@ -446,7 +441,6 @@ fileio_init(PyObject *oself, PyObject *args, PyObject *kwds)
446441 if (fdfstat .st_blksize > 1 )
447442 self -> blksize = fdfstat .st_blksize ;
448443#endif /* HAVE_STRUCT_STAT_ST_BLKSIZE */
449- #endif /* HAVE_FSTAT || MS_WINDOWS */
450444
451445#if defined(MS_WINDOWS ) || defined(__CYGWIN__ )
452446 /* don't translate newlines (\r\n <=> \n) */
@@ -597,8 +591,6 @@ fileio_readinto(fileio *self, PyObject *args)
597591 return PyLong_FromSsize_t (n );
598592}
599593
600- #if defined(HAVE_FSTAT ) || defined(MS_WINDOWS )
601-
602594static size_t
603595new_buffersize (fileio * self , size_t currentsize )
604596{
@@ -702,18 +694,6 @@ fileio_readall(fileio *self)
702694 return result ;
703695}
704696
705- #else
706-
707- static PyObject *
708- fileio_readall (fileio * self )
709- {
710- _Py_IDENTIFIER (readall );
711- return _PyObject_CallMethodId ((PyObject * )& PyRawIOBase_Type ,
712- & PyId_readall , "O" , self );
713- }
714-
715- #endif /* HAVE_FSTAT || MS_WINDOWS */
716-
717697static PyObject *
718698fileio_read (fileio * self , PyObject * args )
719699{
0 commit comments