summaryrefslogtreecommitdiffstats
path: root/libc/misc/regex/regex.c
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2006-02-27 23:50:27 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2006-02-27 23:50:27 +0000
commite52a11db3dcc50f2dd72c3f5871afc1d432507de (patch)
tree9ecbf1b8ae5b77595de3393f4b8e37ecf4f074c2 /libc/misc/regex/regex.c
parentd032c07a7913c9aa932e35eb04a3cccdae8a9a1d (diff)
downloaduClibc-alpine-e52a11db3dcc50f2dd72c3f5871afc1d432507de.tar.bz2
uClibc-alpine-e52a11db3dcc50f2dd72c3f5871afc1d432507de.tar.xz
Merge from trunk.
Diffstat (limited to 'libc/misc/regex/regex.c')
-rw-r--r--libc/misc/regex/regex.c78
1 files changed, 47 insertions, 31 deletions
diff --git a/libc/misc/regex/regex.c b/libc/misc/regex/regex.c
index 99de9fd6c..77c09a011 100644
--- a/libc/misc/regex/regex.c
+++ b/libc/misc/regex/regex.c
@@ -28,48 +28,64 @@
#ifdef __UCLIBC__
#undef _LIBC
#define _REGEX_RE_COMP
+#define HAVE_MEMPCPY
+#define HAVE_LANGINFO
+#define HAVE_LANGINFO_CODESET
#include <stdbool.h>
#include <stdint.h>
+#include <string.h>
+#include <stdlib.h>
#ifdef __UCLIBC_HAS_WCHAR__
#define RE_ENABLE_I18N
-#define wcscoll __wcscoll
-#define wcrtomb __wcrtomb
-#define mbrtowc __mbrtowc
-#define iswctype __iswctype
-#define iswlower __iswlower
-#define iswalnum __iswalnum
-#define towlower __towlower
-#define towupper __towupper
-#define mbsinit __mbsinit
#include <wchar.h>
#include <wctype.h>
-/* attribute_hidden produces text relocation */
-//extern int __wcscoll (__const wchar_t *__s1, __const wchar_t *__s2) __THROW /*attribute_hidden*/;
+#define __iswctype iswctype
+#define __wcrtomb wcrtomb
+#define __btowc btowc
+#define __wctype wctype
+libc_hidden_proto(wcscoll)
+libc_hidden_proto(wcrtomb)
+libc_hidden_proto(mbrtowc)
+libc_hidden_proto(iswctype)
+libc_hidden_proto(iswlower)
+libc_hidden_proto(iswalnum)
+libc_hidden_proto(towlower)
+libc_hidden_proto(towupper)
+libc_hidden_proto(mbsinit)
+libc_hidden_proto(btowc)
+libc_hidden_proto(wctype)
-extern size_t __wcrtomb (char *__restrict __s, wchar_t __wc,
- mbstate_t *__restrict __ps) attribute_hidden;
-
-extern wint_t __btowc (int __c) attribute_hidden;
-
-extern wctype_t __wctype (__const char *__property) attribute_hidden;
+#endif
-//extern int __iswctype (wint_t __wc, wctype_t __desc) /*attribute_hidden*/;
+#include <ctype.h>
+#ifdef __UCLIBC_HAS_CTYPE_TABLES__
+#define __toupper toupper
+#define __tolower tolower
+#endif
+#define __mempcpy mempcpy
+#ifdef __UCLIBC_HAS_XLOCALE__
+libc_hidden_proto(__ctype_b_loc)
+libc_hidden_proto(__ctype_toupper_loc)
+#else
+libc_hidden_proto(__ctype_b)
+libc_hidden_proto(__ctype_toupper)
#endif
+libc_hidden_proto(toupper)
+libc_hidden_proto(tolower)
+libc_hidden_proto(memcmp)
+libc_hidden_proto(memcpy)
+libc_hidden_proto(memmove)
+libc_hidden_proto(memset)
+libc_hidden_proto(strchr)
+libc_hidden_proto(strcmp)
+libc_hidden_proto(strlen)
+libc_hidden_proto(strncpy)
+libc_hidden_proto(getenv)
+libc_hidden_proto(strcasecmp)
+libc_hidden_proto(mempcpy)
+libc_hidden_proto(abort)
-#define memcmp __memcmp
-#define memcpy __memcpy
-#define memmove __memmove
-#define memset __memset
-#define strchr __strchr
-#define strcmp __strcmp
-#define strlen __strlen
-#define strncpy __strncpy
-#define getenv __getenv
-#define strcasecmp __strcasecmp
-
-extern void *__mempcpy (void *__restrict __dest,
- __const void *__restrict __src, size_t __n) attribute_hidden;
#endif
/* Make sure noone compiles this code with a C++ compiler. */