diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2021-09-14 14:03:49 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2021-09-14 14:03:49 +0000 |
commit | 6822f7a99cc0f1dd49c3a4965f3eea6693ee4b72 (patch) | |
tree | 8fdc9d03fdbb0df29cdda299a8fdbf9ac0da7e98 | |
parent | 169330f5824a70b9f166c95f1d485b819ae363a1 (diff) | |
download | mpfr-6822f7a99cc0f1dd49c3a4965f3eea6693ee4b72.tar.gz |
[src/inp_str.c] Added a FIXME on a deprecated use of ungetc.
git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14579 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r-- | src/inp_str.c | 4 |
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 || |