diff options
| author | Pietro Gagliardi <[email protected]> | 2014-05-20 08:08:55 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-05-20 08:08:55 -0400 |
| commit | c6d24f0e32c8a03b9f0f31d077c6ffbff58ef74d (patch) | |
| tree | a8490f04f090bb0d91046655acbddc6d6ba95db3 | |
| parent | 3e9e767d79c85726741faee7b025412a27a6f86c (diff) | |
Changed #include to #import on the Objective-C files to settle the whole include guards thing. Now to continue fixing Mac OS X 10.6 building...
| -rw-r--r-- | area_darwin.m | 10 | ||||
| -rw-r--r-- | delegateuitask_darwin.m | 20 | ||||
| -rw-r--r-- | dialog_darwin.m | 2 | ||||
| -rw-r--r-- | listbox_darwin.m | 14 | ||||
| -rw-r--r-- | objc_darwin.m | 11 | ||||
| -rw-r--r-- | prefsize_darwin.m | 10 | ||||
| -rw-r--r-- | sysdata_darwin.m | 31 |
7 files changed, 48 insertions, 50 deletions
diff --git a/area_darwin.m b/area_darwin.m index a34dcdb..6727415 100644 --- a/area_darwin.m +++ b/area_darwin.m @@ -2,11 +2,11 @@ #include "objc_darwin.h" #include "_cgo_export.h" -#include <AppKit/NSView.h> -#include <AppKit/NSTrackingArea.h> -#include <Foundation/NSGeometry.h> -#include <AppKit/NSEvent.h> -#include <AppKit/NSBitmapImageRep.h> +#import <AppKit/NSView.h> +#import <AppKit/NSTrackingArea.h> +#import <Foundation/NSGeometry.h> +#import <AppKit/NSEvent.h> +#import <AppKit/NSBitmapImageRep.h> #define to(T, x) ((T *) (x)) #define toNSEvent(x) to(NSEvent, (x)) diff --git a/delegateuitask_darwin.m b/delegateuitask_darwin.m index 4ad0796..b45f680 100644 --- a/delegateuitask_darwin.m +++ b/delegateuitask_darwin.m @@ -2,13 +2,13 @@ #include "objc_darwin.h" #include "_cgo_export.h" -#include <Foundation/NSObject.h> -#include <Foundation/NSValue.h> -#include <Foundation/NSNotification.h> +#import <Foundation/NSObject.h> +#import <Foundation/NSValue.h> +#import <Foundation/NSNotification.h> // see the hack below; we'll include everything first just in case some other headers get included below; if the hack ever gets resolved, we can use the ones below instead -#include <Foundation/NSAutoreleasePool.h> -#include <AppKit/NSEvent.h> +#import <Foundation/NSAutoreleasePool.h> +#import <AppKit/NSEvent.h> // HACK. // Apple's header files are bugged: there's an enum that was introduced in 10.7 with new values added in 10.8, but instead of wrapping the whole enum in a version check, they wrap just the fields. This means that on 10.6 that enum will be empty, which is illegal. @@ -19,8 +19,8 @@ #undef MAC_OS_X_VERSION_MAX_ALLOWED #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_7 #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_7 -# MAC_OS_X_VERSION_10_7 MAC_OS_X_VERSION_10_6 MAC_OS_X_VERSION_10_3 -#include <AppKit/NSApplication.h> +//# MAC_OS_X_VERSION_10_7 MAC_OS_X_VERSION_10_6 MAC_OS_X_VERSION_10_3 +#import <AppKit/NSApplication.h> #undef MAC_OS_X_VERSION_MIN_REQUIRED #undef MAC_OS_X_VERSION_MAX_ALLOWED #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6 @@ -28,9 +28,9 @@ // NSWindow.h is below because it includes NSApplication.h // we'll use the other headers's include guards so if the above is resolved and I forget to uncomment anything below it won't matter -#include <AppKit/NSWindow.h> -#include <Foundation/NSAutoreleasePool.h> -#include <AppKit/NSEvent.h> +#import <AppKit/NSWindow.h> +#import <Foundation/NSAutoreleasePool.h> +#import <AppKit/NSEvent.h> extern NSRect dummyRect; diff --git a/dialog_darwin.m b/dialog_darwin.m index 7bd7a8f..b147c5a 100644 --- a/dialog_darwin.m +++ b/dialog_darwin.m @@ -1,7 +1,7 @@ // 15 may 2014 #include "objc_darwin.h" -#include <AppKit/NSAlert.h> +#import <AppKit/NSAlert.h> static void alert(NSString *primary, NSString *secondary, NSAlertStyle style) { diff --git a/listbox_darwin.m b/listbox_darwin.m index 69ac09e..4754a3f 100644 --- a/listbox_darwin.m +++ b/listbox_darwin.m @@ -1,26 +1,26 @@ // 13 may 2014 #include "objc_darwin.h" -#include <Foundation/NSDictionary.h> -#include <AppKit/NSArrayController.h> -#include <AppKit/NSTableColumn.h> +#import <Foundation/NSDictionary.h> +#import <AppKit/NSArrayController.h> +#import <AppKit/NSTableColumn.h> // see delegateuitask_darwin.m // in this case, NSTableView.h includes NSApplication.h -#include <Foundation/NSIndexSet.h> +#import <Foundation/NSIndexSet.h> #undef MAC_OS_X_VERSION_MIN_REQUIRED #undef MAC_OS_X_VERSION_MAX_ALLOWED #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_7 #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_7 -#include <AppKit/NSApplication.h> +#import <AppKit/NSApplication.h> #undef MAC_OS_X_VERSION_MIN_REQUIRED #undef MAC_OS_X_VERSION_MAX_ALLOWED #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6 #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_6 -#include <AppKit/NSTableView.h> -#include <Foundation/NSIndexSet.h> +#import <AppKit/NSTableView.h> +#import <Foundation/NSIndexSet.h> #define to(T, x) ((T *) (x)) #define toNSMutableDictionary(x) to(NSMutableDictionary, (x)) diff --git a/objc_darwin.m b/objc_darwin.m index ded192e..79966c9 100644 --- a/objc_darwin.m +++ b/objc_darwin.m @@ -1,25 +1,24 @@ // 15 may 2014 #include "objc_darwin.h" -#include <Foundation/NSString.h> +#import <Foundation/NSString.h> // see delegateuitask_darwin.m // in this case, NSScrollView.h includes NSApplication.h -// NOTE NSView.h apparently lacks include guards; we'll need to uncomment the one below -#include <AppKit/NSView.h> +#import <AppKit/NSView.h> #undef MAC_OS_X_VERSION_MIN_REQUIRED #undef MAC_OS_X_VERSION_MAX_ALLOWED #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_7 #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_7 -#include <AppKit/NSApplication.h> +#import <AppKit/NSApplication.h> #undef MAC_OS_X_VERSION_MIN_REQUIRED #undef MAC_OS_X_VERSION_MAX_ALLOWED #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6 #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_6 -//#include <AppKit/NSView.h> -#include <AppKit/NSScrollView.h> +#import <AppKit/NSView.h> +#import <AppKit/NSScrollView.h> #define to(T, x) ((T *) (x)) #define _toNSString(x) to(NSString, (x)) diff --git a/prefsize_darwin.m b/prefsize_darwin.m index 8c975af..34a0dcd 100644 --- a/prefsize_darwin.m +++ b/prefsize_darwin.m @@ -1,7 +1,7 @@ // 15 may 2014 #include "objc_darwin.h" -#include <AppKit/NSControl.h> +#import <AppKit/NSControl.h> // see delegateuitask_darwin.m // in this case, NSScrollView.h, NSTableView.h, AND NSProgressIndicator.h all include NSApplication.h @@ -10,15 +10,15 @@ #undef MAC_OS_X_VERSION_MAX_ALLOWED #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_7 #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_7 -#include <AppKit/NSApplication.h> +#import <AppKit/NSApplication.h> #undef MAC_OS_X_VERSION_MIN_REQUIRED #undef MAC_OS_X_VERSION_MAX_ALLOWED #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6 #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_6 -#include <AppKit/NSScrollView.h> -#include <AppKit/NSTableView.h> -#include <AppKit/NSProgressIndicator.h> +#import <AppKit/NSScrollView.h> +#import <AppKit/NSTableView.h> +#import <AppKit/NSProgressIndicator.h> #define to(T, x) ((T *) (x)) #define toNSControl(x) to(NSControl, (x)) diff --git a/sysdata_darwin.m b/sysdata_darwin.m index ded1d3c..46c19e0 100644 --- a/sysdata_darwin.m +++ b/sysdata_darwin.m @@ -1,35 +1,34 @@ // 12 may 2014 #include "objc_darwin.h" -#include <Foundation/NSGeometry.h> +#import <Foundation/NSGeometry.h> // see delegateuitask_darwin.m // in this case, lots of headers include NSApplication.h -// NOTE uncomment the ones below when resolved because yay inconsistent include guard madness -#include <AppKit/NSView.h> -#include <AppKit/NSControl.h> +#import <AppKit/NSView.h> +#import <AppKit/NSControl.h> #undef MAC_OS_X_VERSION_MIN_REQUIRED #undef MAC_OS_X_VERSION_MAX_ALLOWED #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_7 #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_7 -#include <AppKit/NSApplication.h> +#import <AppKit/NSApplication.h> #undef MAC_OS_X_VERSION_MIN_REQUIRED #undef MAC_OS_X_VERSION_MAX_ALLOWED #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6 #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_6 -#include <AppKit/NSWindow.h> -#include <AppKit/NSView.h> -#include <AppKit/NSFont.h> -//#include <AppKit/NSControl.h> -#include <AppKit/NSButton.h> -#include <AppKit/NSPopUpButton.h> -#include <AppKit/NSComboBox.h> -#include <AppKit/NSTextField.h> -#include <AppKit/NSSecureTextField.h> -#include <AppKit/NSProgressIndicator.h> -#include <AppKit/NSScrollView.h> +#import <AppKit/NSWindow.h> +#import <AppKit/NSView.h> +#import <AppKit/NSFont.h> +#import <AppKit/NSControl.h> +#import <AppKit/NSButton.h> +#import <AppKit/NSPopUpButton.h> +#import <AppKit/NSComboBox.h> +#import <AppKit/NSTextField.h> +#import <AppKit/NSSecureTextField.h> +#import <AppKit/NSProgressIndicator.h> +#import <AppKit/NSScrollView.h> extern NSRect dummyRect; |
