diff options
author | dmcmahill <dmcmahill@pkgsrc.org> | 2007-05-24 21:51:47 +0000 |
---|---|---|
committer | dmcmahill <dmcmahill@pkgsrc.org> | 2007-05-24 21:51:47 +0000 |
commit | d3f1b2b29105e2d0c47ceb29c90146d7c297fa69 (patch) | |
tree | 61c78d5a09c6e594c4ae694c6b499ee32ea5792d /devel/m4/patches | |
parent | 4a644be456000f7393fba58dd82fe34c8cca2bf8 (diff) | |
download | pkgsrc-d3f1b2b29105e2d0c47ceb29c90146d7c297fa69.tar.gz |
Fix a division bug when negative numbers are involved. Bump pkgrev.
Diffstat (limited to 'devel/m4/patches')
-rw-r--r-- | devel/m4/patches/patch-aa | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/devel/m4/patches/patch-aa b/devel/m4/patches/patch-aa new file mode 100644 index 00000000000..6a0af43c433 --- /dev/null +++ b/devel/m4/patches/patch-aa @@ -0,0 +1,20 @@ +$NetBSD: patch-aa,v 1.4 2007/05/24 21:51:47 dmcmahill Exp $ + +avoid the following incorrect behaviour. + +% echo "eval(-2/2)" | gm4 - +2147483647 + +has been reported on bug-m4@gnu.org + +--- src/eval.c.orig 2007-01-09 16:12:43.000000000 +0000 ++++ src/eval.c +@@ -721,7 +721,7 @@ mult_term (eval_token et, int32_t *v1) + /* Avoid the x86 SIGFPE on INT_MIN / -1. */ + *v1 = (int32_t) -(uint32_t) *v1; + else +- *v1 = (int32_t) ((uint32_t) *v1 / (uint32_t) v2); ++ *v1 = *v1 / v2; + break; + + case MODULO: |