summaryrefslogtreecommitdiff
path: root/libc/misc/regex/regexec.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-12-26 04:25:09 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-12-26 04:25:09 +0000
commit0ef4c6b76fcaca59014c4d00828d4079314c1700 (patch)
tree91ccf816a2b3cbe5d95b4501f1d859316d9b4a7b /libc/misc/regex/regexec.c
parent6eb4415eaaaa2a01209262555f0a115a46deeb36 (diff)
regex: drop __<funcname> aliases. remove much of unused code.
shrink offset tables. disable "likely/unlikely" BE() macro. text data bss dec hex filename - 515032 2731 15424 533187 822c3 lib/libuClibc-0.9.30-svn.so + 515014 2731 15424 533169 822b1 lib/libuClibc-0.9.30-svn.so
Diffstat (limited to 'libc/misc/regex/regexec.c')
-rw-r--r--libc/misc/regex/regexec.c42
1 files changed, 1 insertions, 41 deletions
diff --git a/libc/misc/regex/regexec.c b/libc/misc/regex/regexec.c
index 587e6af30..17d58a602 100644
--- a/libc/misc/regex/regexec.c
+++ b/libc/misc/regex/regexec.c
@@ -255,28 +255,7 @@ regexec (preg, string, nmatch, pmatch, eflags)
__libc_lock_unlock (dfa->lock);
return err != REG_NOERROR;
}
-
-#ifdef _LIBC
-# include <shlib-compat.h>
-versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4);
-
-# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4)
-__typeof__ (__regexec) __compat_regexec;
-
-int
-attribute_compat_text_section
-__compat_regexec (const regex_t *__restrict preg,
- const char *__restrict string, size_t nmatch,
- regmatch_t pmatch[], int eflags)
-{
- return regexec (preg, string, nmatch, pmatch,
- eflags & (REG_NOTBOL | REG_NOTEOL));
-}
-compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0);
-# endif
-#elif defined __UCLIBC__
-strong_alias(__regexec,regexec)
-#endif
+libc_hidden_def(regexec)
/* Entry points for GNU code. */
@@ -316,9 +295,6 @@ re_match (bufp, string, length, start, regs)
{
return re_search_stub (bufp, string, length, start, 0, length, regs, 1);
}
-#if defined _LIBC || defined __UCLIBC__
-strong_alias(__re_match, re_match)
-#endif
int
re_search (bufp, string, length, start, range, regs)
@@ -329,9 +305,6 @@ re_search (bufp, string, length, start, range, regs)
{
return re_search_stub (bufp, string, length, start, range, length, regs, 0);
}
-#if defined _LIBC || defined __UCLIBC__
-strong_alias(__re_search, re_search)
-#endif
int
re_match_2 (bufp, string1, length1, string2, length2, start, regs, stop)
@@ -343,9 +316,6 @@ re_match_2 (bufp, string1, length1, string2, length2, start, regs, stop)
return re_search_2_stub (bufp, string1, length1, string2, length2,
start, 0, regs, stop, 1);
}
-#if defined _LIBC || defined __UCLIBC__
-strong_alias(__re_match_2, re_match_2)
-#endif
int
re_search_2 (bufp, string1, length1, string2, length2, start, range, regs, stop)
@@ -357,9 +327,6 @@ re_search_2 (bufp, string1, length1, string2, length2, start, range, regs, stop)
return re_search_2_stub (bufp, string1, length1, string2, length2,
start, range, regs, stop, 0);
}
-#if defined _LIBC || defined __UCLIBC__
-strong_alias(__re_search_2, re_search_2)
-#endif
static int
re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs,
@@ -385,12 +352,8 @@ re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs,
if (BE (s == NULL, 0))
return -2;
-#if (defined _LIBC || defined __UCLIBC__) && defined __USE_GNU
- memcpy (__mempcpy (s, string1, length1), string2, length2);
-#else
memcpy (s, string1, length1);
memcpy (s + length1, string2, length2);
-#endif
str = s;
free_str = 1;
}
@@ -592,9 +555,6 @@ re_set_registers (bufp, regs, num_regs, starts, ends)
regs->start = regs->end = (regoff_t *) 0;
}
}
-#if defined _LIBC || defined __UCLIBC__
-strong_alias(__re_set_registers, re_set_registers)
-#endif
/* Entry points compatible with 4.2 BSD regex library. We don't define
them unless specifically requested. */