Skip to content

Commit 33994eb

Browse files
committed
Remove tsrm_config_common.h
- Checks and defines are not relevant for files that include it anymore - Some code is not used anymore - Defines are a bit duplicated in zend_portability.h and TSRM.h file - MAXPATHLEN defs moved to zend_virtual_cwd.h
1 parent a6fa097 commit 33994eb

File tree

3 files changed

+18
-71
lines changed

3 files changed

+18
-71
lines changed

TSRM/tsrm_config_common.h

Lines changed: 0 additions & 69 deletions
This file was deleted.

Zend/zend_language_scanner.l

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
#include "zend_strtod.h"
4747
#include "zend_exceptions.h"
4848
#include "zend_virtual_cwd.h"
49-
#include "tsrm_config_common.h"
5049

5150
#define YYCTYPE unsigned char
5251
#define YYFILL(n) { if ((YYCURSOR + n) >= (YYLIMIT + ZEND_MMAP_AHEAD)) { return 0; } }

Zend/zend_virtual_cwd.h

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#define VIRTUAL_CWD_H
2323

2424
#include "TSRM.h"
25-
#include "tsrm_config_common.h"
2625

2726
#include <sys/types.h>
2827
#include <sys/stat.h>
@@ -33,6 +32,24 @@
3332
#endif
3433

3534
#include <stdarg.h>
35+
#include <limits.h>
36+
37+
#if HAVE_SYS_PARAM_H
38+
# include <sys/param.h>
39+
#endif
40+
41+
#ifndef MAXPATHLEN
42+
# if _WIN32
43+
# include "win32/ioutil.h"
44+
# define MAXPATHLEN PHP_WIN32_IOUTIL_MAXPATHLEN
45+
# elif PATH_MAX
46+
# define MAXPATHLEN PATH_MAX
47+
# elif defined(MAX_PATH)
48+
# define MAXPATHLEN MAX_PATH
49+
# else
50+
# define MAXPATHLEN 256
51+
# endif
52+
#endif
3653

3754
#ifdef ZTS
3855
#define VIRTUAL_DIR

0 commit comments

Comments
 (0)