Group :: Sistema/Bibliotecas
RPM: gmp
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: gmp-4.1.4-deb-fixes.patch
Download
Download
--- gmp-4.1.4.orig/gmp-impl.h
+++ gmp-4.1.4/gmp-impl.h
@@ -2188,14 +2188,24 @@
there's an even number. */
#if defined (__GNUC__) && ! defined (NO_ASM) && HAVE_HOST_CPU_FAMILY_x86
+/* Some clever GCC maintainer decided to change the meaning of the q register
+ flag with GCC version 3.1. He added a Q flag with the old meaning at the
+ same time. This forces us to use a conditional on GCC version. */
+#if __GMP_GNUC_PREREQ (3,1)
+#define __GMP_qm "=Qm"
+#define __GMP_q "=Q"
+#else
+#define __GMP_qm "=qm"
+#define __GMP_q "=q"
+#endif
#define ULONG_PARITY(p, n) \
do { \
char __p; \
unsigned long __n = (n); \
__n ^= (__n >> 16); \
- asm ("xorb %h1, %b1\n" \
- "setpo %0\n" \
- : "=qm" (__p), "=q" (__n) \
+ asm ("xorb %h1, %b1\n\t" \
+ "setpo %0" \
+ : __GMP_qm (__p), __GMP_q (__n)\
: "1" (__n)); \
(p) = __p; \
} while (0)
--- gmp-4.1.4.orig/mpn/generic/rootrem.c
+++ gmp-4.1.4/mpn/generic/rootrem.c
@@ -94,7 +94,7 @@
xn = (xnb + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS;
- qp = TMP_ALLOC_LIMBS (un + 1);
+ qp = TMP_ALLOC_LIMBS (PP_ALLOC);
xp = TMP_ALLOC_LIMBS (xn + 1);
/* Set initial root to only ones. This is an overestimate of the actual root