bugGNUstep - Bugs: bug #36650, -base tries to include...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

Submitted by:  Graham Lee <leeg>
Submitted on:  Wed 13 Jun 2012 04:11:03 PM UTC  
 
Category:  Base/Foundation Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Sun 08 Jul 2012 03:01:11 PM UTC, comment #3:

I altered the header to include Block.h rather than objc/blocks_runtime.h if APPLE is defined.

Richard Frith-Macdonald <CaS>
Project Member
Fri 15 Jun 2012 10:18:09 AM UTC, comment #2:

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.

Graham Lee <leeg>
Fri 15 Jun 2012 07:06:21 AM UTC, comment #1:

+# 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_?

lowell <lowellv>
Wed 13 Jun 2012 04:11:03 PM UTC, original submission:

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

Graham Lee <leeg>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by CaS (Posted a comment)
  • -email is unavailable- added by leeg (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-07-08 CaS StatusNone => Fixed
        Open/ClosedOpen => Closed

    Back to the top


    Powered by Savane 3.4