* 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:
Vladimir 'phcoder' Serbinenko 2012-02-09 23:40:17 +01:00
parent 44c6828db4
commit a67b2a046c
4 changed files with 12 additions and 6 deletions

View file

@ -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>
* grub-core/loader/i386/xnu.c (grub_xnu_boot): Fix printf.

View file

@ -776,7 +776,7 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
if (dfa == NULL)
return REG_ESPACE;
preg->allocated = sizeof (re_dfa_t);
preg->buffer = (unsigned char *) dfa;
preg->buffer = dfa;
}
preg->used = sizeof (re_dfa_t);

View file

@ -448,12 +448,15 @@ typedef enum
compiled, the `re_nsub' field is available. All other fields are
private to the regex routines. */
struct re_dfa_t;
typedef struct re_dfa_t re_dfa_t;
struct re_pattern_buffer
{
/* Space that holds the compiled pattern. It is declared as
`unsigned char *' because its elements are sometimes used as
array indexes. */
unsigned char *_REG_RE_NAME (buffer);
re_dfa_t *_REG_RE_NAME (buffer);
/* Number of bytes to which `buffer' points. */
__re_long_size_t _REG_RE_NAME (allocated);

View file

@ -413,10 +413,6 @@ struct 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
# if defined __i386__ && !defined __EMX__
# define internal_function __attribute ((regparm (3), stdcall))