summaryrefslogtreecommitdiff
path: root/gmp-impl.h
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2014-05-29 14:25:22 +0200
committerMarc Glisse <marc.glisse@inria.fr>2014-05-29 14:25:22 +0200
commit36403aac8a316e1c41133ac0d43dff1b760e8121 (patch)
tree580d48201cceb91d3f8b602d0def60a8aea5d566 /gmp-impl.h
parent6f74b45c53f5abca035dca43abf5f4bb44f9c664 (diff)
downloadgmp-36403aac8a316e1c41133ac0d43dff1b760e8121.tar.gz
Include and rely on <limits.h>.
Diffstat (limited to 'gmp-impl.h')
-rw-r--r--gmp-impl.h39
1 files changed, 0 insertions, 39 deletions
diff --git a/gmp-impl.h b/gmp-impl.h
index dc4e084a7..1a317534d 100644
--- a/gmp-impl.h
+++ b/gmp-impl.h
@@ -547,24 +547,6 @@ __GMP_DECLSPEC void __gmp_tmp_debug_free (const char *, int, int,
((n) >= 0x100) + ((n) >= 0x200) + ((n) >= 0x400) + ((n) >= 0x800) + \
((n) >= 0x1000) + ((n) >= 0x2000) + ((n) >= 0x4000) + ((n) >= 0x8000))
-/* The "short" defines are a bit different because shorts are promoted to
- ints by ~ or >> etc.
-
- #ifndef's are used since on some systems (HP?) header files other than
- limits.h setup these defines. We could forcibly #undef in that case, but
- there seems no need to worry about that.
-
- Now that we include <limits.h> we should be able to remove all this. */
-
-#ifndef ULONG_MAX
-#define ULONG_MAX __GMP_ULONG_MAX
-#endif
-#ifndef UINT_MAX
-#define UINT_MAX __GMP_UINT_MAX
-#endif
-#ifndef USHRT_MAX
-#define USHRT_MAX __GMP_USHRT_MAX
-#endif
#define MP_LIMB_T_MAX (~ (mp_limb_t) 0)
/* Must cast ULONG_MAX etc to unsigned long etc, since they might not be
@@ -575,27 +557,6 @@ __GMP_DECLSPEC void __gmp_tmp_debug_free (const char *, int, int,
#define USHRT_HIGHBIT (USHRT_MAX ^ ((unsigned short) USHRT_MAX >> 1))
#define GMP_LIMB_HIGHBIT (MP_LIMB_T_MAX ^ (MP_LIMB_T_MAX >> 1))
-#ifndef LONG_MIN
-#define LONG_MIN ((long) ULONG_HIGHBIT)
-#endif
-#ifndef LONG_MAX
-#define LONG_MAX (-(LONG_MIN+1))
-#endif
-
-#ifndef INT_MIN
-#define INT_MIN ((int) UINT_HIGHBIT)
-#endif
-#ifndef INT_MAX
-#define INT_MAX (-(INT_MIN+1))
-#endif
-
-#ifndef SHRT_MIN
-#define SHRT_MIN ((int) (short) USHRT_HIGHBIT)
-#endif
-#ifndef SHRT_MAX
-#define SHRT_MAX (-(SHRT_MIN+1))
-#endif
-
#if __GMP_MP_SIZE_T_INT
#define MP_SIZE_T_MAX INT_MAX
#define MP_SIZE_T_MIN INT_MIN