Skip to content

Commit 3afe4e3

Browse files
authored
Remove various useless #include (#22581)
This removes leftover win32/param.h / <sys/param.h> includes from files that do not use any of the macros provided by those headers (MAXPATHLEN, MAXHOSTNAMELEN, howmany, roundup). It also removes local Windows O_RDONLY -> _O_RDONLY aliases from files where O_RDONLY is not used.
1 parent ed56e07 commit 3afe4e3

6 files changed

Lines changed: 0 additions & 20 deletions

File tree

ext/ffi/ffi.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,9 @@
3434

3535
#ifdef HAVE_LIBDL
3636
#ifdef PHP_WIN32
37-
#include "win32/param.h"
3837
#include "win32/winutil.h"
3938
#define GET_DL_ERROR() php_win_err()
4039
#else
41-
#include <sys/param.h>
4240
#define GET_DL_ERROR() DL_ERROR()
4341
#endif
4442
#endif

ext/standard/ftp_fopen_wrapper.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@
3030

3131
#ifdef PHP_WIN32
3232
#include <winsock2.h>
33-
#define O_RDONLY _O_RDONLY
34-
#include "win32/param.h"
35-
#else
36-
#include <sys/param.h>
3733
#endif
3834

3935
#include "php_standard.h"

ext/standard/http_fopen_wrapper.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,6 @@
3333
#include <sys/stat.h>
3434
#include <fcntl.h>
3535

36-
#ifdef PHP_WIN32
37-
#define O_RDONLY _O_RDONLY
38-
#include "win32/param.h"
39-
#else
40-
#include <sys/param.h>
41-
#endif
42-
4336
#include "php_standard.h"
4437

4538
#ifdef HAVE_SYS_SOCKET_H

main/network.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@
2424
#ifdef PHP_WIN32
2525
# include <Ws2tcpip.h>
2626
# include "win32/winutil.h"
27-
# define O_RDONLY _O_RDONLY
28-
# include "win32/param.h"
29-
#else
30-
#include <sys/param.h>
3127
#endif
3228

3329
#include <sys/types.h>

main/php_scandir.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#ifndef HAVE_SCANDIR
2828

2929
#ifdef PHP_WIN32
30-
#include "win32/param.h"
3130
#include "win32/readdir.h"
3231
#endif
3332

sapi/phpdbg/phpdbg_prompt.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,9 @@ extern int phpdbg_startup_run;
4848

4949
#ifdef HAVE_LIBDL
5050
#ifdef PHP_WIN32
51-
#include "win32/param.h"
5251
#include "win32/winutil.h"
5352
#define GET_DL_ERROR() php_win_err()
5453
#else
55-
#include <sys/param.h>
5654
#define GET_DL_ERROR() DL_ERROR()
5755
#endif
5856
#endif

0 commit comments

Comments
 (0)