*** ./sapi/fpm/fpm/fpm_conf.h.ORIG Sat Jan 16 12:26:09 2016 --- ./sapi/fpm/fpm/fpm_conf.h Sat Jan 16 12:26:32 2016 *************** *** 5,11 **** --- 5,15 ---- #ifndef FPM_CONF_H #define FPM_CONF_H 1 + #if defined(_AIX) && !defined(_AIX52) + #include + #else #include + #endif #include "php.h" #define PM2STR(a) (a == PM_STYLE_STATIC ? "static" : (a == PM_STYLE_DYNAMIC ? "dynamic" : "ondemand")) *** ./sapi/fpm/fpm/fpm_atomic.h.ORIG Sat Jan 16 12:28:05 2016 --- ./sapi/fpm/fpm/fpm_atomic.h Sat Jan 16 12:29:09 2016 *************** *** 137,142 **** --- 137,181 ---- #error Sparc v8 and predecessors are not and will not be supported (see bug report 53310) #endif /* #if (__sparcv9 || __sparcv9__) */ + #elif ( _AIX ) + + #if (__64BIT__) + + typedef int64_t atomic_int_t; + typedef uint64_t atomic_uint_t; + typedef volatile atomic_uint_t atomic_t; + + #else + + typedef int32_t atomic_int_t; + typedef uint32_t atomic_uint_t; + typedef volatile atomic_uint_t atomic_t; + + #endif + + static inline atomic_uint_t + atomic_cmp_set( atomic_t *lock, atomic_uint_t old, atomic_uint_t set ) + { + if (*lock == old) + { + *lock = set; + return 1; + } + + return 0; + } + + static inline atomic_int_t + atomic_fetch_add( atomic_t *value, atomic_int_t add ) + { + atomic_int_t old; + + old = *value; + *value += add; + + return old; + } + #else #error Unsupported processor. Please open a bug report (bugs.php.net). *** ./sapi/fpm/fpm/fpm_children.c.ORIG Sat Jan 16 12:33:35 2016 --- ./sapi/fpm/fpm/fpm_children.c Sat Jan 16 12:33:57 2016 *************** *** 174,179 **** --- 174,184 ---- } /* }}} */ + /* AIX does not have WCOREDUMP */ + #ifdef _AIX + #define WCOREDUMP(x) 0 + #endif + void fpm_children_bury() /* {{{ */ { int status; *** ./sapi/fpm/fpm/fpm_env.c.ORIG Mon Dec 5 15:17:59 2016 --- ./sapi/fpm/fpm/fpm_env.c Mon Dec 5 15:19:59 2016 *************** *** 85,90 **** --- 85,105 ---- #endif #ifndef HAVE_UNSETENV + static char * nvmatch(char *s1, char *s2) /* {{{ */ + { + while(*s1 == *s2++) + { + if(*s1++ == '=') { + return s2; + } + } + if(*s1 == '\0' && *(s2-1) == '=') { + return s2; + } + return NULL; + } + /* }}} */ + void unsetenv(const char *name) /* {{{ */ { if(getenv(name) != NULL) { *************** *** 99,119 **** environ[del] = environ[ct-1]; environ[ct-1] = NULL; } - } - /* }}} */ - - static char * nvmatch(char *s1, char *s2) /* {{{ */ - { - while(*s1 == *s2++) - { - if(*s1++ == '=') { - return s2; - } - } - if(*s1 == '\0' && *(s2-1) == '=') { - return s2; - } - return NULL; } /* }}} */ #endif --- 114,119 ----