summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TSRM/TSRM.c1
-rw-r--r--TSRM/TSRM.h1
-rw-r--r--TSRM/tsrm_config.w32.h5
-rw-r--r--TSRM/tsrm_config_common.h4
-rw-r--r--TSRM/tsrm_win32.c2
-rw-r--r--TSRM/tsrm_win32.h4
-rw-r--r--Zend/zend_alloc.c3
-rw-r--r--Zend/zend_config.w32.h11
-rw-r--r--Zend/zend_hash.c6
-rw-r--r--Zend/zend_ini.c3
-rw-r--r--Zend/zend_llist.h2
-rw-r--r--Zend/zend_mm.c2
-rw-r--r--Zend/zend_operators.c7
-rw-r--r--Zend/zend_static_allocator.c2
14 files changed, 14 insertions, 39 deletions
diff --git a/TSRM/TSRM.c b/TSRM/TSRM.c
index 6af686b035..f391a8c40b 100644
--- a/TSRM/TSRM.c
+++ b/TSRM/TSRM.c
@@ -15,7 +15,6 @@
#ifdef ZTS
#include <stdio.h>
-#include <stdlib.h>
#if HAVE_STDARG_H
#include <stdarg.h>
diff --git a/TSRM/TSRM.h b/TSRM/TSRM.h
index fb8b4347f9..d13a4fd1cf 100644
--- a/TSRM/TSRM.h
+++ b/TSRM/TSRM.h
@@ -20,6 +20,7 @@
#ifdef WIN32
# define TSRM_WIN32
+# include "tsrm_config.w32.h"
#endif
#ifdef TSRM_WIN32
diff --git a/TSRM/tsrm_config.w32.h b/TSRM/tsrm_config.w32.h
index 405d8c7c8f..712b714ae7 100644
--- a/TSRM/tsrm_config.w32.h
+++ b/TSRM/tsrm_config.w32.h
@@ -3,6 +3,11 @@
#define HAVE_UTIME 1
#define HAVE_ALLOCA 1
+#define _CRTDBG_MAP_ALLOC
+
+#include <malloc.h>
+#include <stdlib.h>
+#include <crtdbg.h>
#undef inline
#ifdef ZEND_WIN32_FORCE_INLINE
diff --git a/TSRM/tsrm_config_common.h b/TSRM/tsrm_config_common.h
index 6c220fa008..7ba86e70ad 100644
--- a/TSRM/tsrm_config_common.h
+++ b/TSRM/tsrm_config_common.h
@@ -14,10 +14,6 @@
# include <sys/param.h>
#endif
-#ifdef TSRM_WIN32
-#include <malloc.h>
-#endif
-
/* AIX requires this to be the first thing in the file. */
#ifndef __GNUC__
# if HAVE_ALLOCA_H
diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c
index 09999af69e..691443a243 100644
--- a/TSRM/tsrm_win32.c
+++ b/TSRM/tsrm_win32.c
@@ -18,7 +18,6 @@
/* $Id$ */
-#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <io.h>
@@ -28,7 +27,6 @@
#include "TSRM.h"
#ifdef TSRM_WIN32
-#include <windows.h>
#include "tsrm_win32.h"
#ifdef ZTS
diff --git a/TSRM/tsrm_win32.h b/TSRM/tsrm_win32.h
index 7931beafc4..5e6ec7ece7 100644
--- a/TSRM/tsrm_win32.h
+++ b/TSRM/tsrm_win32.h
@@ -22,8 +22,6 @@
#define TSRM_WIN32_H
#include "TSRM.h"
-
-#ifdef TSRM_WIN32
#include <windows.h>
struct ipc_perm {
@@ -73,8 +71,6 @@ typedef struct {
# define TWG(v) (win32_globals.v)
#endif
-#endif
-
#define IPC_PRIVATE 0
#define IPC_CREAT 00001000
#define IPC_EXCL 00002000
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index c93317e75b..3c6b7f6596 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -17,9 +17,6 @@
+----------------------------------------------------------------------+
*/
-
-#include <stdlib.h>
-
#include "zend.h"
#include "zend_alloc.h"
#include "zend_globals.h"
diff --git a/Zend/zend_config.w32.h b/Zend/zend_config.w32.h
index e7c393d9e2..f13aa0684f 100644
--- a/Zend/zend_config.w32.h
+++ b/Zend/zend_config.w32.h
@@ -21,6 +21,13 @@
#ifndef ZEND_CONFIG_W32_H
#define ZEND_CONFIG_W32_H
+#define HAVE_ALLOCA 1
+#define HAVE_LIMITS_H 1
+#define _CRTDBG_MAP_ALLOC
+
+#include <malloc.h>
+#include <stdlib.h>
+#include <crtdbg.h>
#include <string.h>
#include <windows.h>
@@ -29,10 +36,6 @@
typedef unsigned long ulong;
typedef unsigned int uint;
-#define HAVE_ALLOCA 1
-#define HAVE_LIMITS_H 1
-#include <malloc.h>
-
#undef HAVE_KILL
#define HAVE_GETPID 1
/* #define HAVE_ALLOCA_H 1 */
diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c
index 77b4caa656..079069175b 100644
--- a/Zend/zend_hash.c
+++ b/Zend/zend_hash.c
@@ -20,12 +20,6 @@
#include "zend.h"
-#include <stdio.h>
-
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-
#define HANDLE_NUMERIC(key, length, func) { \
register char *tmp=key; \
\
diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c
index e15ab704c3..42e28379cc 100644
--- a/Zend/zend_ini.c
+++ b/Zend/zend_ini.c
@@ -16,9 +16,6 @@
+----------------------------------------------------------------------+
*/
-
-#include <stdlib.h>
-
#include "zend.h"
#include "zend_qsort.h"
#include "zend_API.h"
diff --git a/Zend/zend_llist.h b/Zend/zend_llist.h
index 075c9cd83f..6fddbb2d92 100644
--- a/Zend/zend_llist.h
+++ b/Zend/zend_llist.h
@@ -21,8 +21,6 @@
#ifndef ZEND_LLIST_H
#define ZEND_LLIST_H
-#include <stdlib.h>
-
typedef struct _zend_llist_element {
struct _zend_llist_element *next;
struct _zend_llist_element *prev;
diff --git a/Zend/zend_mm.c b/Zend/zend_mm.c
index 99bf05d771..22850aadf2 100644
--- a/Zend/zend_mm.c
+++ b/Zend/zend_mm.c
@@ -17,8 +17,6 @@
+----------------------------------------------------------------------+
*/
-#include <stdlib.h>
-#include <string.h>
#include "zend.h"
#include "zend_mm.h"
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index 1eae6c036a..2e8d79e522 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -17,13 +17,6 @@
+----------------------------------------------------------------------+
*/
-
-#include <stdio.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <math.h>
-
#include "zend.h"
#include "zend_operators.h"
#include "zend_variables.h"
diff --git a/Zend/zend_static_allocator.c b/Zend/zend_static_allocator.c
index afa0cc08bc..e7e7a3689c 100644
--- a/Zend/zend_static_allocator.c
+++ b/Zend/zend_static_allocator.c
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-#include <stdlib.h>
+//#include <stdlib.h>
#include "zend_static_allocator.h"