bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] regex: Pass the system regex if its only problem is 32-bit regof


From: Paolo Bonzini
Subject: [PATCH] regex: Pass the system regex if its only problem is 32-bit regoff_t
Date: Thu, 9 Sep 2010 10:18:09 +0200

The included regex cannot support equivalence classes and multibyte
collation symbols properly.  On the other hand it supports 64-bit
regoff_t, which glibc cannot provide without breaking the ABI.
We currently favor the latter, but this is no longer correct since
there's clearly no hope of ever passing the test.

* m4/regex.m4: Disable test for regoff_t size.
---
 ChangeLog   |    5 +++++
 m4/regex.m4 |   11 ++++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 836f553..3174aa9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-09-10  Paolo Bonzini  <address@hidden>
+
+       regex: Pass the system regex if its only problem is 32-bit regoff_t.
+       * m4/regex.m4: Disable test for regoff_t size.
+
 2010-08-26  Erik Faye-Lund  <address@hidden>
 
        poll: return immediately on POLLHUP.
diff --git a/m4/regex.m4 b/m4/regex.m4
index 95784e4..c138eb0 100644
--- a/m4/regex.m4
+++ b/m4/regex.m4
@@ -158,12 +158,17 @@ AC_DEFUN([gl_REGEX],
             if (! REG_STARTEND)
               return 1;
 
-            /* Reject hosts whose regoff_t values are too narrow.
-               These include glibc 2.3.5 on hosts with 64-bit ptrdiff_t
-               and 32-bit int.  */
+#if 0
+            /* It would be nice to reject hosts whose regoff_t values are too
+               narrow (including glibc on hosts with 64-bit ptrdiff_t and
+               32-bit int), but glibc cannot make this change without breaking
+               its ABI.  If this test was left on, support for equivalence
+               classes and multibyte collation symbols would always be broken
+               except when compiling --without-included-regex.   */
             if (sizeof (regoff_t) < sizeof (ptrdiff_t)
                 || sizeof (regoff_t) < sizeof (ssize_t))
               return 1;
+#endif
 
             return 0;]])],
        [gl_cv_func_re_compile_pattern_working=yes],
-- 
1.7.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]