[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#15505: 24.3; Latest trunk fails to compile on 32 bit Mac OS X (macfo
From: |
David Caldwell |
Subject: |
bug#15505: 24.3; Latest trunk fails to compile on 32 bit Mac OS X (macfont.m). |
Date: |
Tue, 01 Oct 2013 19:06:09 -0700 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.0 |
I'm configuring like this:
env CC="i686-apple-darwin10-gcc-4.2.1 -mmacosx-version-min=10.5"
./configure --host=i686-apple-darwin --build=i686-apple-darwin --with-ns
It all compiles ok until it gets to macfont.m:
i686-apple-darwin10-gcc-4.2.1 -mmacosx-version-min=10.5 -std=gnu99 -c
-Demacs -I. -I/Users/david/src/emacs-dev/emacs-bzr/build-2013-09-20/src
-I../lib
-I/Users/david/src/emacs-dev/emacs-bzr/build-2013-09-20/src/../lib
-I/usr/include/libxml2 -MMD -MF deps/macfont.d -MP -g3
-O2 macfont.m
macfont.m: In function 'macfont_draw':
macfont.m:2712: error: incompatible type for argument 2 of
'CGContextFillRect'
make[1]: *** [macfont.o] Error 1
make: *** [src] Error 2
On further examination, I found this: http://cocoadev.com/CGRect
which says that you need NSRectToCGRect() on 32 bit Mac OS X platforms
(which explains only the 32 bit compile is failing). Luckily there is
CGRectMake which analagous to NSMakeRect:
https://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CGGeometry/Reference/reference.html#//apple_ref/doc/uid/TP30000955-CH1g-F17161
The following patch fixes the issue:
=== modified file 'src/macfont.m'
--- src/macfont.m 2013-09-15 19:36:20 +0000
+++ src/macfont.m 2013-10-02 01:32:30 +0000
@@ -2708,7 +2708,7 @@
{
CG_SET_FILL_COLOR_WITH_GC_BACKGROUND (context, s);
CGContextFillRect (context,
- NSMakeRect (x, y,
+ CGRectMake (x, y,
s->width, FONT_HEIGHT (s->font)));
}
smime.p7s
Description: S/MIME Cryptographic Signature
- bug#15505: 24.3; Latest trunk fails to compile on 32 bit Mac OS X (macfont.m).,
David Caldwell <=