summaryrefslogtreecommitdiff
path: root/libbb/xfuncs.c
diff options
context:
space:
mode:
author"Vladimir N. Oleynik"2006-02-20 12:15:10 +0000
committer"Vladimir N. Oleynik"2006-02-20 12:15:10 +0000
commit0c6ff43a0cfa48e196954010787f5335f1a17ad7 (patch)
treeca8593fa25b77f98472bdcdee3781623917cd531 /libbb/xfuncs.c
parentd24d0830616dc6c040caec3466786b6d7120b7b9 (diff)
downloadbusybox-0c6ff43a0cfa48e196954010787f5335f1a17ad7.zip
busybox-0c6ff43a0cfa48e196954010787f5335f1a17ad7.tar.gz
remove #undef strlen, use #define strlen always but without xfunc/BB_STRLEN_IMPLEMENTATION
Diffstat (limited to 'libbb/xfuncs.c')
-rw-r--r--libbb/xfuncs.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c
index 69eaf79..6d54c1a 100644
--- a/libbb/xfuncs.c
+++ b/libbb/xfuncs.c
@@ -14,6 +14,13 @@
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
+
+/* Since gcc always inlines strlen(), this saves a byte or two, but we need
+ * the #undef here to avoid endless loop from #define strlen bb_strlen */
+#ifdef L_strlen
+#define BB_STRLEN_IMPLEMENTATION
+#endif
+
#include "libbb.h"
@@ -167,9 +174,6 @@ extern void bb_xfflush_stdout(void)
#endif
#ifdef L_strlen
-/* Since gcc always inlines strlen(), this saves a byte or two, but we need
- * the #undef here to avoid endless loop from #define strlen bb_strlen */
-#undef strlen
size_t bb_strlen(const char *string)
{
return(strlen(string));