diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-07-12 13:18:18 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-07-12 13:18:18 +0200 |
commit | e2c3bc80e3ac49443cb1b5f2a601db6186459f7a (patch) | |
tree | 020520c49744693a72afa7422c68bdf93cb173cf /main/php.h | |
parent | 709897c2a574c8f946c12b90989a3ba464b535cf (diff) | |
download | php-git-e2c3bc80e3ac49443cb1b5f2a601db6186459f7a.tar.gz |
Remove duplicate XtOffsetOf() definitions in php.h
These are already defined in zend_portability.h.
Diffstat (limited to 'main/php.h')
-rw-r--r-- | main/php.h | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/main/php.h b/main/php.h index 480da6fb18..4bc054539c 100644 --- a/main/php.h +++ b/main/php.h @@ -448,39 +448,4 @@ END_EXTERN_C() #include "php_reentrancy.h" -/* Finding offsets of elements within structures. - * Taken from the Apache code, which in turn, was taken from X code... - */ - -#ifndef XtOffset -#if defined(CRAY) || (defined(__arm) && !(defined(LINUX) || defined(__riscos__))) -#ifdef __STDC__ -#define XtOffset(p_type, field) _Offsetof(p_type, field) -#else -#ifdef CRAY2 -#define XtOffset(p_type, field) \ - (sizeof(int)*((unsigned int)&(((p_type)NULL)->field))) - -#else /* !CRAY2 */ - -#define XtOffset(p_type, field) ((unsigned int)&(((p_type)NULL)->field)) - -#endif /* !CRAY2 */ -#endif /* __STDC__ */ -#else /* ! (CRAY || __arm) */ - -#define XtOffset(p_type, field) \ - ((zend_long) (((char *) (&(((p_type)NULL)->field))) - ((char *) NULL))) - -#endif /* !CRAY */ -#endif /* ! XtOffset */ - -#ifndef XtOffsetOf -#ifdef offsetof -#define XtOffsetOf(s_type, field) offsetof(s_type, field) -#else -#define XtOffsetOf(s_type, field) XtOffset(s_type*, field) -#endif -#endif /* !XtOffsetOf */ - #endif |