[PATCH 1 of 2] libc/eglibc: [OS X] Don't Use __block as a Name of an Argument

Philip Belemezov philip@belemezov.net
Tue Mar 26 15:28:00 GMT 2013


# HG changeset patch
# User Philip Belemezov <philip@belemezov.net>
# Date 1364300812 -7200
# Node ID fcdf7fc7fd1c00715c3d9651ff00d805ecfb8aa8
# Parent  0fc56e62cecf07e4cdaf866ee24d6893c4ade436
libc/eglibc: [OS X] Don't Use __block as a Name of an Argument

Apple's GCC defines __block as

#define __block __attribute__((__blocks__(byref)))

which causes compilation to fail (attribute cannot be applied to argument).


Signed-Off-By: Philip Belemezov <philip@belemezov.net>

diff -r 0fc56e62cecf -r fcdf7fc7fd1c patches/eglibc/2_17/fix_param_name_obstack_free.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/eglibc/2_17/fix_param_name_obstack_free.patch	Tue Mar 26 14:26:52 2013 +0200
@@ -0,0 +1,16 @@
+Don't use __block, because Apple's GCC already defines it as
+
+#define __block __attribute__((__blocks__(byref)))
+
+diff -Naur eglibc-2_17-orig/malloc/obstack.h eglibc-2_17-new/malloc/obstack.h
+--- eglibc-2_17-orig/malloc/obstack.h	2012-02-18 04:24:59.000000000 +0200
++++ eglibc-2_17-new/malloc/obstack.h	2013-03-26 12:36:50.000000000 +0200
+@@ -186,7 +186,7 @@
+ 			     void (*) (void *, void *), void *);
+ extern int _obstack_memory_used (struct obstack *);
+ 
+-void obstack_free (struct obstack *__obstack, void *__block);
++void obstack_free (struct obstack *__obstack, void *block);
+ 
+ 
+ /* Error handler called when `obstack_chunk_alloc' failed to allocate

--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list