Stupid gcc always includes its own builtin strlen()...
authorEric Andersen <andersen@codepoet.org>
Sat, 13 Apr 2002 13:02:03 +0000 (13:02 -0000)
committerEric Andersen <andersen@codepoet.org>
Sat, 13 Apr 2002 13:02:03 +0000 (13:02 -0000)
include/libbb.h
libbb/xfuncs.c

index cf593d65ce58386c8974fa41645b9a42df4da136..40cff8b4b47dd6e0428bddce49da4fc136f7a13b 100644 (file)
@@ -293,4 +293,8 @@ int is_in_ino_dev_hashtable(const struct stat *statbuf, char **name);
 void add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name);
 void reset_ino_dev_hashtable(void);
 
+/* Stupid gcc always includes its own builtin strlen()... */
+extern size_t xstrlen(const char *string);
+#define strlen(x)   xstrlen(x)
+
 #endif /* __LIBCONFIG_H__ */
index 57c698079fd72231279c6fe6e39717373fdc1835..acd4d6985d2d1cdc05cc60c66d38d15f7bb35e53 100644 (file)
@@ -85,6 +85,12 @@ FILE *xfopen(const char *path, const char *mode)
        return fp;
 }
 
+/* Stupid gcc always includes its own builtin strlen()... */
+size_t xstrlen(const char *string)
+{
+           return(strlen(string));
+}
+
 /* END CODE */
 /*
 Local Variables: