remove #undef strlen, use #define strlen always but without xfunc/BB_STRLEN_IMPLEMENTATION
This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)
No binary (build failed)
—
(log yok)
| @@ -387,7 +387,9 @@ void reset_ino_dev_hashtable(void); | |
| /* Stupid gcc always includes its own builtin strlen()... */ | |
| extern size_t bb_strlen(const char *string); | |
| + | #ifndef BB_STRLEN_IMPLEMENTATION |
| #define strlen(x) bb_strlen(x) | |
| + | #endif |
| char *bb_xasprintf(const char *format, ...) __attribute__ ((format (printf, 1, 2))); | |
| @@ -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)); | |