aboutsummaryrefslogtreecommitdiff
path: root/bfd/hosts/harris.h
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1993-09-17 09:08:00 +0000
committerJohn Gilmore <gnu@cygnus>1993-09-17 09:08:00 +0000
commitc5652bffcbe441880474a8f6c01bccd4d5b0d577 (patch)
tree0d1cf6a1e405aee866500f4ede4e1c12858e4551 /bfd/hosts/harris.h
parentf8efbf2296e731e29df1be4cc391395878846dca (diff)
downloadgdb-c5652bffcbe441880474a8f6c01bccd4d5b0d577.zip
gdb-c5652bffcbe441880474a8f6c01bccd4d5b0d577.tar.gz
gdb-c5652bffcbe441880474a8f6c01bccd4d5b0d577.tar.bz2
Make sure that "offsetof" is defined on all hosts, now that archive.c uses it.
Diffstat (limited to 'bfd/hosts/harris.h')
-rw-r--r--bfd/hosts/harris.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/bfd/hosts/harris.h b/bfd/hosts/harris.h
index 26ab4a6..82750d4 100644
--- a/bfd/hosts/harris.h
+++ b/bfd/hosts/harris.h
@@ -11,7 +11,7 @@
#include <stdio.h>
-#ifndef DONTDECLARE_MALLOC
+#ifndef DONTDECLARE_MALLOC
extern PTR malloc PARAMS ((unsigned));
extern PTR realloc PARAMS ((PTR, unsigned));
#endif
@@ -24,3 +24,8 @@ extern void bzero PARAMS ((char *, int));
extern int strtol();
#include "fopen-same.h"
+
+/* From ANSI C <stddef.h>, which we can't depend upon the existence of */
+#ifndef offsetof
+#define offsetof(type,memb) ((size_t)&(((type *)0)->memb))
+#endif