From 2dd3fb103e9fc9aa71e08b95fe1656ba0148307d Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme <thomas.preudhomme@celest.fr> Date: Fri, 15 Jul 2011 18:13:56 +0200 Subject: [PATCH] Don't define strtold and strtof on *BSD + uClibc Don't define strtold and strtof on *BSD and uClibc as they are already defined there since: * 2001 (FreeBSD 4.4) * 2009 (OpenBSD 4.5) * 2009 (DragonFlyBSD) * 2002 (uClibc) See http://lists.nongnu.org/archive/html/tinycc-devel/2011-07/msg00025.html for a bit more details. --- tcc.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/tcc.h b/tcc.h index 39b0f670..d158829a 100644 --- a/tcc.h +++ b/tcc.h @@ -873,18 +873,6 @@ enum tcc_token { #define strtof (float)strtod #define strtoll (long long)strtol #endif -#elif defined(TCC_UCLIBC) || defined(__FreeBSD__) \ - || defined(__FreeBSD_kernel__) || defined(__DragonFly__) \ - || defined(__OpenBSD__) -/* currently incorrect */ -static inline long double strtold(const char *nptr, char **endptr) -{ - return (long double)strtod(nptr, endptr); -} -static inline float strtof(const char *nptr, char **endptr) -{ - return (float)strtod(nptr, endptr); -} #else /* XXX: need to define this to use them in non ISOC99 context */ extern float strtof (const char *__nptr, char **__endptr);