1
0
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:
Christoph M. Becker
2024-09-27 17:34:54 +02:00
committed by GitHub
parent 2bc3df8196
commit 825509ee9e
4 changed files with 0 additions and 25 deletions

View File

@@ -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

View File

@@ -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 */

View File

@@ -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);

View File

@@ -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