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/FoundationSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned 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
  • -unavailable- added by CaS (Posted a comment)
  • -unavailable- added by leeg (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 08 Jul 2012 03:01:11 PM UTCCaSStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1