> In file FL/mac.H, add this just after the #include <Carbon/Carbon.h>:
> 
> #ifdef __APPLE_COCOA__
> 
> #ifndef __AVAILABILITYMACROS__
> #include <AvailabilityMacros.h>
> #endif
> #ifndef MAC_OS_X_VERSION_10_3
> #define MAC_OS_X_VERSION_10_3 1030
> #endif
> #ifndef MAC_OS_X_VERSION_10_4
> #define MAC_OS_X_VERSION_10_4 1040
> #endif
> #ifndef MAC_OS_X_VERSION_10_5
> #define MAC_OS_X_VERSION_10_5 1050
> #endif
> #ifndef MAC_OS_X_VERSION_10_6
> #define MAC_OS_X_VERSION_10_6 1060
> #endif
> #ifndef MAC_OS_X_VERSION_MAX_ALLOWED
> #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_3
> #endif
> 
> #endif
> 
> this should solve all of Ian's errors.

Hmm, maybe. I won't get a chance to test this until Wednesday at the
earliest, though, but my initial thoughts are; this seems like a good
idea as a starting point, but -

- is AvailabilityMacros.h not included anyway?

- I had thought (am probably wrong) that AvailabilityMacros.h will
define MAC_OS_X_VERSION_MAX_ALLOWED if it is not already set, so
testing/setting that after including AvailabilityMacros.h might be
useless?

- We still need to do something about the CGFloat issue on 10.4 and
earlier, I think, and that seems to be missing from this patch?


> and at line 1257 change the 2 lines:
> @interface FLDelegate : NSObject {
> }
> into the 6 lines:
> @interface FLDelegate : NSObject 
> #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
> <NSWindowDelegate>
> #endif
> {
> }
> this should solve the warning you Matt mentionned
> (this warning is a gift from SDK 10.6 I had not tried yet,
> I had just run the programs on 10.6).

I didn't trip up on this - I guess it is a 10.5 / 10.6 thing then? Not
seen in 10.4?



> About the change in file makeinclude.in: sorry, I don't see
> exactly what syntax you suggest that would be more portable.
> May be you can do the change yourself? The goal is to add
> -x objective-c++ only to compile file Fl.cxx and only if on a Mac.

I thnk Mike was pointing out that the testing idiom:

                if [thing] ...

Is not portable and it is better to do an explicit

                if test thing ...

Instead?


-- 
Ian



SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to