unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: David Caldwell <david@porkrind.org>
To: Philipp Stephani <p.stephani2@gmail.com>, 27059@debbugs.gnu.org
Subject: bug#27059: Can't compile master branch on Mac OS X
Date: Thu, 25 May 2017 09:25:47 -0700	[thread overview]
Message-ID: <2b432643-7cfb-fa05-6b08-97bfc1da9d2b@porkrind.org> (raw)
In-Reply-To: <CAArVCkRKgX4t=DG6PGAFkyHRMHmtrRNOKtNdJoguCiQAohDeeQ@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1976 bytes --]

On 5/24/17 1:20 PM, Philipp Stephani wrote:
> 
> 
> David Caldwell <david@porkrind.org <mailto:david@porkrind.org>> schrieb
> am Mi., 24. Mai 2017 um 18:24 Uhr:
> 
>       CC       nsmenu.o
>     nsmenu.m:1496:70: error: expected a type
>     - (instancetype)initWithContentRect: (NSRect)contentRect styleMask:
>     (NSWindowStyleMask)aStyle
> 
> Can you try applying the following patch:
> 
> diff --git a/src/nsterm.h b/src/nsterm.h
> index 8f3d92b353..288b91269d 100644
> --- a/src/nsterm.h
> +++ b/src/nsterm.h
> @@ -65,7 +65,7 @@ typedef float EmacsCGFloat;
>  /* FIXME: instancetype is a language built-in, but older versions of
>     Clang don't support it, and I don't know if GCC supports it at all.
>     Should this be tested for in ./configure? */
> -#if defined (NS_IMPL_GNUSTEP)
> +#if defined (NS_IMPL_GNUSTEP) \
>      || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10
>  typedef id instancetype;
>  typedef NSUInteger NSWindowStyleMask;
> 

That didn't work, neither did the current HEAD. The current HEAD is
missing the backslash after the defined (NS_IMPL_GNUSTEP), for one
thing. But testing against MAC_OS_X_VERSION_10_10 doesn't work on older
OSes, it needs to be the hardcoded value '101000' (since the define
didn't exist back then). To sum up, this is the patch that worked for me:

diff --git a/src/nsterm.h b/src/nsterm.h
index 8f3d92b353..04ec82814a 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -65,8 +65,8 @@ typedef float EmacsCGFloat;
 /* FIXME: instancetype is a language built-in, but older versions of
    Clang don't support it, and I don't know if GCC supports it at all.
    Should this be tested for in ./configure? */
-#if defined (NS_IMPL_GNUSTEP)
-    || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10
+#if defined (NS_IMPL_GNUSTEP) \
+    || MAC_OS_X_VERSION_MAX_ALLOWED < 101000
 typedef id instancetype;
 typedef NSUInteger NSWindowStyleMask;
 #endif


-David


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2017-05-25 16:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-24 16:22 bug#27059: Can't compile master branch on Mac OS X David Caldwell
2017-05-24 20:20 ` Philipp Stephani
2017-05-25 16:25   ` David Caldwell [this message]
2017-05-25 19:02     ` Alan Third
2017-05-26 17:23       ` David Caldwell
2017-05-26 18:47         ` Philipp Stephani
2017-05-26 19:30         ` David Caldwell
2017-05-26 23:58           ` Alan Third
2017-05-29  6:55             ` David Caldwell
2017-05-29  8:24               ` Alan Third
2017-05-29  8:56                 ` David Caldwell
2017-05-29 16:05                   ` Alan Third
2017-05-30 18:36                     ` David Caldwell
2017-05-30 19:01                       ` Alan Third
2017-05-31 23:39                         ` David Caldwell
2017-05-25 21:12 ` OKAZAKI Tetsurou

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=2b432643-7cfb-fa05-6b08-97bfc1da9d2b@porkrind.org \
    --to=david@porkrind.org \
    --cc=27059@debbugs.gnu.org \
    --cc=p.stephani2@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).