Change PHP_OS_FAMILY slightly

* PHP_OS_FAMILY is now a macro, to allow extensions to take advantage of it, it is defined in php.h
* Values are not upper-case-first, not always uppercase. Windows is no longer just "Win", if we want the short version for testing then PHP_OS is always WINNT anyway
This commit is contained in:
Kalle Sommer Nielsen 2017-02-22 12:31:06 +01:00
parent dbdb0819b2
commit f9959ee7c2
25 changed files with 41 additions and 44 deletions

View file

@ -41,6 +41,19 @@
#undef sprintf
#define sprintf php_sprintf
/* Operating system family defintion */
#ifdef PHP_WIN32
# define PHP_OS_FAMILY "Windows"
#elif defined(BSD) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
# define PHP_OS_FAMILY "BSD"
#elif defined(__APPLE__) || defined(__MACH__)
# define PHP_OS_FAMILY "OSX"
#elif defined(__sun__)
# define PHP_OS_FAMILY "Solaris"
#elif defined(__linux__)
# define PHP_OS_FAMILY "Unknown"
#endif
/* PHP's DEBUG value must match Zend's ZEND_DEBUG value */
#undef PHP_DEBUG
#define PHP_DEBUG ZEND_DEBUG