Skip to content

Commit 7473b86

Browse files
build/php.m4: remove test for integer types (#10304)
These are mandatory in C99, so it's a pointless waste of time to check for them. (Actually, the fixed-size integer types are not mandatory, but if they are really not available on some theoretical system, PHP's fallbacks won't work either, so nothing is gained from this check.)
1 parent ba091ab commit 7473b86

File tree

5 files changed

+4
-66
lines changed

5 files changed

+4
-66
lines changed

UPGRADING.INTERNALS

+4
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ PHP 8.3 INTERNALS UPGRADE NOTES
2626
break the build of third-party extensions which relied on this
2727
implementation detail. Those extensions may need to add the missing
2828
#include lines.
29+
* Since version 8, PHP requires a C99 compiler. Configure-time checks
30+
for C99 features have been removed and therefore macro definitions
31+
from php_config.h have disappeared. Do not use those feature
32+
macros.
2933

3034
========================
3135
2. Build system changes

Zend/zend_strtod_int.h

-16
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,6 @@
4444

4545
#include <inttypes.h>
4646

47-
#ifndef HAVE_INT32_T
48-
# if SIZEOF_INT == 4
49-
typedef int int32_t;
50-
# elif SIZEOF_LONG == 4
51-
typedef long int int32_t;
52-
# endif
53-
#endif
54-
55-
#ifndef HAVE_UINT32_T
56-
# if SIZEOF_INT == 4
57-
typedef unsigned int uint32_t;
58-
# elif SIZEOF_LONG == 4
59-
typedef unsigned long int uint32_t;
60-
# endif
61-
#endif
62-
6347
#ifdef USE_LOCALE
6448
#undef USE_LOCALE
6549
#endif

build/php.m4

-8
Original file line numberDiff line numberDiff line change
@@ -2443,14 +2443,6 @@ AC_DEFUN([PHP_CHECK_STDINT_TYPES], [
24432443
AC_CHECK_SIZEOF([long long])
24442444
AC_CHECK_SIZEOF([size_t])
24452445
AC_CHECK_SIZEOF([off_t])
2446-
AC_CHECK_TYPES([int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t, uint32_t, uint64_t], [], [
2447-
AC_MSG_ERROR([One of the intN_t or uintN_t types is not available])
2448-
], [
2449-
#include <stdint.h>
2450-
#if HAVE_SYS_TYPES_H
2451-
# include <sys/types.h>
2452-
#endif
2453-
])
24542446
])
24552447

24562448
dnl

ext/date/lib/timelib.h

-16
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,6 @@
3939
#include <limits.h>
4040
#include <inttypes.h>
4141

42-
# ifndef HAVE_INT32_T
43-
# if SIZEOF_INT == 4
44-
typedef int int32_t;
45-
# elif SIZEOF_LONG == 4
46-
typedef long int int32_t;
47-
# endif
48-
# endif
49-
50-
# ifndef HAVE_UINT32_T
51-
# if SIZEOF_INT == 4
52-
typedef unsigned int uint32_t;
53-
# elif SIZEOF_LONG == 4
54-
typedef unsigned long int uint32_t;
55-
# endif
56-
# endif
57-
5842
#ifdef _WIN32
5943
# if _MSC_VER >= 1600
6044
# include <stdint.h>

ext/mysqlnd/config-win.h

-26
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,6 @@ This file is public domain and comes with NO WARRANTY of any kind */
1515

1616
#include <stdint.h>
1717

18-
#ifndef HAVE_INT8_T
19-
#define HAVE_INT8_T
20-
#endif
21-
#ifndef HAVE_UINT8_T
22-
#define HAVE_UINT8_T
23-
#endif
24-
#ifndef HAVE_INT16_T
25-
#define HAVE_INT16_T
26-
#endif
27-
#ifndef HAVE_UINT16_T
28-
#define HAVE_UINT16_T
29-
#endif
30-
#ifndef HAVE_INT32_T
31-
#define HAVE_INT32_T
32-
#endif
33-
#ifndef HAVE_UINT32_T
34-
#define HAVE_UINT32_T
35-
#endif
36-
#ifndef HAVE_INT64_T
37-
#define HAVE_INT64_T
38-
#endif
39-
#ifndef HAVE_UINT64_T
40-
#define HAVE_UINT64_T
41-
#endif
42-
43-
4418
#ifndef _WIN64
4519
#ifndef _WIN32
4620
#define _WIN32 /* Compatible with old source */

0 commit comments

Comments
 (0)