Skip to content

Commit e2c3bc8

Browse files
committed
Remove duplicate XtOffsetOf() definitions in php.h
These are already defined in zend_portability.h.
1 parent 709897c commit e2c3bc8

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

main/php.h

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -448,39 +448,4 @@ END_EXTERN_C()
448448

449449
#include "php_reentrancy.h"
450450

451-
/* Finding offsets of elements within structures.
452-
* Taken from the Apache code, which in turn, was taken from X code...
453-
*/
454-
455-
#ifndef XtOffset
456-
#if defined(CRAY) || (defined(__arm) && !(defined(LINUX) || defined(__riscos__)))
457-
#ifdef __STDC__
458-
#define XtOffset(p_type, field) _Offsetof(p_type, field)
459-
#else
460-
#ifdef CRAY2
461-
#define XtOffset(p_type, field) \
462-
(sizeof(int)*((unsigned int)&(((p_type)NULL)->field)))
463-
464-
#else /* !CRAY2 */
465-
466-
#define XtOffset(p_type, field) ((unsigned int)&(((p_type)NULL)->field))
467-
468-
#endif /* !CRAY2 */
469-
#endif /* __STDC__ */
470-
#else /* ! (CRAY || __arm) */
471-
472-
#define XtOffset(p_type, field) \
473-
((zend_long) (((char *) (&(((p_type)NULL)->field))) - ((char *) NULL)))
474-
475-
#endif /* !CRAY */
476-
#endif /* ! XtOffset */
477-
478-
#ifndef XtOffsetOf
479-
#ifdef offsetof
480-
#define XtOffsetOf(s_type, field) offsetof(s_type, field)
481-
#else
482-
#define XtOffsetOf(s_type, field) XtOffset(s_type*, field)
483-
#endif
484-
#endif /* !XtOffsetOf */
485-
486451
#endif

0 commit comments

Comments
 (0)