diff options
author | thevenyp <thevenyp@280ebfd0-de03-0410-8827-d642c229c3f4> | 2008-01-28 10:34:46 +0000 |
---|---|---|
committer | thevenyp <thevenyp@280ebfd0-de03-0410-8827-d642c229c3f4> | 2008-01-28 10:34:46 +0000 |
commit | df83791f462714ca4e2c95482f128a152f2507e1 (patch) | |
tree | 80ad782343b4e157c921b04f9955edca0d4f5744 /printf.c | |
parent | 0188fc3363a4ab2f9aedcd413c342ddc5cc4150c (diff) | |
download | mpfr-df83791f462714ca4e2c95482f128a152f2507e1.tar.gz |
set errno to EOVERFLOW when printf-like functions should return value exceeding INT_MAX
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5230 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'printf.c')
-rw-r--r-- | printf.c | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -33,8 +33,8 @@ MA 02110-1301, USA. */ - returns the number of characters in the returned string excluding the terminating null - returns -1 and set the erange flag if the number of produced characters - exceeds INT_MAX (in that case, mpfr_snprintf and mpfr_vsnprintf may also - set errno to EOVERFLOW, see below) */ + exceeds INT_MAX (in that case, also set errno to EOVERFLOW in POSIX + systems) */ int mpfr_printf (const char *fmt, ...) @@ -197,8 +197,6 @@ mpfr_snprintf (char *buf, size_t size, const char *fmt, ...) return ret; } -/* In POSIX systems, mpfr_vsnprintf set errno to EOVERFLOW if the number of - characters which ought to have been produced exceeds INT_MAX. */ int mpfr_vsnprintf (char *buf, size_t size, const char *fmt, va_list ap) { @@ -216,9 +214,6 @@ mpfr_vsnprintf (char *buf, size_t size, const char *fmt, va_list ap) { if (strp) mpfr_free_str (strp); -#ifdef EOVERFLOW - errno = EOVERFLOW; -#endif return -1; } |