History

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.

Thomas Preud'homme committed 15 years ago

Commit 2dd3fb11 parent ab7ed481 file · +0 −12Browse files

Unified · Split

tcc.h+0−12
@@ -873,18 +873,6 @@ enum tcc_token { · 872 unmodified lines
873 #define strtof (float)strtod873 #define strtof (float)strtod
874 #define strtoll (long long)strtol874 #define strtoll (long long)strtol
875#endif875#endif
876#elif defined(TCC_UCLIBC) || defined(__FreeBSD__) \
877 || defined(__FreeBSD_kernel__) || defined(__DragonFly__) \
878 || defined(__OpenBSD__)
879/* currently incorrect */
880static inline long double strtold(const char *nptr, char **endptr)
881{
882 return (long double)strtod(nptr, endptr);
883}
884static inline float strtof(const char *nptr, char **endptr)
885{
886 return (float)strtod(nptr, endptr);
887}
888#else876#else
889/* XXX: need to define this to use them in non ISOC99 context */877/* XXX: need to define this to use them in non ISOC99 context */
890extern float strtof (const char *__nptr, char **__endptr);878extern float strtof (const char *__nptr, char **__endptr);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t