pajoye          Thu Jun  4 07:00:37 2009 UTC

  Modified files:              
    /php-src/main       main.c 
  Log:
  - [DOC] MF53: add PHP_WINDOWS_NT_* and PHP_WINDOWS_VERSION_* constants 
(usefull for testing and features detections)
     see http://msdn.microsoft.com/en-us/library/ms724451(VS.85).aspx for the 
explanation
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.800&r2=1.801&diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.800 php-src/main/main.c:1.801
--- php-src/main/main.c:1.800   Sat May 30 09:47:39 2009
+++ php-src/main/main.c Thu Jun  4 07:00:37 2009
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: main.c,v 1.800 2009/05/30 09:47:39 scottmac Exp $ */
+/* $Id: main.c,v 1.801 2009/06/04 07:00:37 pajoye Exp $ */
 
 /* {{{ includes
  */
@@ -1998,6 +1998,20 @@
        REGISTER_MAIN_LONG_CONSTANT("PHP_INT_MAX", LONG_MAX, CONST_PERSISTENT | 
CONST_CS);
        REGISTER_MAIN_LONG_CONSTANT("PHP_INT_SIZE", sizeof(long), 
CONST_PERSISTENT | CONST_CS);
 
+#ifdef PHP_WIN32
+       REGISTER_MAIN_LONG_CONSTANT("PHP_WINDOWS_VERSION_MAJOR",      
EG(windows_version_info).dwMajorVersion, CONST_PERSISTENT | CONST_CS);
+       REGISTER_MAIN_LONG_CONSTANT("PHP_WINDOWS_VERSION_MINOR",      
EG(windows_version_info).dwMinorVersion, CONST_PERSISTENT | CONST_CS);
+       REGISTER_MAIN_LONG_CONSTANT("PHP_WINDOWS_VERSION_BUILD",      
EG(windows_version_info).dwBuildNumber, CONST_PERSISTENT | CONST_CS);
+       REGISTER_MAIN_LONG_CONSTANT("PHP_WINDOWS_VERSION_PLATFORM",   
EG(windows_version_info).dwPlatformId, CONST_PERSISTENT | CONST_CS);
+       REGISTER_MAIN_LONG_CONSTANT("PHP_WINDOWS_VERSION_SP_MAJOR",   
EG(windows_version_info).wServicePackMajor, CONST_PERSISTENT | CONST_CS);
+       REGISTER_MAIN_LONG_CONSTANT("PHP_WINDOWS_VERSION_SP_MINOR",   
EG(windows_version_info).wServicePackMinor, CONST_PERSISTENT | CONST_CS);
+       REGISTER_MAIN_LONG_CONSTANT("PHP_WINDOWS_VERSION_SUITEMASK",  
EG(windows_version_info).wSuiteMask, CONST_PERSISTENT | CONST_CS);
+       REGISTER_MAIN_LONG_CONSTANT("PHP_WINDOWS_VERSION_PRODUCTYPE", 
EG(windows_version_info).wProductType, CONST_PERSISTENT | CONST_CS);
+       REGISTER_MAIN_LONG_CONSTANT("PHP_WINDOWS_NT_DOMAIN_CONTROLLER", 
VER_NT_DOMAIN_CONTROLLER, CONST_PERSISTENT | CONST_CS);
+       REGISTER_MAIN_LONG_CONSTANT("PHP_WINDOWS_NT_SERVER", VER_NT_SERVER, 
CONST_PERSISTENT | CONST_CS);
+       REGISTER_MAIN_LONG_CONSTANT("PHP_WINDOWS_NT_WORKSTATION", 
VER_NT_WORKSTATION, CONST_PERSISTENT | CONST_CS);
+#endif
+
        php_output_register_constants(TSRMLS_C);
        php_rfc1867_register_constants(TSRMLS_C);
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to