* grub-core/gnulib/regex.h (re_pattern_buffer): Declare buffer as
re_dfa_t to avoid breaking alignment invariants. * grub-core/gnulib/regex_internal.h (re_dfa_t): Moved to ... * grub-core/gnulib/regex.h (re_dfa_t): ... here.
This commit is contained in:
parent
44c6828db4
commit
a67b2a046c
4 changed files with 12 additions and 6 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2012-02-09 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/gnulib/regex.h (re_pattern_buffer): Declare buffer as
|
||||||
|
re_dfa_t to avoid breaking alignment invariants.
|
||||||
|
* grub-core/gnulib/regex_internal.h (re_dfa_t): Moved to ...
|
||||||
|
* grub-core/gnulib/regex.h (re_dfa_t): ... here.
|
||||||
|
|
||||||
2012-02-09 Vladimir Serbinenko <phcoder@gmail.com>
|
2012-02-09 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/loader/i386/xnu.c (grub_xnu_boot): Fix printf.
|
* grub-core/loader/i386/xnu.c (grub_xnu_boot): Fix printf.
|
||||||
|
|
|
@ -776,7 +776,7 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
|
||||||
if (dfa == NULL)
|
if (dfa == NULL)
|
||||||
return REG_ESPACE;
|
return REG_ESPACE;
|
||||||
preg->allocated = sizeof (re_dfa_t);
|
preg->allocated = sizeof (re_dfa_t);
|
||||||
preg->buffer = (unsigned char *) dfa;
|
preg->buffer = dfa;
|
||||||
}
|
}
|
||||||
preg->used = sizeof (re_dfa_t);
|
preg->used = sizeof (re_dfa_t);
|
||||||
|
|
||||||
|
|
|
@ -448,12 +448,15 @@ typedef enum
|
||||||
compiled, the `re_nsub' field is available. All other fields are
|
compiled, the `re_nsub' field is available. All other fields are
|
||||||
private to the regex routines. */
|
private to the regex routines. */
|
||||||
|
|
||||||
|
struct re_dfa_t;
|
||||||
|
typedef struct re_dfa_t re_dfa_t;
|
||||||
|
|
||||||
struct re_pattern_buffer
|
struct re_pattern_buffer
|
||||||
{
|
{
|
||||||
/* Space that holds the compiled pattern. It is declared as
|
/* Space that holds the compiled pattern. It is declared as
|
||||||
`unsigned char *' because its elements are sometimes used as
|
`unsigned char *' because its elements are sometimes used as
|
||||||
array indexes. */
|
array indexes. */
|
||||||
unsigned char *_REG_RE_NAME (buffer);
|
re_dfa_t *_REG_RE_NAME (buffer);
|
||||||
|
|
||||||
/* Number of bytes to which `buffer' points. */
|
/* Number of bytes to which `buffer' points. */
|
||||||
__re_long_size_t _REG_RE_NAME (allocated);
|
__re_long_size_t _REG_RE_NAME (allocated);
|
||||||
|
|
|
@ -413,10 +413,6 @@ struct re_string_t
|
||||||
};
|
};
|
||||||
typedef struct re_string_t re_string_t;
|
typedef struct re_string_t re_string_t;
|
||||||
|
|
||||||
|
|
||||||
struct re_dfa_t;
|
|
||||||
typedef struct re_dfa_t re_dfa_t;
|
|
||||||
|
|
||||||
#ifndef _LIBC
|
#ifndef _LIBC
|
||||||
# if defined __i386__ && !defined __EMX__
|
# if defined __i386__ && !defined __EMX__
|
||||||
# define internal_function __attribute ((regparm (3), stdcall))
|
# define internal_function __attribute ((regparm (3), stdcall))
|
||||||
|
|
Loading…
Reference in a new issue