From 367417c47be947ed7d0af7b430af5ff1626bf7c1 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 14 Jun 2015 19:06:21 +0300 Subject: Sync regex routines wit GLIBC. --- regex_internal.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'regex_internal.h') diff --git a/regex_internal.h b/regex_internal.h index 327bd7e0..e0dd3517 100644 --- a/regex_internal.h +++ b/regex_internal.h @@ -803,6 +803,10 @@ re_string_wchar_at (const re_string_t *pstr, int idx) } # ifndef NOT_IN_libc +# ifdef _LIBC +# include +# endif + static int internal_function __attribute__ ((pure, unused)) re_string_elem_size_at (const re_string_t *pstr, int idx) @@ -810,7 +814,6 @@ re_string_elem_size_at (const re_string_t *pstr, int idx) # ifdef _LIBC const unsigned char *p, *extra; const int32_t *table, *indirect; -# include uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) -- cgit v1.2.3 From 2685230246500f96fd4d594f9b470688c562c7b9 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 14 Jun 2015 19:54:23 +0300 Subject: More "attribute" cleanup. --- regex_internal.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'regex_internal.h') diff --git a/regex_internal.h b/regex_internal.h index e0dd3517..4d0028ff 100644 --- a/regex_internal.h +++ b/regex_internal.h @@ -148,11 +148,8 @@ is_blank (int c) # define attribute_hidden #endif /* not _LIBC */ -#ifdef __GNUC__ -# define __attribute(arg) __attribute__ (arg) -#else -# define __attribute(arg) -# define __attribute__(arg) /* GAWK: They left this out. Duh. */ +#if __GNUC__ < 3 + (__GNUC_MINOR__ < 1) +# define __attribute__(arg) #endif #ifdef GAWK -- cgit v1.2.3