summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2017-05-23 13:17:12 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2017-05-23 13:17:12 +0000
commitdef23de32451d0801b57d93da2ddc57d6ada69b4 (patch)
tree6b5fd181cd7ef113513693cfb7114ad51abf5947
parent41c935fc6efe582ca7e20606f1f8a78288441478 (diff)
downloadmpfr-def23de32451d0801b57d93da2ddc57d6ada69b4.tar.gz
[src/mpfr-intmax.h] Define mpfr_uintmax_t and MPFR_INTMAX_MAX too.
However, this will not necessarily be used by src/vasprintf.c, as this can be regarded as an EOVERFLOW error for which the behavior on the %...n values is not specified, i.e. we may not need to support size values larger than INT_MAX. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11522 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r--src/mpfr-intmax.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mpfr-intmax.h b/src/mpfr-intmax.h
index 8fba6c4f8..6cffccc54 100644
--- a/src/mpfr-intmax.h
+++ b/src/mpfr-intmax.h
@@ -56,10 +56,15 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
/* Largest signed integer type available for the MPFR build. */
#if defined(MPFR_USE_INTMAX_T)
typedef intmax_t mpfr_intmax_t;
+typedef uintmax_t mpfr_uintmax_t;
#elif defined(HAVE_LONG_LONG)
typedef long long mpfr_intmax_t;
+typedef unsigned long long mpfr_uintmax_t;
+# define MPFR_INTMAX_MAX LLONG_MAX
#else
typedef long mpfr_intmax_t;
+typedef unsigned long mpfr_uintmax_t;
+# define MPFR_INTMAX_MAX LONG_MAX
#endif
#endif