aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/i386/i486/bits/string.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-05-17 17:25:32 +0000
committerUlrich Drepper <drepper@redhat.com>1999-05-17 17:25:32 +0000
commit9bbd7837b698c0bba325de00cd396c1e970ab281 (patch)
tree44023c4f36e4d1acf2d5107cd9ee2cd368f5d1ca /sysdeps/i386/i486/bits/string.h
parent431c33c0bc7cb43231da4364187e0161b0541071 (diff)
downloadglibc-9bbd7837b698c0bba325de00cd396c1e970ab281.tar
glibc-9bbd7837b698c0bba325de00cd396c1e970ab281.tar.gz
glibc-9bbd7837b698c0bba325de00cd396c1e970ab281.tar.bz2
glibc-9bbd7837b698c0bba325de00cd396c1e970ab281.zip
Update.
1999-05-17 Andreas Jaeger <aj@arthur.rhein-neckar.de> * sysdeps/i386/i486/Versions: New file with inline functions from sysdeps/i386/i486/bits/string.h for now. * sysdeps/i386/Versions: Add inline functions from sysdeps/i386/bits/string.h. * string/Versions: Add inline functions from <bits/string2.h>. * string/Makefile (routines): Add string-inlines. * string/string-inlines.c: New file, used for implementation of extern inline functions. * sysdeps/i386/i486/bits/string.h: Use _FORCE_INLINES to generate non inlined versions of functions. * string/bits/string2.h: Likewise. * sysdeps/i386/bits/string.h: Likewise. 1999-05-17 Ulrich Drepper <drepper@cygnus.com> * inet/arpa/tftp.h: Add second packed attribute.
Diffstat (limited to 'sysdeps/i386/i486/bits/string.h')
-rw-r--r--sysdeps/i386/i486/bits/string.h35
1 files changed, 23 insertions, 12 deletions
diff --git a/sysdeps/i386/i486/bits/string.h b/sysdeps/i386/i486/bits/string.h
index e726a340a1..5bf80f0398 100644
--- a/sysdeps/i386/i486/bits/string.h
+++ b/sysdeps/i386/i486/bits/string.h
@@ -30,10 +30,12 @@
#if !defined __NO_STRING_INLINES && defined __USE_STRING_INLINES \
&& defined __GNUC__ && __GNUC__ >= 2
-#ifdef __cplusplus
-# define __STRING_INLINE inline
-#else
-# define __STRING_INLINE extern __inline
+#ifndef __STRING_INLINE
+# ifdef __cplusplus
+# define __STRING_INLINE inline
+# else
+# define __STRING_INLINE extern __inline
+# endif
#endif
/* The macros are used in some of the optimized implementations below. */
@@ -133,7 +135,8 @@ __memcpy_g (void *__dest, __const void *__src, size_t __n)
return __dest;
}
-
+#define _HAVE_STRING_ARCH_memmove 1
+#ifndef _FORCE_INLINES
/* Copy N bytes of SRC to DEST, guaranteeing
correct behavior for overlapping strings. */
__STRING_INLINE void *
@@ -159,11 +162,12 @@ memmove (void *__dest, __const void *__src, size_t __n)
: "memory");
return __dest;
}
-
+#endif
/* Compare N bytes of S1 and S2. */
#define _HAVE_STRING_ARCH_memcmp 1
-#ifndef __PIC__
+#ifndef _FORCE_INLINES
+# ifndef __PIC__
/* gcc has problems to spill registers when using PIC. */
__STRING_INLINE int
memcmp (__const void *__s1, __const void *__s2, size_t __n)
@@ -183,9 +187,9 @@ memcmp (__const void *__s1, __const void *__s2, size_t __n)
: "cc");
return __res;
}
+# endif
#endif
-
/* Set N bytes of S to C. */
#define _HAVE_STRING_ARCH_memset 1
#define memset(s, c, n) \
@@ -390,6 +394,7 @@ __memset_gcn_by2 (void *__s, int __c, size_t __n)
/* Search N bytes of S for C. */
#define _HAVE_STRING_ARCH_memchr 1
+#ifndef _FORCE_INLINES
__STRING_INLINE void *
memchr (__const void *__s, int __c, size_t __n)
{
@@ -421,10 +426,13 @@ memchr (__const void *__s, int __c, size_t __n)
#endif
return __res - 1;
}
-
+#endif
/* Return pointer to C in S. */
#define _HAVE_STRING_ARCH_rawmemchr 1
+__STRING_INLINE void *__rawmemchr (const void *__s, int __c);
+
+#ifndef _FORCE_INLINES
__STRING_INLINE void *
__rawmemchr (const void *__s, int __c)
{
@@ -438,13 +446,14 @@ __rawmemchr (const void *__s, int __c)
: "cc");
return __res - 1;
}
-#ifdef __USE_GNU
+#if defined __USE_GNU && !defined _FORCE_INLINES
__STRING_INLINE void *
rawmemchr (const void *__s, int __c)
{
return __rawmemchr (__s, __c);
}
-#endif /* use GNU */
+# endif /* use GNU */
+#endif
/* Return the length of S. */
@@ -1817,6 +1826,8 @@ __strstr_g (__const char *__haystack, __const char *__needle)
# endif /* i686 */
#endif /* BSD || X/Open */
-#undef __STRING_INLINE
+#ifndef _FORCE_INLINES
+# undef __STRING_INLINE
+#endif
#endif /* use string inlines && GNU CC */