From: Edin Kadribasic Date: Thu, 4 Nov 2004 02:04:39 +0000 (+0000) Subject: Make zend_strtod compile on windows X-Git-Tag: RELEASE_0_2~737 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5675c50dc27a698bae6f4dfa9be30118e69b7dbd;p=php Make zend_strtod compile on windows --- diff --git a/Zend/zend_strtod.c b/Zend/zend_strtod.c index 4fe98f3ed9..9fbaf38838 100644 --- a/Zend/zend_strtod.c +++ b/Zend/zend_strtod.c @@ -89,6 +89,8 @@ * directly -- and assumed always to succeed. */ +#include + #if defined(LIBC_SCCS) && !defined(lint) static char *rcsid = "$OpenBSD: strtod.c,v 1.19 2004/02/03 16:52:11 drahn Exp $"; #endif /* LIBC_SCCS and not lint */ @@ -118,6 +120,12 @@ static char *rcsid = "$OpenBSD: strtod.c,v 1.19 2004/02/03 16:52:11 drahn Exp $" #define VAX #endif +#if defined(_MSC_VER) +#define int32_t __int32 +#define u_int32_t unsigned __int32 +#define IEEE_LITTLE_ENDIAN +#endif + #define Long int32_t #define ULong u_int32_t @@ -362,10 +370,6 @@ extern double rnd_prod(double, double), rnd_quot(double, double); #define Kmax 15 -#ifdef __cplusplus -extern "C" double zend_strtod(const char *s00, char **se); -#endif - struct Bigint { struct Bigint *next; @@ -1215,7 +1219,7 @@ static CONST double tinytens[] = { 1e-16, 1e-32 }; #endif #endif - double +ZEND_API double zend_strtod #ifdef KR_headers (s00, se) CONST char *s00; char **se; diff --git a/Zend/zend_strtod.h b/Zend/zend_strtod.h index 3c7820645e..2fbaceaedd 100644 --- a/Zend/zend_strtod.h +++ b/Zend/zend_strtod.h @@ -22,7 +22,10 @@ * can be found in zend_strtod.c */ #ifndef ZEND_STRTOD_H #define ZEND_STRTOD_H +#include -double zend_strtod(const char *s00, char **se); +BEGIN_EXTERN_C() +ZEND_API double zend_strtod(const char *s00, char **se); +END_EXTERN_C() #endif