aboutsummaryrefslogtreecommitdiff
path: root/posix
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2018-07-04 17:26:22 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2018-07-04 17:29:49 -0300
commit1002d708232dda9ebff65f6c1409fa067a01b6e0 (patch)
tree42f044c9c054cd82e14594c8394834a71c97ef80 /posix
parent34fdb893e0cec55bdfc83ce56ab29b8f5eeaef9d (diff)
downloadglibc-1002d708232dda9ebff65f6c1409fa067a01b6e0.zip
glibc-1002d708232dda9ebff65f6c1409fa067a01b6e0.tar.gz
glibc-1002d708232dda9ebff65f6c1409fa067a01b6e0.tar.bz2
posix: Fix bug-regex33 after regex sync
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.
Diffstat (limited to 'posix')
-rw-r--r--posix/bug-regex33.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/posix/bug-regex33.c b/posix/bug-regex33.c
index 0313cb4..015b73c 100644
--- a/posix/bug-regex33.c
+++ b/posix/bug-regex33.c
@@ -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);