summaryrefslogtreecommitdiffstats
path: root/libc/misc/regex/regex_old.c
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2008-07-09 16:47:01 +0000
committerCarmelo Amoroso <carmelo.amoroso@st.com>2008-07-09 16:47:01 +0000
commit62a21af8006ab04282fdc354c5b4dc765f56d058 (patch)
tree568761d58289238aa14cced3f0010809d4d28c00 /libc/misc/regex/regex_old.c
parentef250238dc1572caf859c2b64652f9cdfb0d9e42 (diff)
downloaduClibc-alpine-62a21af8006ab04282fdc354c5b4dc765f56d058.tar.bz2
uClibc-alpine-62a21af8006ab04282fdc354c5b4dc765f56d058.tar.xz
BIG BIG commit: all left files merged from trunk [rev 22714]. Currenntly NPTL sh4 port build and work fine. All committed to allow Khem Ray working on a working branch to integrate the ARM nptl port. MIPS nptl port not tested but should still building and working fine. There are some other part non yet merged with trunk (misc/internals and some headers file that need some more work). Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'libc/misc/regex/regex_old.c')
-rw-r--r--libc/misc/regex/regex_old.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/libc/misc/regex/regex_old.c b/libc/misc/regex/regex_old.c
index cf5843ec5..dc5781967 100644
--- a/libc/misc/regex/regex_old.c
+++ b/libc/misc/regex/regex_old.c
@@ -35,17 +35,18 @@
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
+#include <unistd.h>
#include <stdio.h>
-libc_hidden_proto(memset)
-libc_hidden_proto(memcmp)
-libc_hidden_proto(memcpy)
-libc_hidden_proto(strcmp)
-libc_hidden_proto(strlen)
+/* Experimentally off - libc_hidden_proto(memset) */
+/* Experimentally off - libc_hidden_proto(memcmp) */
+/* Experimentally off - libc_hidden_proto(memcpy) */
+/* Experimentally off - libc_hidden_proto(strcmp) */
+/* Experimentally off - libc_hidden_proto(strlen) */
libc_hidden_proto(printf)
libc_hidden_proto(abort)
#ifdef __USE_GNU
-libc_hidden_proto(mempcpy)
+/* Experimentally off - libc_hidden_proto(mempcpy) */
#endif
/* AIX requires this to be the first thing in the file. */
@@ -794,7 +795,7 @@ PREFIX(extract_number_and_incr) (destination, source)
/* It is useful to test things that ``must'' be true when debugging. */
# include <assert.h>
-static int debug;
+static smallint debug;
# define DEBUG_STATEMENT(e) e
# define DEBUG_PRINT1(x) if (debug) printf (x)
@@ -5128,7 +5129,7 @@ strong_alias(__re_search_2, re_search_2)
#ifdef MATCH_MAY_ALLOCATE
# define FREE_VAR(var) if (var) REGEX_FREE (var); var = NULL
#else
-# define FREE_VAR(var) if (var) free (var); var = NULL
+# define FREE_VAR(var) free (var); var = NULL
#endif
#ifdef WCHAR
@@ -8309,20 +8310,17 @@ void
regfree (preg)
regex_t *preg;
{
- if (preg->buffer != NULL)
- free (preg->buffer);
+ free (preg->buffer);
preg->buffer = NULL;
preg->allocated = 0;
preg->used = 0;
- if (preg->fastmap != NULL)
- free (preg->fastmap);
+ free (preg->fastmap);
preg->fastmap = NULL;
preg->fastmap_accurate = 0;
- if (preg->translate != NULL)
- free (preg->translate);
+ free (preg->translate);
preg->translate = NULL;
}
#if defined _LIBC || defined __UCLIBC__