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
#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;

View File

@ -532,11 +532,7 @@ int Fl_Native_File_Chooser::runmodal()
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) {

View File

@ -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>

View File

@ -53,17 +53,6 @@ extern "C" {
#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