mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
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:
parent
dbdb0819b2
commit
f9959ee7c2
25 changed files with 41 additions and 44 deletions
13
main/php.h
13
main/php.h
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue