]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
posix: Fix bug-regex33 after regex sync
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 4 Jul 2018 20:26:22 +0000 (17:26 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 4 Jul 2018 20:29:49 +0000 (17:29 -0300)
On some platforms the inclusion of regex-internal.h in bug-regex33
testcase show a MAX redefinition if test-skeleton.c is include later.
This patch fixes by removing regex-internal.h inclusion and using
SBC_MAX value directly.

Checked on aarch64-linux-gnu.

* posix/bug-regex33.c: Fix build after regex sync.

ChangeLog
posix/bug-regex33.c

index 9e582627f48be0bdef12127f8cf208a706cc0829..2e8308e19192b878d96771a445e7357a3cc855d7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2018-07-04  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
+
+       * posix/bug-regex33.c: Fix build after regex sync.
+
 2018-07-04  Carlos O'Donell  <carlos@redhat.com>
 
        [BZ #23164]
index 0313cb4d1649bbcd993ed457f7a5f6eec6a966df..015b73c1d1e9c1e95a9430319a28a7be3a93fe7b 100644 (file)
@@ -23,7 +23,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include "regex_internal.h"
 
 static int
 do_test (void)
@@ -39,8 +38,9 @@ do_test (void)
   memset (&r, 0, sizeof (r));
   memset (&s, 0, sizeof (s));
 
-  /* The bug cannot be reproduced without initialized fastmap. */
-  r.fastmap = malloc (SBC_MAX);
+  /* The bug cannot be reproduced without initialized fastmap (it is SBC_MAX
+     value from regex_internal.h).  */
+  r.fastmap = malloc (UCHAR_MAX + 1);
 
                      /* 圭 */
   re_compile_pattern ("\xb7\xbd", 2, &r);