mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Use one place to define max length of double
Introduce new constant PHP_DOUBLE_MAX_LENGTH for that purpose
This commit is contained in:
parent
158b537c99
commit
3f13507dd2
5 changed files with 14 additions and 37 deletions
|
@ -231,6 +231,14 @@ char *strerror(int);
|
|||
#define INT_MIN (- INT_MAX - 1)
|
||||
#endif
|
||||
|
||||
/* double limits */
|
||||
#include <float.h>
|
||||
#if defined(DBL_MANT_DIG) && defined(DBL_MIN_EXP)
|
||||
#define PHP_DOUBLE_MAX_LENGTH (3 + DBL_MANT_DIG - DBL_MIN_EXP)
|
||||
#else
|
||||
#define PHP_DOUBLE_MAX_LENGTH 1080
|
||||
#endif
|
||||
|
||||
#define PHP_GCC_VERSION ZEND_GCC_VERSION
|
||||
#define PHP_ATTRIBUTE_MALLOC ZEND_ATTRIBUTE_MALLOC
|
||||
#define PHP_ATTRIBUTE_FORMAT ZEND_ATTRIBUTE_FORMAT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue