mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Drop superfluous LONG_MAX/LONG_MIN fallback definitions (GH-15667)
Both macros are supposed to be defined in limits.h (C99) and as such it is superfluous to provide fallback definitions. Even worse, because these fallback definitions didn't cater to LP64, ILP64 and SILP64 data models (and maybe some rather uncommon ones), but just assumed ILP32, they are confusing.
This commit is contained in:
committed by
GitHub
parent
2bc3df8196
commit
825509ee9e
@@ -444,14 +444,6 @@ char *alloca();
|
||||
# define ZTS_V 0
|
||||
#endif
|
||||
|
||||
#ifndef LONG_MAX
|
||||
# define LONG_MAX 2147483647L
|
||||
#endif
|
||||
|
||||
#ifndef LONG_MIN
|
||||
# define LONG_MIN (- LONG_MAX - 1)
|
||||
#endif
|
||||
|
||||
#define MAX_LENGTH_OF_DOUBLE 32
|
||||
|
||||
#undef MIN
|
||||
|
||||
@@ -292,10 +292,6 @@ static double private_mem[PRIVATE_mem], *pmem_next = private_mem;
|
||||
#define DBL_MAX 1.7014118346046923e+38
|
||||
#endif
|
||||
|
||||
#ifndef LONG_MAX
|
||||
#define LONG_MAX 2147483647
|
||||
#endif
|
||||
|
||||
#else /* ifndef Bad_float_h */
|
||||
#include "float.h"
|
||||
#endif /* Bad_float_h */
|
||||
|
||||
@@ -74,11 +74,6 @@ typedef struct bc_struct {
|
||||
#define MAX(a, b) ((a)>(b)?(a):(b))
|
||||
#define MIN(a, b) ((a)>(b)?(b):(a))
|
||||
|
||||
#ifndef LONG_MAX
|
||||
#define LONG_MAX 0x7fffffff
|
||||
#endif
|
||||
|
||||
|
||||
/* Function Prototypes */
|
||||
|
||||
void bc_init_numbers(void);
|
||||
|
||||
@@ -225,14 +225,6 @@ typedef unsigned int socklen_t;
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#ifndef LONG_MAX
|
||||
#define LONG_MAX 2147483647L
|
||||
#endif
|
||||
|
||||
#ifndef LONG_MIN
|
||||
#define LONG_MIN (- LONG_MAX - 1)
|
||||
#endif
|
||||
|
||||
#ifndef INT_MAX
|
||||
#define INT_MAX 2147483647
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user