aboutsummaryrefslogtreecommitdiff
path: root/libobjc
diff options
context:
space:
mode:
authorRichard Earnshaw <rearnsha@arm.com>2001-01-11 14:01:45 +0000
committerRichard Earnshaw <rearnsha@gcc.gnu.org>2001-01-11 14:01:45 +0000
commit919ee051d3aa9d4c21f2add273553c3bb91e3e8a (patch)
treeee29bb48b178640ed9dab485a619f03404478b88 /libobjc
parent844511c89b97334861a86c28927a5e14a6680d84 (diff)
downloadgcc-919ee051d3aa9d4c21f2add273553c3bb91e3e8a.zip
gcc-919ee051d3aa9d4c21f2add273553c3bb91e3e8a.tar.gz
gcc-919ee051d3aa9d4c21f2add273553c3bb91e3e8a.tar.bz2
encoding.c (STRUCTURE_SIZE_BOUNDARY): Redefine in a way that determines the value dynamically.
* encoding.c (STRUCTURE_SIZE_BOUNDARY): Redefine in a way that determines the value dynamically. From-SVN: r38906
Diffstat (limited to 'libobjc')
-rw-r--r--libobjc/ChangeLog5
-rw-r--r--libobjc/encoding.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/libobjc/ChangeLog b/libobjc/ChangeLog
index 32fe0a2..c937f67 100644
--- a/libobjc/ChangeLog
+++ b/libobjc/ChangeLog
@@ -1,3 +1,8 @@
+2000-01-11 Richard Earnshaw <rearnsha@arm.com>
+
+ * encoding.c (STRUCTURE_SIZE_BOUNDARY): Redefine in a way that
+ determines the value dynamically.
+
Wed Jan 3 00:49:10 2001 Ovidiu Predescu <ovidiu@cup.hp.com>
* sendmsg.c: Added __objc_msg_forward, a hook that allows external
diff --git a/libobjc/encoding.c b/libobjc/encoding.c
index ea60b7b..bbbb81c 100644
--- a/libobjc/encoding.c
+++ b/libobjc/encoding.c
@@ -62,6 +62,11 @@ Boston, MA 02111-1307, USA. */
#define get_inner_array_type(TYPE) ((TYPE) + 1)
+/* Some ports (eg ARM) allow the structure size boundary to be
+ selected at compile-time. We override the normal definition with
+ one that has a constant value for this compilation. */
+#undef STRUCTURE_SIZE_BOUNDARY
+#define STRUCTURE_SIZE_BOUNDARY (BITS_PER_UNIT * sizeof (struct{char a;}))
static inline int
atoi (const char* str)
@@ -724,9 +729,7 @@ objc_layout_structure (const char *type,
layout->record_size = 0;
layout->record_align = BITS_PER_UNIT;
-#ifdef STRUCTURE_SIZE_BOUNDARY
layout->record_align = MAX (layout->record_align, STRUCTURE_SIZE_BOUNDARY);
-#endif
}