Skip to content

Commit

Permalink
Define NSInteger in FL/mac.H when needed, so it's available to all so…
Browse files Browse the repository at this point in the history
…urce files.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10779 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
Manolo Gouy authored and Manolo Gouy committed Jun 30, 2015
1 parent b4662e4 commit 634ede0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 25 deletions.
10 changes: 10 additions & 0 deletions FL/mac.H
Expand Up @@ -72,6 +72,16 @@ typedef CGContextRef Fl_Offscreen;
#define MAC_OS_X_VERSION_10_10 101000
#endif

#ifndef NSINTEGER_DEFINED // appears with 10.5 in NSObjCRuntime.h
#if defined(__LP64__) && __LP64__
typedef long NSInteger;
typedef unsigned long NSUInteger;
#else
typedef int NSInteger;
typedef unsigned int NSUInteger;
#endif
#endif

#ifdef __OBJC__
@class NSCursor;
@class NSOpenGLPixelFormat;
Expand Down
4 changes: 0 additions & 4 deletions src/Fl_Native_File_Chooser_MAC.mm
Expand Up @@ -532,11 +532,7 @@ - (void) option:(BOOL)o
NSString *dir = nil;
NSString *fname = nil;
NSString *preset = nil;
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
int retval;
#else
NSInteger retval;
#endif
if (_preset_file) {
preset = [[NSString alloc] initWithUTF8String:_preset_file];
if (strchr(_preset_file, '/') != NULL) {
Expand Down
10 changes: 0 additions & 10 deletions src/Fl_Sys_Menu_Bar.mm
Expand Up @@ -40,16 +40,6 @@

#import <Cocoa/Cocoa.h>

#ifndef NSINTEGER_DEFINED // appears with 10.5 in NSObjCRuntime.h
#if defined(__LP64__) && __LP64__
typedef long NSInteger;
typedef unsigned long NSUInteger;
#else
typedef long NSInteger;
typedef unsigned int NSUInteger;
#endif
#endif

#include "flstring.h"
#include <stdio.h>
#include <ctype.h>
Expand Down
11 changes: 0 additions & 11 deletions src/Fl_cocoa.mm
Expand Up @@ -53,17 +53,6 @@

#import <Cocoa/Cocoa.h>

#ifndef NSINTEGER_DEFINED // appears with 10.5 in NSObjCRuntime.h
#if defined(__LP64__) && __LP64__
typedef long NSInteger;
typedef unsigned long NSUInteger;
#else
typedef long NSInteger;
typedef unsigned int NSUInteger;
#endif
#endif


// #define DEBUG_SELECT // UNCOMMENT FOR SELECT()/THREAD DEBUGGING
#ifdef DEBUG_SELECT
#include <stdio.h> // testing
Expand Down

0 comments on commit 634ede0

Please sign in to comment.