summaryrefslogtreecommitdiff
path: root/main/php.h
diff options
context:
space:
mode:
authorSterling Hughes <sterling@php.net>2001-08-18 02:08:29 +0000
committerSterling Hughes <sterling@php.net>2001-08-18 02:08:29 +0000
commit15b1e4ba9c4d7ee231d9c17ced2d63d8a89ad1ce (patch)
treeee4e9180113638f02485421be9b80d91de12349b /main/php.h
parent244c9ff3c9e1430c9104bfce1f60d5d0943adf24 (diff)
downloadphp-git-15b1e4ba9c4d7ee231d9c17ced2d63d8a89ad1ce.tar.gz
Fix XtOffsetOf compile problems if someone has already defined it.
Diffstat (limited to 'main/php.h')
-rw-r--r--main/php.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/main/php.h b/main/php.h
index bab959ed9a..a637859944 100644
--- a/main/php.h
+++ b/main/php.h
@@ -315,6 +315,7 @@ PHPAPI int cfg_get_string(char *varname, char **result);
* Taken from the Apache code, which in turn, was taken from X code...
*/
+#ifndef XtOffset
#if defined(CRAY) || (defined(__arm) && !defined(LINUX))
#ifdef __STDC__
#define XtOffset(p_type, field) _Offsetof(p_type, field)
@@ -335,13 +336,16 @@ PHPAPI int cfg_get_string(char *varname, char **result);
((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 */
+
PHPAPI PHP_FUNCTION(warn_not_available);
#endif