summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel/m4/files/m4-1.4.3-pointer.patch')
-rw-r--r--sys-devel/m4/files/m4-1.4.3-pointer.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/sys-devel/m4/files/m4-1.4.3-pointer.patch b/sys-devel/m4/files/m4-1.4.3-pointer.patch
new file mode 100644
index 000000000000..325fd55592df
--- /dev/null
+++ b/sys-devel/m4/files/m4-1.4.3-pointer.patch
@@ -0,0 +1,43 @@
+Grab changes from upstream gnulib CVS. We want to make sure
+that when we deal with pointers, we never try and store a pointer
+in a type that is smaller than the size of a pointer.
+
+http://bugs.gentoo.org/show_bug.cgi?id=87873
+
+--- lib/regex.c
++++ lib/regex.c
+@@ -1023,2 +1023,3 @@
+
++typedef unsigned long int active_reg_t;
+ #define PUSH_FAILURE_POINT(pattern_place, string_place, failure_code) \
+@@ -1028,3 +1029,3 @@
+ of 0 + -1 isn't done as unsigned. */ \
+- int this_reg; \
++ active_reg_t this_reg; \
+ \
+@@ -1135,3 +1136,3 @@
+ DEBUG_STATEMENT (fail_stack_elt_t failure_id;) \
+- int this_reg; \
++ active_reg_t this_reg; \
+ const unsigned char *string_temp; \
+@@ -1166,6 +1167,6 @@
+ /* Restore register info. */ \
+- high_reg = (unsigned) POP_FAILURE_ITEM (); \
++ high_reg = (active_reg_t) POP_FAILURE_ITEM (); \
+ DEBUG_PRINT2 (" Popping high active reg: %d\n", high_reg); \
+ \
+- low_reg = (unsigned) POP_FAILURE_ITEM (); \
++ low_reg = (active_reg_t) POP_FAILURE_ITEM (); \
+ DEBUG_PRINT2 (" Popping low active reg: %d\n", low_reg); \
+@@ -3406,4 +3407,4 @@
+ /* The currently active registers. */
+- unsigned lowest_active_reg = NO_LOWEST_ACTIVE_REG;
+- unsigned highest_active_reg = NO_HIGHEST_ACTIVE_REG;
++ active_reg_t lowest_active_reg = NO_LOWEST_ACTIVE_REG;
++ active_reg_t highest_active_reg = NO_HIGHEST_ACTIVE_REG;
+
+@@ -3992,3 +3993,3 @@
+ /* xx why this test? */
+- if ((int) old_regend[r] >= (int) regstart[r])
++ if (old_regend[r] >= regstart[r])
+ regend[r] = old_regend[r];