From: Jan Djärv Date: Tue, 13 Aug 2013 15:39:14 +0000 (+0200) Subject: * nsterm.h: Fix CGFloat for OSX 10.4. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1686^2~276 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f10490f024a5b06d593ae4c03f6371422e2b5a56;p=emacs.git * nsterm.h: Fix CGFloat for OSX 10.4. Fixes: debbugs:15086 --- diff --git a/src/ChangeLog b/src/ChangeLog index 34ec9e971fe..dd6a2cc6283 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2013-08-13 Jan Djärv + + * nsterm.h: Fix CGFloat for OSX 10.4 (Bug#15086). + 2013-08-13 Dmitry Antipov * window.h (WINDOW_FRINGE_EXTENDED_P): New macro. diff --git a/src/nsterm.h b/src/nsterm.h index 7843f369d24..c34067991f6 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -53,9 +53,24 @@ along with GNU Emacs. If not, see . */ /* CGFloat on GNUStep may be 4 or 8 byte, but functions expect float* for some versions. - On Cocoa, functions expect CGFloat*. Make compatible type. */ -#if defined (NS_IMPL_COCOA) || GNUSTEP_GUI_MAJOR_VERSION > 0 || \ - GNUSTEP_GUI_MINOR_VERSION >= 22 + On Cocoa >= 10.5, functions expect CGFloat*. Make compatible type. */ +#ifdef NS_IMPL_COCOA + +#ifndef NS_HAVE_NSINTEGER +#if defined (__LP64__) && __LP64__ +typedef double CGFloat; +typedef long NSInteger; +typedef unsigned long NSUInteger; +#else +typedef float CGFloat; +typedef int NSInteger; +typedef unsigned int NSUInteger; +#endif /* not LP64 */ +#endif /* not NS_HAVE_NSINTEGER */ + +typedef CGFloat EmacsCGFloat; + +#elif GNUSTEP_GUI_MAJOR_VERSION > 0 || GNUSTEP_GUI_MINOR_VERSION >= 22 typedef CGFloat EmacsCGFloat; #else typedef float EmacsCGFloat; @@ -424,18 +439,6 @@ extern EmacsMenu *mainMenu, *svcsMenu, *dockMenu; @end #endif -#ifndef NS_HAVE_NSINTEGER -#if defined (__LP64__) && __LP64__ -typedef double CGFloat; -typedef long NSInteger; -typedef unsigned long NSUInteger; -#else -typedef float CGFloat; -typedef int NSInteger; -typedef unsigned int NSUInteger; -#endif /* not LP64 */ -#endif /* not NS_HAVE_NSINTEGER */ - #endif /* __OBJC__ */