Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[bug #36650] -base tries to include <objc/blocks_runtime.h> with Apple runtime

17 views
Skip to first unread message

Graham Lee

unread,
Jun 13, 2012, 12:11:04 PM6/13/12
to Graham Lee, bug-g...@gnu.org
URL:
<http://savannah.gnu.org/bugs/?36650>

Summary: -base tries to include <objc/blocks_runtime.h> with
Apple runtime
Project: GNUstep
Submitted by: leeg
Submitted on: Wed 13 Jun 2012 04:11:03 PM GMT
Category: Base/Foundation
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any

_______________________________________________________

Details:

There is no file <objc/blocks_runtime.h> in the Apple runtime. This problem
can be fixed with the following patch:

$ svn diff
Index: core/base/Headers/GNUstepBase/GSVersionMacros.h
===================================================================
--- core/base/Headers/GNUstepBase/GSVersionMacros.h (revision 35202)
+++ core/base/Headers/GNUstepBase/GSVersionMacros.h (working copy)
@@ -284,7 +284,9 @@
*/
#if __has_feature(blocks)
# if OBJC2RUNTIME
-# include <objc/blocks_runtime.h>
+# ifndef __APPLE__
+# include <objc/blocks_runtime.h>
+# endif
# else
# include <ObjectiveC2/blocks_runtime.h>
# endif





_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?36650>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/


lowell

unread,
Jun 15, 2012, 3:06:21 AM6/15/12
to Graham Lee, bug-g...@gnu.org
Follow-up Comment #1, bug #36650 (project gnustep):

+# ifndef _APPLE_
+# include <objc/blocks_runtime.h>
+# endif

The functions declared in that header are found in /usr/include/Block.h on the
Apple runtime. Maybe #include it #ifdef __APPLE__?

Graham Lee

unread,
Jun 15, 2012, 6:18:09 AM6/15/12
to Graham Lee, bug-g...@gnu.org
Follow-up Comment #2, bug #36650 (project gnustep):

I found that there were no warnings about implicit functions when I didn't
include that file, so I think the header is probably already being included
elsewhere. I agree it could be safest to make
#include <Block.h>
explicit.

Richard Frith-Macdonald

unread,
Jul 8, 2012, 11:01:11 AM7/8/12
to Richard Frith-Macdonald, Graham Lee, bug-g...@gnu.org
Update of bug #36650 (project gnustep):

Status: None => Fixed
Open/Closed: Open => Closed

_______________________________________________________

Follow-up Comment #3:

I altered the header to include Block.h rather than objc/blocks_runtime.h if
_APPLE_ is defined.
0 new messages