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

Group
 
 

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

Submitter:  Graham Lee <leeg>
Submitted:  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
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    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.13-758e.
    Corresponding source code