diff options
author | Jan Djärv <jan.h.d@swipnet.se> | 2013-08-13 17:39:14 +0200 |
---|---|---|
committer | Jan Djärv <jan.h.d@swipnet.se> | 2013-08-13 17:39:14 +0200 |
commit | f10490f024a5b06d593ae4c03f6371422e2b5a56 (patch) | |
tree | 5bbe0044f2513562de963173fa33570119bdca15 /src/nsterm.h | |
parent | c8ae93b0890e61c5fbc151216d9169968e532f30 (diff) | |
download | emacs-f10490f024a5b06d593ae4c03f6371422e2b5a56.tar.gz |
* nsterm.h: Fix CGFloat for OSX 10.4.
Fixes: debbugs:15086
Diffstat (limited to 'src/nsterm.h')
-rw-r--r-- | src/nsterm.h | 33 |
1 files changed, 18 insertions, 15 deletions
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 <http://www.gnu.org/licenses/>. */ /* 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__ */ |