summaryrefslogtreecommitdiff
path: root/cross/avr-gdb/patches
diff options
context:
space:
mode:
authorjoerg <joerg>2008-06-21 20:32:08 +0000
committerjoerg <joerg>2008-06-21 20:32:08 +0000
commitbd8a8998a2193b63c9cfaaf79eb2417ac49b0950 (patch)
treeafebf736516b4598ceb466de20c583298d157962 /cross/avr-gdb/patches
parent3088ecd78317e073a7cc6e4165381e8a563d98e4 (diff)
downloadpkgsrc-bd8a8998a2193b63c9cfaaf79eb2417ac49b0950.tar.gz
Fix build with GCC 4.
Diffstat (limited to 'cross/avr-gdb/patches')
-rw-r--r--cross/avr-gdb/patches/patch-ad34
1 files changed, 34 insertions, 0 deletions
diff --git a/cross/avr-gdb/patches/patch-ad b/cross/avr-gdb/patches/patch-ad
new file mode 100644
index 00000000000..b98ea711515
--- /dev/null
+++ b/cross/avr-gdb/patches/patch-ad
@@ -0,0 +1,34 @@
+$NetBSD: patch-ad,v 1.1 2008/06/21 20:32:08 joerg Exp $
+
+--- include/obstack.h.orig 2001-03-14 02:27:43.000000000 +0000
++++ include/obstack.h
+@@ -417,14 +417,12 @@ __extension__ \
+ /* These assume that the obstack alignment is good enough for pointers or ints,
+ and that the data added so far to the current object
+ shares that much alignment. */
+-
+ # define obstack_ptr_grow(OBSTACK,datum) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ if (__o->next_free + sizeof (void *) > __o->chunk_limit) \
+ _obstack_newchunk (__o, sizeof (void *)); \
+- *((void **)__o->next_free)++ = ((void *)datum); \
+- (void) 0; })
++ obstack_ptr_grow_fast (__o, datum); })
+
+ # define obstack_int_grow(OBSTACK,datum) \
+ __extension__ \
+@@ -434,7 +432,12 @@ __extension__ \
+ *((int *)__o->next_free)++ = ((int)datum); \
+ (void) 0; })
+
+-# define obstack_ptr_grow_fast(h,aptr) (*((void **) (h)->next_free)++ = (void *)aptr)
++# define obstack_ptr_grow_fast(OBSTACK,aptr) \
++__extension__ \
++({ struct obstack *__o1 = (OBSTACK); \
++ *(const void **) __o1->next_free = (aptr); \
++ __o1->next_free += sizeof (const void *); \
++ (void) 0; })
+ # define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint)
+
+ # define obstack_blank(OBSTACK,length) \