Applied a patch from Vladimir Nikishkin for recent versions of gcc.

This commit is contained in:
Erick Gallesio 2019-10-31 15:57:27 +01:00
parent 12b2fafa17
commit 6bf9ee87b2
1 changed files with 170 additions and 166 deletions

View File

@ -1,7 +1,7 @@
/*
* i o . c -- Low level I/O
*
* Copyright © 1993-1999 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
* Copyright © 1993-2019 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
*
*
* Permission to use, copy, modify, distribute,and license this
@ -15,7 +15,7 @@
*
* Author: Erick Gallesio [eg@kaolin.unice.fr]
* Creation date: ????
* Last file update: 3-Sep-1999 20:20 (eg)
* Last file update: 31-Oct-2019 15:55 (eg)
*/
#ifdef WIN32
@ -67,6 +67,10 @@
# define READ_DATA_PENDING(fp) (max(0,(fp)->_egptr - (fp)->_gptr))
# endif
#endif
#if (!defined (READ_DATA_PENDING)) && defined __GLIBC__
# define READ_DATA_PENDING(fp) (max(0,(fp)->_IO_read_end - (fp)->_IO_read_ptr))
#endif
#if (!defined (READ_DATA_PENDING)) && defined __SLBF
# define READ_DATA_PENDING(fp) (max(0,fp->_r))
#endif