all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Caldwell <david@porkrind.org>
To: 15505@debbugs.gnu.org
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	[thread overview]
Message-ID: <524B7F91.30301@porkrind.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1559 bytes --]

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)));
     }


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4219 bytes --]

             reply	other threads:[~2013-10-02  2:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-02  2:06 David Caldwell [this message]
2013-10-02  2:28 ` bug#15505: 24.3; Latest trunk fails to compile on 32 bit Mac OS X (macfont.m) Alp Aker
2013-10-02  2:30   ` Alp Aker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=524B7F91.30301@porkrind.org \
    --to=david@porkrind.org \
    --cc=15505@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.