From 24d7fc2bbc667d0c9de0a62b60b70ad98b1abca5 Mon Sep 17 00:00:00 2001 From: Andrea Faulds Date: Fri, 1 Aug 2014 14:29:50 +0100 Subject: Added PHP_INT_MIN --- main/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/main/main.c b/main/main.c index 671700887a..896995b9f8 100644 --- a/main/main.c +++ b/main/main.c @@ -2195,6 +2195,7 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod REGISTER_MAIN_STRINGL_CONSTANT("PHP_EOL", PHP_EOL, sizeof(PHP_EOL)-1, CONST_PERSISTENT | CONST_CS); REGISTER_MAIN_LONG_CONSTANT("PHP_MAXPATHLEN", MAXPATHLEN, CONST_PERSISTENT | CONST_CS); REGISTER_MAIN_LONG_CONSTANT("PHP_INT_MAX", LONG_MAX, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_LONG_CONSTANT("PHP_INT_MIN", LONG_MIN, CONST_PERSISTENT | CONST_CS); REGISTER_MAIN_LONG_CONSTANT("PHP_INT_SIZE", sizeof(long), CONST_PERSISTENT | CONST_CS); #ifdef PHP_WIN32 -- cgit v1.2.1 From d6cf8be094c55a9080122a7e29c144bc5edaf117 Mon Sep 17 00:00:00 2001 From: Andrea Faulds Date: Fri, 1 Aug 2014 16:28:20 +0100 Subject: NEWS and UPGRADING --- NEWS | 3 +++ UPGRADING | 2 ++ 2 files changed, 5 insertions(+) diff --git a/NEWS b/NEWS index 1badfb8579..c19097337a 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,9 @@ PHP NEWS (Adam) . Update the MIME type list from the one shipped by Apache HTTPD. (Adam) +- Core: + . Added PHP_INT_MIN constant. (Andrea) + - DBA: . Fixed bug #62490 (dba_delete returns true on missing item (inifile)). (Mike) diff --git a/UPGRADING b/UPGRADING index 740047a86a..730fa5bd87 100644 --- a/UPGRADING +++ b/UPGRADING @@ -68,6 +68,8 @@ PHP X.Y UPGRADE NOTES 10. New Global Constants ======================================== +- Core + , PHP_INT_MIN added. ======================================== 11. Changes to INI File Handling -- cgit v1.2.1 From fe894c2154e6b013f0d0b29ca660ad719fd1affe Mon Sep 17 00:00:00 2001 From: Andrea Faulds Date: Fri, 1 Aug 2014 17:01:17 +0100 Subject: PHP_INT_MIN and _MAX tests --- tests/lang/constants/PHP_INT_32bit.phpt | 17 +++++++++++++++++ tests/lang/constants/PHP_INT_64bit.phpt | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 tests/lang/constants/PHP_INT_32bit.phpt create mode 100644 tests/lang/constants/PHP_INT_64bit.phpt diff --git a/tests/lang/constants/PHP_INT_32bit.phpt b/tests/lang/constants/PHP_INT_32bit.phpt new file mode 100644 index 0000000000..0c85d9719b --- /dev/null +++ b/tests/lang/constants/PHP_INT_32bit.phpt @@ -0,0 +1,17 @@ +--TEST-- +Test PHP_INT_MIN, PHP_INT_MAX and PHP_INT_SIZE (32-bit) +--SKIPIF-- + +--FILE-- + +--EXPECT-- +int(-2147483648) +int(2147483647) +int(4) \ No newline at end of file diff --git a/tests/lang/constants/PHP_INT_64bit.phpt b/tests/lang/constants/PHP_INT_64bit.phpt new file mode 100644 index 0000000000..4b7da3a3e9 --- /dev/null +++ b/tests/lang/constants/PHP_INT_64bit.phpt @@ -0,0 +1,17 @@ +--TEST-- +Test PHP_INT_MIN, PHP_INT_MAX and PHP_INT_SIZE (64-bit) +--SKIPIF-- + +--FILE-- + +--EXPECT-- +int(-9223372036854775808) +int(9223372036854775807) +int(8) \ No newline at end of file -- cgit v1.2.1 From 513d48f2efb03950b81d76e4cddcc1075868bb0f Mon Sep 17 00:00:00 2001 From: Christian Wenz Date: Fri, 1 Aug 2014 22:38:18 +0200 Subject: Patches #67739 Fixes #67739: Windows 8.1/Server 2012 R2 OS build number reported as 6.2 (instead of 6.3) --- ext/standard/info.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ext/standard/info.c b/ext/standard/info.c index 12e36b4f15..0d06037f81 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -592,6 +592,14 @@ PHPAPI char *php_get_uname(char mode) php_get_windows_cpu(wincpu, sizeof(wincpu)); dwBuild = (DWORD)(HIWORD(dwVersion)); + + /* Windows "version" 6.2 could be Windows 8/Windows Server 2012, but also Windows 8.1/Windows Server 2012 R2 */ + if (dwWindowsMajorVersion == 6 && dwWindowsMinorVersion == 2) { + if (strncmp(winver, "Windows 8.1", 11) == 0 || strncmp(winver, "Windows Server 2012 R2", 22) == 0) { + dwWindowsMinorVersion = 3; + } + } + snprintf(tmp_uname, sizeof(tmp_uname), "%s %s %d.%d build %d (%s) %s", "Windows NT", ComputerName, dwWindowsMajorVersion, dwWindowsMinorVersion, dwBuild, winver?winver:"unknown", wincpu); -- cgit v1.2.1