about summary refs log tree commit diff
path: root/string
diff options
context:
space:
mode:
Diffstat (limited to 'string')
-rw-r--r--string/Makefile8
-rw-r--r--string/string.h7
2 files changed, 11 insertions, 4 deletions
diff --git a/string/Makefile b/string/Makefile
index 3b895dce26..ac04557ddc 100644
--- a/string/Makefile
+++ b/string/Makefile
@@ -22,7 +22,7 @@
 subdir	:= string
 
 headers	:= string.h strings.h memory.h endian.h bits/endian.h \
-	   argz.h envz.h byteswap.h bits/byteswap.h
+	   argz.h envz.h byteswap.h bits/byteswap.h bits/string.h
 
 routines	:= strcat strchr strcmp strcoll strcpy strcspn		\
 		   strverscmp strdup strndup				\
@@ -48,9 +48,9 @@ distribute	:= memcopy.h pagecopy.h tst-svc.expect
 include ../Rules
 
 tester-ENV = LANGUAGE=C
-CFLAGS-tester.c = -fno-builtin
-CFLAGS-tst-strlen.c = -fno-builtin
-CFLAGS-stratcliff.c = -fno-builtin
+CFLAGS-tester.c = -fno-builtin -D__NO_STRING_INLINES
+CFLAGS-tst-strlen.c = -fno-builtin -D__NO_STRING_INLINES
+CFLAGS-stratcliff.c = -fno-builtin -D__NO_STRING_INLINES
 
 tests: $(objpfx)tst-svc.out
 	cmp tst-svc.expect $(objpfx)tst-svc.out
diff --git a/string/string.h b/string/string.h
index 5621dfb39a..a434c3ab81 100644
--- a/string/string.h
+++ b/string/string.h
@@ -282,6 +282,13 @@ extern __ptr_t memfrob __P ((__ptr_t __s, size_t __n));
 extern char *basename __P ((__const char *__filename));
 #endif
 
+
+/* Some functions might be implemented as optimized inline assembler
+   functions.  */
+#if !defined __NO_STRING_INLINES && defined __OPTIMIZE__
+# include <bits/string.h>
+#endif
+
 __END_DECLS
 
 #endif /* string.h  */