--- /dev/null
+--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
#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) */
#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
#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
+