summaryrefslogtreecommitdiff
path: root/printf.c
diff options
context:
space:
mode:
authorthevenyp <thevenyp@280ebfd0-de03-0410-8827-d642c229c3f4>2008-01-28 10:34:46 +0000
committerthevenyp <thevenyp@280ebfd0-de03-0410-8827-d642c229c3f4>2008-01-28 10:34:46 +0000
commitdf83791f462714ca4e2c95482f128a152f2507e1 (patch)
tree80ad782343b4e157c921b04f9955edca0d4f5744 /printf.c
parent0188fc3363a4ab2f9aedcd413c342ddc5cc4150c (diff)
downloadmpfr-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.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/printf.c b/printf.c
index 9c6365943..abe716402 100644
--- a/printf.c
+++ b/printf.c
@@ -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;
}