diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2000-05-17 15:21:11 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2000-05-17 15:21:11 +0000 |
commit | e0125cf32b14239950bbc5b15dd73f18b9d76c16 (patch) | |
tree | 0ad332b75e6e071311abd501cac9b144fcfd9ea2 /gcc | |
parent | 2dc693ee94f309ec1e5b3af65b1b3c3dd84dc63f (diff) | |
download | gcc-e0125cf32b14239950bbc5b15dd73f18b9d76c16.tar.gz |
system.h (offsetof): Define at the very end, to ensure we prefer the platform's definition if available.
* system.h (offsetof): Define at the very end, to ensure we prefer
the platform's definition if available.
From-SVN: r33958
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/system.h | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cc2734fc103..3f9fd2d0a6e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2000-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * system.h (offsetof): Define at the very end, to ensure we prefer + the platform's definition if available. 2000-05-16 Bruce Korb <bkorb@gnu.org> diff --git a/gcc/system.h b/gcc/system.h index 86ea5bafa06..1593689caeb 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -50,10 +50,6 @@ Boston, MA 02111-1307, USA. */ #define NULL 0 #endif -#ifndef offsetof -#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) -#endif - /* The compiler is not a multi-threaded application and therefore we do not have to use the locking functions. @@ -581,5 +577,8 @@ extern void abort PARAMS ((void)); #define ENUM_BITFIELD(TYPE) unsigned int #endif +#ifndef offsetof +#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) +#endif #endif /* __GCC_SYSTEM_H__ */ |