svn commit: trunk/uClibc/libc/misc/regex

psm at uclibc.org psm at uclibc.org
Mon Jan 30 16:05:35 UTC 2006


Author: psm
Date: 2006-01-30 08:05:33 -0800 (Mon, 30 Jan 2006)
New Revision: 13716

Log:
make regex a little bit smaller

Modified:
   trunk/uClibc/libc/misc/regex/regex.c
   trunk/uClibc/libc/misc/regex/regex_internal.c
   trunk/uClibc/libc/misc/regex/regex_internal.h


Changeset:
Modified: trunk/uClibc/libc/misc/regex/regex.c
===================================================================
--- trunk/uClibc/libc/misc/regex/regex.c	2006-01-30 15:29:55 UTC (rev 13715)
+++ trunk/uClibc/libc/misc/regex/regex.c	2006-01-30 16:05:33 UTC (rev 13716)
@@ -28,6 +28,9 @@
 #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>

Modified: trunk/uClibc/libc/misc/regex/regex_internal.c
===================================================================
--- trunk/uClibc/libc/misc/regex/regex_internal.c	2006-01-30 15:29:55 UTC (rev 13715)
+++ trunk/uClibc/libc/misc/regex/regex_internal.c	2006-01-30 16:05:33 UTC (rev 13716)
@@ -195,7 +195,7 @@
 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 @@
   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

Modified: trunk/uClibc/libc/misc/regex/regex_internal.h
===================================================================
--- trunk/uClibc/libc/misc/regex/regex_internal.h	2006-01-30 15:29:55 UTC (rev 13715)
+++ trunk/uClibc/libc/misc/regex/regex_internal.h	2006-01-30 16:05:33 UTC (rev 13716)
@@ -29,6 +29,7 @@
 
 #if defined HAVE_LANGINFO_H || defined HAVE_LANGINFO_CODESET || defined _LIBC
 # include <langinfo.h>
+libc_hidden_proto(nl_langinfo)
 #endif
 #if defined HAVE_LOCALE_H || defined _LIBC
 # include <locale.h>
@@ -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
 




More information about the uClibc-cvs mailing list