diff options
author | Sterling Hughes <sterling@php.net> | 2001-08-18 02:08:29 +0000 |
---|---|---|
committer | Sterling Hughes <sterling@php.net> | 2001-08-18 02:08:29 +0000 |
commit | 15b1e4ba9c4d7ee231d9c17ced2d63d8a89ad1ce (patch) | |
tree | ee4e9180113638f02485421be9b80d91de12349b /main/php.h | |
parent | 244c9ff3c9e1430c9104bfce1f60d5d0943adf24 (diff) | |
download | php-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.h | 6 |
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 |