From 75b1747bb2343695a736cfbb361d40026d4edeac Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Mon, 30 Jan 2006 16:05:33 +0000 Subject: make regex a little bit smaller --- libc/misc/regex/regex.c | 3 +++ libc/misc/regex/regex_internal.c | 4 ++-- libc/misc/regex/regex_internal.h | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'libc/misc/regex') diff --git a/libc/misc/regex/regex.c b/libc/misc/regex/regex.c index 3e53a2ea6..77c09a011 100644 --- a/libc/misc/regex/regex.c +++ b/libc/misc/regex/regex.c @@ -28,6 +28,9 @@ #ifdef __UCLIBC__ #undef _LIBC #define _REGEX_RE_COMP +#define HAVE_MEMPCPY +#define HAVE_LANGINFO +#define HAVE_LANGINFO_CODESET #include #include #include diff --git a/libc/misc/regex/regex_internal.c b/libc/misc/regex/regex_internal.c index 6299f547e..3fc62d731 100644 --- a/libc/misc/regex/regex_internal.c +++ b/libc/misc/regex/regex_internal.c @@ -195,7 +195,7 @@ static void internal_function build_wcs_buffer (re_string_t *pstr) { -#ifdef _LIBC +#if defined _LIBC || defined __UCLIBC__ unsigned char buf[MB_LEN_MAX]; assert (MB_LEN_MAX >= pstr->mb_cur_max); #else @@ -266,7 +266,7 @@ build_wcs_upper_buffer (re_string_t *pstr) mbstate_t prev_st; int src_idx, byte_idx, end_idx, remain_len; size_t mbclen; -#ifdef _LIBC +#if defined _LIBC || defined __UCLIBC__ char buf[MB_LEN_MAX]; assert (MB_LEN_MAX >= pstr->mb_cur_max); #else diff --git a/libc/misc/regex/regex_internal.h b/libc/misc/regex/regex_internal.h index 4782883c1..d82cf6d42 100644 --- a/libc/misc/regex/regex_internal.h +++ b/libc/misc/regex/regex_internal.h @@ -29,6 +29,7 @@ #if defined HAVE_LANGINFO_H || defined HAVE_LANGINFO_CODESET || defined _LIBC # include +libc_hidden_proto(nl_langinfo) #endif #if defined HAVE_LOCALE_H || defined _LIBC # include @@ -52,7 +53,7 @@ #endif /* In case that the system doesn't have isblank(). */ -#if !defined _LIBC && !defined HAVE_ISBLANK && !defined isblank +#if !defined _LIBC && !defined HAVE_ISBLANK && !defined isblank && !defined __UCLIBC__ # define isblank(ch) ((ch) == ' ' || (ch) == '\t') #endif -- cgit v1.2.3