Define NSInteger in FL/mac.H when needed, so it's available to all source files.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10779 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2015-06-30 02:23:26 +00:00
parent b4662e4f44
commit 634ede015d
4 changed files with 10 additions and 25 deletions

View File

@ -72,6 +72,16 @@ typedef CGContextRef Fl_Offscreen;
#define MAC_OS_X_VERSION_10_10 101000 #define MAC_OS_X_VERSION_10_10 101000
#endif #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__ #ifdef __OBJC__
@class NSCursor; @class NSCursor;
@class NSOpenGLPixelFormat; @class NSOpenGLPixelFormat;

View File

@ -532,11 +532,7 @@ int Fl_Native_File_Chooser::runmodal()
NSString *dir = nil; NSString *dir = nil;
NSString *fname = nil; NSString *fname = nil;
NSString *preset = nil; NSString *preset = nil;
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
int retval;
#else
NSInteger retval; NSInteger retval;
#endif
if (_preset_file) { if (_preset_file) {
preset = [[NSString alloc] initWithUTF8String:_preset_file]; preset = [[NSString alloc] initWithUTF8String:_preset_file];
if (strchr(_preset_file, '/') != NULL) { if (strchr(_preset_file, '/') != NULL) {

View File

@ -40,16 +40,6 @@
#import <Cocoa/Cocoa.h> #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 "flstring.h"
#include <stdio.h> #include <stdio.h>
#include <ctype.h> #include <ctype.h>

View File

@ -53,17 +53,6 @@ extern "C" {
#import <Cocoa/Cocoa.h> #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 // #define DEBUG_SELECT // UNCOMMENT FOR SELECT()/THREAD DEBUGGING
#ifdef DEBUG_SELECT #ifdef DEBUG_SELECT
#include <stdio.h> // testing #include <stdio.h> // testing