mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
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.
This commit is contained in:
@ -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>
|
2018-07-04 Carlos O'Donell <carlos@redhat.com>
|
||||||
|
|
||||||
[BZ #23164]
|
[BZ #23164]
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "regex_internal.h"
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
do_test (void)
|
do_test (void)
|
||||||
@ -39,8 +38,9 @@ do_test (void)
|
|||||||
memset (&r, 0, sizeof (r));
|
memset (&r, 0, sizeof (r));
|
||||||
memset (&s, 0, sizeof (s));
|
memset (&s, 0, sizeof (s));
|
||||||
|
|
||||||
/* The bug cannot be reproduced without initialized fastmap. */
|
/* The bug cannot be reproduced without initialized fastmap (it is SBC_MAX
|
||||||
r.fastmap = malloc (SBC_MAX);
|
value from regex_internal.h). */
|
||||||
|
r.fastmap = malloc (UCHAR_MAX + 1);
|
||||||
|
|
||||||
/* 圭 */
|
/* 圭 */
|
||||||
re_compile_pattern ("\xb7\xbd", 2, &r);
|
re_compile_pattern ("\xb7\xbd", 2, &r);
|
||||||
|
Reference in New Issue
Block a user