From 3693ee3e722ac89fd4f01dbcf3ece7fc909b3799 Mon Sep 17 00:00:00 2001 From: vda Date: Mon, 18 Dec 2006 22:32:45 +0000 Subject: xfuncs.c: dietlibc actually HAS fdprintf! platform.h: define strchrnul for dietlibc ash: stop using few non-standard functions git-svn-id: svn://busybox.net/trunk/busybox@16998 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- include/platform.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/platform.h b/include/platform.h index 860143f7f..1cc978288 100644 --- a/include/platform.h +++ b/include/platform.h @@ -193,9 +193,18 @@ typedef unsigned long long int uintmax_t; /* Platforms that haven't got dprintf need to implement fdprintf() in * libbb. This would require a platform.c. It's not going to be cleaned * out of the tree, so stop saying it should be. */ +#if !defined(__dietlibc__) +/* Needed for: glibc */ +/* Not needed for: dietlibc */ +/* Others: ?? (add as needed) */ #define fdprintf dprintf -#ifdef __dietlibc__ -int dprintf(int fd, const char *format, ...); +#endif + +#if defined(__dietlibc__) +static ATTRIBUTE_ALWAYS_INLINE char* strchrnul(const char *s, char c) { + while (*s && *s != c) ++s; + return (char*)s; +} #endif /* Don't use lchown with glibc older than 2.1.x ... uC-libc lacks it */ -- cgit v1.2.3-55-g6feb