Clang differentiates between “struct __CFHost” and “@class __CFHost”.
To make the code work again I had to implement a dummy struct for __CFHost.
Since the CoreFoundation garbage is wanted by Apple we cannot dump it for good :(.
Also some casts where needed for the CFStream implementation.
When using 'import' for system headers on Linux with GCC 4.6.2 the header control macros do not work
as intended and therefore everything is messed up.
That is with:
CFLAGS += -Wall -Werror -std=gnu99 -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-sequence-point
Improvements made:
- <process.h> does not exists in Linux
- some Windows special code was not wrapped into #ifdef WINDOWS
- corrected case in at least one import
- replaced nil by NULL or 0 when used for non-object pointers or numbers
- added missing imports
- removed/commented out unused variables
- added dummy usage for some needed variables (i.e. localException in NS_HANDLER)
- removed noop fprintf
- added casts if necessary
- initialized variables if necessary
- replaced *<variable>++ by *<variable> += 1 since the former returns a value wich was ignored
- surrounded assignments used as boolean expression by braces
- added missing return statements
N.B.: Since this commit does not contain any runtime related changes the result will not compile at
all with stock gcc under Linux :).
- enable CIContext on NSGraphicsContext
- NSMenu decodes parent menu from coder instead of setting it programmatically
- NSException prints exception if NSDebugEnabled instead of raising
- NSKeyedUnarchiver properly decodes NSNumber's
- forwarding code added to NSProxy
- CFArrayGetCountOfValue fix
- NSString * to NSString * const fixes
- requestUserAttention: implementation
- NSTrackingArea fix, retains userInfo, does not retain userData
- removed unused code from NSWindowBackgroundView
- couple more font mappings in NSFont
- fixes to NSTrackingArea behavior in NSView
- faster visibleRect, precalculate as zero rect if hidden
- Fixed NSTrackingInVisibleRect behavior, doesn't do hit test
- Fixed NSTrackingArea testing to properly order exit/enter events
- setFrame: doesn't do anything if the new value is the same as the old value
- reorganize NSWIndow setFrame:display:/setFrame:display:animation:
- mark window as needing display if display called and not visible
- Win32Display will load fonts in main bundle for private usage
- use of setControlView: for cells in NSOutlineView and NSTableView
- _setSelectedRowIndexes: added to NSTableView for KVO
- NSString cString related fixes
- NSStringFormatter changes to accomodate NSNumberFormatter grouping separator
- NSNumberFormatter fixes
- appendFloat_generic removed, might cause problems
- NSSet fixes
- NSSocket_windows fixes for SSL handler
- per thread select capabilities
- NSLog uses fprintf instead of WriteFile so it synchronizes with NSCLog
- NSRunLoop modified to fire only one timer each time through run loop
- NSRunLoop -cancelPerformSelectorsWithTarget: implemented
- NSObject +cancelPreviousPerformRequestsWithTarget: implemented
- KVO fixes and optimizations
- pthread functions added to Foundation project for Windows target
- CFHost added to Foundation project
- CFStream, CFRunLoop work
- NSCollectionViewItem subclass now NSViewController per 10.6 change
- NSColor catalog color cleanup
- NSTrackingArea made public header
- NSStream fixes, CFStream additions
- NSUserDefaults improved boolForKey:
- some CFByteOrder implementation
- CFHost implementation with asynchronous resolver
- CFPreferences skeletons
- CIImage category in NSCIImageRep
- NSTabView resizes item view even if autoresizing is off
- NSCustomObject -description
- NSNibLoading use of autorelease pool to reduce memory pressure
- NSNib use of autorelease pool to reduce memory pressure
- NSIBObjectData warning if it can't create custom instance instead of NSArray exception (adding nil)
- changed NSBox to non-opaque, doesn't fill with background color
- NSTableHeaderView use of setControlView:
- NSMatrix use of setControlView:
- NSAnimation/NSViewAnimation fixes to behave properly with timer
- NSSheetContext check for nil
- NSGraphicsStyle_uxtheme fix for menu separators
- NSEvent -userData method added
- minor cleanup of NSInvocation
- NSDateFormatter fixes and update
- NSArray+KVC.m fix for nil values