]> granicus.if.org Git - php/commitdiff
Fixed bug #36568 (memory_limit setting on win32 has no effect)
authorDmitry Stogov <dmitry@php.net>
Tue, 14 Mar 2006 14:19:19 +0000 (14:19 +0000)
committerDmitry Stogov <dmitry@php.net>
Tue, 14 Mar 2006 14:19:19 +0000 (14:19 +0000)
Zend/tests/bug36568.phpt [new file with mode: 0755]
Zend/zend.h
Zend/zend_config.w32.h
win32/build/config.w32.h.in

diff --git a/Zend/tests/bug36568.phpt b/Zend/tests/bug36568.phpt
new file mode 100755 (executable)
index 0000000..d621491
--- /dev/null
@@ -0,0 +1,15 @@
+--TEST--
+Bug #36568 (memory_limit has no effect)
+--SKIPIF--
+<?php 
+       if (!function_exists('memory_get_usage')) die('skip PHP is configured without memory_limit');
+?>
+--INI--
+memory_limit=16M
+--FILE--
+<?php
+ini_set("memory_limit", "32M");
+echo ini_get("memory_limit");
+?>
+--EXPECT--
+32M
index 632449e78852de55eca7e654456fe923c90574ad..9c3aaa2ef4097d981bbb0c132854489cd20a5e55 100644 (file)
@@ -92,7 +92,7 @@ const char *zend_mh_bundle_error(void);
 
 #endif /* HAVE_MACH_O_DYLD_H */
 
-#if defined(HAVE_LIBDL) && !defined(HAVE_MACH_O_DYLD_H)
+#if defined(HAVE_LIBDL) && !defined(HAVE_MACH_O_DYLD_H) && !defined(ZEND_WIN32)
 
 # ifndef RTLD_LAZY
 #  define RTLD_LAZY 1    /* Solaris 1, FreeBSD's (2.1.7.1 and older) */
index d3f1ef158d3cc080e0d7b85430b44d3090570f0e..59a812c8361f80d093ed1dc796d36780b640843b 100644 (file)
@@ -23,8 +23,9 @@
 #define ZEND_CONFIG_W32_H
 
 #define USE_ZEND_ALLOC 1
-#define HAVE_ALLOCA 1
-#define HAVE_LIMITS_H 1
+
+#include <../main/config.w32.h>
+
 #define _CRTDBG_MAP_ALLOC
 
 #include <malloc.h>
 typedef unsigned long ulong;
 typedef unsigned int uint;
 
-#undef HAVE_KILL
-#define HAVE_GETPID 1
-/* #define HAVE_ALLOCA_H 1 */
-#define HAVE_MEMCPY 1
-#define HAVE_STRDUP 1
-#define HAVE_SYS_TYPES_H 1
 #define HAVE_STDIOSTR_H 1
 #define HAVE_CLASS_ISTDIOSTREAM
 #define istdiostream stdiostream
-#define HAVE_STDARG_H  1
-#define HAVE_SNPRINTF  1
-#define HAVE_VSNPRINTF 1
-#define HAVE_STRCOLL   1
 
 #define snprintf _snprintf
 #define vsnprintf _vsnprintf
index 508a0b9780915b37d0ff5f74f31f9e6c8e1e9474..512afe9177678e69b557db62ab6dbaf6d474777a 100644 (file)
 #undef HAVE_SYS_WAIT_H
 #define HAVE_SYSLOG_H 1
 #undef HAVE_UNISTD_H
-#define HAVE_LIBDL 1
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_STDARG_H 1
+#undef HAVE_ALLOCA_H
+#undef HAVE_KILL
+#define HAVE_GETPID 1
 #define HAVE_LIBM 1
 #define HAVE_CUSERID 0
 #undef HAVE_RINT
 #undef HAVE_ATOF_ACCEPTS_NAN
 #undef HAVE_ATOF_ACCEPTS_INF
 #define HAVE_HUGE_VAL_NAN 1
+
+/* vs.net 2005 has a 64-bit time_t.  This will likely break
+ * 3rdParty libs that were built with older compilers; switch
+ * back to 32-bit */
+#define _USE_32BIT_TIME_T 1
+#define HAVE_STDLIB_H 1
+