]> granicus.if.org Git - php/commitdiff
Remove tsrm_config_common.h
authorPeter Kokot <peterkokot@gmail.com>
Fri, 12 Jul 2019 00:57:52 +0000 (02:57 +0200)
committerPeter Kokot <peterkokot@gmail.com>
Fri, 12 Jul 2019 23:58:01 +0000 (01:58 +0200)
- 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

TSRM/tsrm_config_common.h [deleted file]
Zend/zend_language_scanner.l
Zend/zend_virtual_cwd.h

diff --git a/TSRM/tsrm_config_common.h b/TSRM/tsrm_config_common.h
deleted file mode 100644 (file)
index 90c2ea4..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-#ifndef TSRM_CONFIG_COMMON_H
-#define TSRM_CONFIG_COMMON_H
-
-#ifndef __CYGWIN__
-# ifdef _WIN32
-#  define TSRM_WIN32
-# endif
-#endif
-
-#ifdef TSRM_WIN32
-# include "Zend/zend_config.w32.h"
-#else
-# include "main/php_config.h"
-# include <sys/param.h>
-#endif
-
-#if HAVE_ALLOCA_H && !defined(_ALLOCA_H)
-#  include <alloca.h>
-#endif
-
-/* AIX requires this to be the first thing in the file.  */
-#ifndef __GNUC__
-# ifndef HAVE_ALLOCA_H
-#  ifdef _AIX
-#pragma alloca
-#  else
-#   ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
-#   endif
-#  endif
-# endif
-#endif
-
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include <limits.h>
-
-#ifndef MAXPATHLEN
-# if _WIN32
-#  include "win32/ioutil.h"
-#  define MAXPATHLEN PHP_WIN32_IOUTIL_MAXPATHLEN
-# elif PATH_MAX
-#  define MAXPATHLEN PATH_MAX
-# elif defined(MAX_PATH)
-#  define MAXPATHLEN MAX_PATH
-# else
-#  define MAXPATHLEN 256
-# endif
-#endif
-
-#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2))
-# define TSRM_ALLOCA_MAX_SIZE 4096
-# define TSRM_ALLOCA_FLAG(name) \
-       int name;
-# define tsrm_do_alloca_ex(size, limit, use_heap) \
-       ((use_heap = ((size) > (limit))) ? malloc(size) : alloca(size))
-# define tsrm_do_alloca(size, use_heap) \
-       tsrm_do_alloca_ex(size, TSRM_ALLOCA_MAX_SIZE, use_heap)
-# define tsrm_free_alloca(p, use_heap) \
-       do { if (use_heap) free(p); } while (0)
-#else
-# define TSRM_ALLOCA_FLAG(name)
-# define tsrm_do_alloca(p, use_heap)   malloc(p)
-# define tsrm_free_alloca(p, use_heap) free(p)
-#endif
-
-#endif /* TSRM_CONFIG_COMMON_H */
index e6fbc3fdc60af7610691709aa9263273e2c2c684..ee00fb22216c066fa19eed010dff84bcb2533414 100644 (file)
@@ -46,7 +46,6 @@
 #include "zend_strtod.h"
 #include "zend_exceptions.h"
 #include "zend_virtual_cwd.h"
-#include "tsrm_config_common.h"
 
 #define YYCTYPE   unsigned char
 #define YYFILL(n) { if ((YYCURSOR + n) >= (YYLIMIT + ZEND_MMAP_AHEAD)) { return 0; } }
index a8cdcdc6f50645037c91c2f4fc30a0d1e36cc01b..574bee992bd0b4aefc309a47c9c426149cf2d85a 100644 (file)
@@ -22,7 +22,6 @@
 #define VIRTUAL_CWD_H
 
 #include "TSRM.h"
-#include "tsrm_config_common.h"
 
 #include <sys/types.h>
 #include <sys/stat.h>
 #endif
 
 #include <stdarg.h>
+#include <limits.h>
+
+#if HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+
+#ifndef MAXPATHLEN
+# if _WIN32
+#  include "win32/ioutil.h"
+#  define MAXPATHLEN PHP_WIN32_IOUTIL_MAXPATHLEN
+# elif PATH_MAX
+#  define MAXPATHLEN PATH_MAX
+# elif defined(MAX_PATH)
+#  define MAXPATHLEN MAX_PATH
+# else
+#  define MAXPATHLEN 256
+# endif
+#endif
 
 #ifdef ZTS
 #define VIRTUAL_DIR