summaryrefslogtreecommitdiff
path: root/src/inp_str.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/inp_str.c')
-rw-r--r--src/inp_str.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/inp_str.c b/src/inp_str.c
index 676255480..a725cc19b 100644
--- a/src/inp_str.c
+++ b/src/inp_str.c
@@ -73,6 +73,10 @@ mpfr_inp_str (mpfr_ptr rop, FILE *stream, int base, mpfr_rnd_t rnd_mode)
break;
c = getc (stream);
}
+ /* FIXME: The use of ungetc has been deprecated since C99 when it
+ occurs at the beginning of a binary stream, and this may happen
+ on /dev/null. One could add a "if (c != EOF)" test, but let's
+ wait for some discussion in comp.std.c first... */
ungetc (c, stream);
if (MPFR_UNLIKELY (str_size == (size_t) -1 || str_size == 0 ||