summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Sutcliffe <ir0nh34d@users.sourceforge.net>2008-05-15 23:27:29 +0000
committerChris Sutcliffe <ir0nh34d@users.sourceforge.net>2008-05-15 23:27:29 +0000
commit262059a0d8e5b3443657f94410b2f2518f345e92 (patch)
tree20acb6d2f10b13ea1602cc0da3d95d0e30ae2e92
parentb61251603a545d205a3776bedf9eb126f9c7efb6 (diff)
downloadcygnal-262059a0d8e5b3443657f94410b2f2518f345e92.tar.gz
cygnal-262059a0d8e5b3443657f94410b2f2518f345e92.tar.bz2
cygnal-262059a0d8e5b3443657f94410b2f2518f345e92.zip
2008-05-15 Ramiro Polla <ramiro@lisha.ufsc.br>
* include/stdlib.h: Fix strtod under C++.
-rw-r--r--winsup/mingw/ChangeLog4
-rw-r--r--winsup/mingw/include/stdlib.h8
2 files changed, 11 insertions, 1 deletions
diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog
index 25ce0db75..a45b1e850 100644
--- a/winsup/mingw/ChangeLog
+++ b/winsup/mingw/ChangeLog
@@ -1,3 +1,7 @@
+2008-05-15 Ramiro Polla <ramiro@lisha.ufsc.br>
+
+ * include/stdlib.h: Fix strtod under C++.
+
2008-05-06 Ramiro Polla <ramiro@lisha.ufsc.br>
* mingwex/gdtoa/strtodnrp.c: Remove alias from strtod to __strtod.
diff --git a/winsup/mingw/include/stdlib.h b/winsup/mingw/include/stdlib.h
index 693185c07..07f6de535 100644
--- a/winsup/mingw/include/stdlib.h
+++ b/winsup/mingw/include/stdlib.h
@@ -309,7 +309,13 @@ _CRTIMP long __cdecl __MINGW_NOTHROW _wtol (const wchar_t *);
#endif
#if !defined __NO_ISOCEXT /* in libmingwex.a */
double __cdecl __MINGW_NOTHROW __strtod (const char*, char**);
-#define strtod __strtod
+#ifdef __cplusplus
+/* We require a function with external linkage. */
+#else
+static
+#endif /* Not __cplusplus */
+inline double __cdecl __MINGW_NOTHROW strtod (const char* __restrict__ __nptr, char** __restrict__ __endptr)
+{ return __strtod(__nptr, __endptr); }
float __cdecl __MINGW_NOTHROW strtof (const char * __restrict__, char ** __restrict__);
long double __cdecl __MINGW_NOTHROW strtold (const char * __restrict__, char ** __restrict__);
#else