summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-12-17 01:36:31 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-12-17 01:36:31 +0000
commit41c15785a9b620a8c85944649c20cca853f40e84 (patch)
tree2676af638efdebba3a9e9b0cf2aa0eab1ec54819 /libc
parent3d21a36bcd1441e88529eb990d0f9d8ac41a2a4d (diff)
since gcc -Os hates us and does not inline string ops,
implement inline versions of some of them. Enable only those which result roughly in the same code size as using out-or-line versions. None of this affects users, installed headers won't have any trace of it.
Diffstat (limited to 'libc')
-rw-r--r--libc/string/generic/memchr.c4
-rw-r--r--libc/string/generic/mempcpy.c3
-rw-r--r--libc/string/i386/memcpy.c2
-rw-r--r--libc/string/i386/memset.c1
-rw-r--r--libc/string/i386/strcpy.c2
-rw-r--r--libc/string/i386/strlen.c2
-rw-r--r--libc/string/memchr.c1
-rw-r--r--libc/string/mempcpy.c1
-rw-r--r--libc/string/stpcpy.c2
9 files changed, 9 insertions, 9 deletions
diff --git a/libc/string/generic/memchr.c b/libc/string/generic/memchr.c
index 8ea3f539a..d5cd0005e 100644
--- a/libc/string/generic/memchr.c
+++ b/libc/string/generic/memchr.c
@@ -25,14 +25,12 @@
#include <stdlib.h>
#include <limits.h>
-/* Experimentally off - libc_hidden_proto(memchr) */
-/* libc_hidden_proto(abort) */
-
#include "memcopy.h"
#define LONG_MAX_32_BITS 2147483647
/* Search no more than N bytes of S for C. */
+#undef memchr
void *memchr (const void * s, int c_in, size_t n)
{
const unsigned char *char_ptr;
diff --git a/libc/string/generic/mempcpy.c b/libc/string/generic/mempcpy.c
index 8d7356486..d7fa79ef5 100644
--- a/libc/string/generic/mempcpy.c
+++ b/libc/string/generic/mempcpy.c
@@ -8,9 +8,8 @@
#include <string.h>
#ifdef __USE_GNU
-/* Experimentally off - libc_hidden_proto(mempcpy) */
-/* Experimentally off - libc_hidden_proto(memcpy) */
+# undef mempcpy
void *mempcpy (void *dstpp, const void *srcpp, size_t len)
{
memcpy(dstpp, srcpp, len);
diff --git a/libc/string/i386/memcpy.c b/libc/string/i386/memcpy.c
index 216ddfd1a..af86cf255 100644
--- a/libc/string/i386/memcpy.c
+++ b/libc/string/i386/memcpy.c
@@ -32,7 +32,7 @@
#include <string.h>
-/* Experimentally off - libc_hidden_proto(memcpy) */
+#undef memcpy
void *memcpy(void * to, const void * from, size_t n)
{
int d0, d1, d2;
diff --git a/libc/string/i386/memset.c b/libc/string/i386/memset.c
index bbaa45215..cfc16983c 100644
--- a/libc/string/i386/memset.c
+++ b/libc/string/i386/memset.c
@@ -33,6 +33,7 @@
#include <string.h>
/* Experimentally off - libc_hidden_proto(memset) */
+#undef memset
void *memset(void *s, int c, size_t count)
{
int d0, d1;
diff --git a/libc/string/i386/strcpy.c b/libc/string/i386/strcpy.c
index 09065a9b7..fff1bd006 100644
--- a/libc/string/i386/strcpy.c
+++ b/libc/string/i386/strcpy.c
@@ -32,7 +32,7 @@
#include <string.h>
-/* Experimentally off - libc_hidden_proto(strcpy) */
+#undef strcpy
char *strcpy(char * dest, const char * src)
{
int d0, d1, d2;
diff --git a/libc/string/i386/strlen.c b/libc/string/i386/strlen.c
index 61a178393..761d27aae 100644
--- a/libc/string/i386/strlen.c
+++ b/libc/string/i386/strlen.c
@@ -32,7 +32,7 @@
#include <string.h>
-/* Experimentally off - libc_hidden_proto(strlen) */
+#undef strlen
size_t strlen(const char *s)
{
int d0;
diff --git a/libc/string/memchr.c b/libc/string/memchr.c
index 5e60f6554..438f4fa4a 100644
--- a/libc/string/memchr.c
+++ b/libc/string/memchr.c
@@ -10,6 +10,7 @@
#ifdef WANT_WIDE
# define Wmemchr wmemchr
#else
+# undef memchr
# define Wmemchr memchr
#endif
diff --git a/libc/string/mempcpy.c b/libc/string/mempcpy.c
index e7605146a..d79bd1937 100644
--- a/libc/string/mempcpy.c
+++ b/libc/string/mempcpy.c
@@ -12,6 +12,7 @@
#ifdef WANT_WIDE
# define Wmempcpy wmempcpy
#else
+# undef mempcpy
# define Wmempcpy mempcpy
#endif
diff --git a/libc/string/stpcpy.c b/libc/string/stpcpy.c
index 8a487584e..58ace8fc7 100644
--- a/libc/string/stpcpy.c
+++ b/libc/string/stpcpy.c
@@ -10,7 +10,7 @@
#ifdef WANT_WIDE
# define Wstpcpy wcpcpy
#else
-/* Experimentally off - libc_hidden_proto(stpcpy) */
+# undef stpcpy
# define Wstpcpy stpcpy
#endif