diff options
Diffstat (limited to 'regex_internal.h')
-rw-r--r-- | regex_internal.h | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/regex_internal.h b/regex_internal.h index 0bd2ffc2..f80dd994 100644 --- a/regex_internal.h +++ b/regex_internal.h @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2002-2005, 2007, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. @@ -42,9 +42,11 @@ #if defined HAVE_STDBOOL_H || defined _LIBC # include <stdbool.h> #endif /* HAVE_STDBOOL_H || _LIBC */ +#if !defined(ZOS_USS) #if defined HAVE_STDINT_H || defined _LIBC # include <stdint.h> #endif /* HAVE_STDINT_H || _LIBC */ +#endif /* !ZOS_USS */ #if defined _LIBC # include <bits/libc-lock.h> #else @@ -121,6 +123,9 @@ is_blank (int c) # define BE(expr, val) __builtin_expect (expr, val) #else # define BE(expr, val) (expr) +# ifdef inline +# undef inline +# endif # define inline #endif @@ -135,9 +140,16 @@ is_blank (int c) /* Rename to standard API for using out of glibc. */ #ifndef _LIBC +# ifdef __wctype +# undef __wctype +# endif # define __wctype wctype +# ifdef __iswctype +# undef __iswctype +# endif # define __iswctype iswctype # define __btowc btowc +# define __mbrtowc mbrtowc #undef __mempcpy /* GAWK */ # define __mempcpy mempcpy # define __wcrtomb wcrtomb @@ -408,18 +420,21 @@ typedef struct re_dfa_t re_dfa_t; # endif #endif +#ifndef NOT_IN_libc static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr, int new_buf_len) internal_function; -#ifdef RE_ENABLE_I18N +# ifdef RE_ENABLE_I18N static void build_wcs_buffer (re_string_t *pstr) internal_function; -static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr) internal_function; -#endif /* RE_ENABLE_I18N */ +static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr) + internal_function; +# endif /* RE_ENABLE_I18N */ static void build_upper_buffer (re_string_t *pstr) internal_function; static void re_string_translate_buffer (re_string_t *pstr) internal_function; static unsigned int re_string_context_at (const re_string_t *input, int idx, int eflags) internal_function __attribute ((pure)); +#endif #define re_string_peek_byte(pstr, offset) \ ((pstr)->mbs[(pstr)->cur_idx + offset]) #define re_string_fetch_byte(pstr) \ @@ -762,15 +777,16 @@ re_string_wchar_at (const re_string_t *pstr, int idx) return (wint_t) pstr->wcs[idx]; } +# ifndef NOT_IN_libc static int internal_function __attribute ((pure)) re_string_elem_size_at (const re_string_t *pstr, int idx) { -# ifdef _LIBC +# ifdef _LIBC const unsigned char *p, *extra; const int32_t *table, *indirect; int32_t tmp; -# include <locale/weight.h> +# include <locale/weight.h> uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) @@ -785,9 +801,10 @@ re_string_elem_size_at (const re_string_t *pstr, int idx) return p - pstr->mbs - idx; } else -# endif /* _LIBC */ +# endif /* _LIBC */ return 1; } +# endif #endif /* RE_ENABLE_I18N */ #endif /* _REGEX_INTERNAL_H */ |