From debbugs-submit-bounces@debbugs.gnu.org Tue May 23 14:57:35 2017 Received: (at submit) by debbugs.gnu.org; 23 May 2017 18:57:35 +0000 Received: from localhost ([127.0.0.1]:35073 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDEzu-00018q-Ue for submit@debbugs.gnu.org; Tue, 23 May 2017 14:57:35 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDEzs-00018d-7w for submit@debbugs.gnu.org; Tue, 23 May 2017 14:57:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dDEzk-0000S8-Jc for submit@debbugs.gnu.org; Tue, 23 May 2017 14:57:26 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:36988) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dDEzk-0000Ry-FI for submit@debbugs.gnu.org; Tue, 23 May 2017 14:57:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43764) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDEzh-0003to-Mq for bug-gnu-emacs@gnu.org; Tue, 23 May 2017 14:57:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dDEze-0000NJ-L6 for bug-gnu-emacs@gnu.org; Tue, 23 May 2017 14:57:21 -0400 Received: from [195.159.176.226] (port=41194 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dDEze-0000Ll-9f for bug-gnu-emacs@gnu.org; Tue, 23 May 2017 14:57:18 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dDEzT-000692-Jb for bug-gnu-emacs@gnu.org; Tue, 23 May 2017 20:57:07 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: "Charles A. Roelli" Subject: MacOS 10.6: fix NS build Date: Tue, 23 May 2017 20:57:04 +0200 Lines: 410 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------EDB4F93321314957FC96B288" X-Complaints-To: usenet@blaine.gmane.org User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 X-Mozilla-News-Host: news://news.gmane.org:119 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This is a multi-part message in MIME format. --------------EDB4F93321314957FC96B288 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Was getting these errors: ======== nsterm.h:455: error: expected ‘)’ before ‘instancetype’ nsterm.h:456: error: expected ‘)’ before ‘instancetype’ nsterm.h:460: error: expected ‘)’ before ‘instancetype’ nsterm.h:463: error: expected ‘)’ before ‘instancetype’ nsterm.h:523: error: expected ‘)’ before ‘instancetype’ nsterm.h:557: error: expected ‘)’ before ‘instancetype’ nsterm.h:592: error: expected ‘)’ before ‘instancetype’ nsterm.h:611: error: expected ‘)’ before ‘instancetype’ nsterm.h:659: error: expected ‘)’ before ‘instancetype’ nsterm.h:661: error: expected ‘)’ before ‘instancetype’ nsterm.h:663: error: expected ‘)’ before ‘instancetype’ nsterm.h:664: error: expected ‘)’ before ‘instancetype’ nsterm.h:703: error: expected ‘)’ before ‘instancetype’ nsterm.h:706: error: expected ‘)’ before ‘instancetype’ nsterm.h:710: error: expected ‘)’ before ‘instancetype’ nsterm.h:711: error: expected ‘)’ before ‘instancetype’ nsterm.h:712: error: expected ‘)’ before ‘instancetype’ nsterm.h:735: error: expected ‘)’ before ‘instancetype’ nsterm.m:6900: error: expected ‘)’ before ‘instancetype’ nsterm.m:7630: error: expected ‘)’ before ‘instancetype’ nsterm.m:7655: error: expected ‘)’ before ‘instancetype’ nsterm.m:7681: error: expected ‘)’ before ‘instancetype’ nsterm.m:7909: error: expected ‘)’ before ‘instancetype’ nsterm.m:8261: error: expected ‘)’ before ‘instancetype’ nsterm.m:8345: error: expected ‘)’ before ‘instancetype’ nsterm.m:8353: error: expected ‘)’ before ‘instancetype’ nsterm.m:8408: error: expected ‘)’ before ‘instancetype’ nsterm.m:8487: error: expected ‘)’ before ‘instancetype’ ======== CC nsmenu.o nsmenu.m:1496: error: expected ‘)’ before ‘NSWindowStyleMask’ nsmenu.m: In function ‘-[EmacsDialogPanel initWithContentRect:styleMask:backing:defer:]’: nsmenu.m:1498: warning: conflicting types for ‘-(id)initWithContentRect:(NSRect)contentRect styleMask:(id)aStyle backing:(NSBackingStoreType)backingType defer:(BOOL)flag’ /System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:264: warning: previous declaration of ‘-(id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag’ nsmenu.m:1520: warning: assignment makes pointer from integer without a cast nsmenu.m:1525: warning: passing argument 2 of ‘initWithContentRect:styleMask:backing:defer:’ makes integer from pointer without a cast ======== This is with an LLVM/GCC that came with MacOS 10.6: i686-apple-darwin10-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00) Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I've changed the source back to compile correctly (see patch). It comes down to removing the "instancetype" identifiers and reverting an NSWindowStyleMask to an NSUInteger. I also see this warning when compiling macfont.m: macfont.m: In function ‘mac_font_shape_1’: macfont.m:416: warning: ‘NSLayoutManager’ may not respond to ‘-getGlyphsInRange:glyphs:properties:characterIndexes:bidiLevels:’ macfont.m:416: warning: (Messages without a matching method signature macfont.m:416: warning: will be assumed to return ‘id’ and accept macfont.m:416: warning: ‘...’ as arguments.) (some new arguments were added in the recent changes). But this doesn't seem to affect functionality so I've left that change as is. --------------EDB4F93321314957FC96B288 Content-Type: text/x-patch; name="0001-Fix-NS-build-in-MacOS-10.6.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Fix-NS-build-in-MacOS-10.6.patch" >From e588d3efad0cc410237a78c41af26eca6ca24318 Mon Sep 17 00:00:00 2001 From: Charles A. Roelli Date: Tue, 23 May 2017 20:52:56 +0200 Subject: [PATCH] Fix NS build in MacOS 10.6 --- src/nsimage.m | 8 ++++---- src/nsmenu.m | 12 ++++++------ src/nsterm.h | 38 +++++++++++++++++++------------------- src/nsterm.m | 20 ++++++++++---------- 4 files changed, 39 insertions(+), 39 deletions(-) diff --git a/src/nsimage.m b/src/nsimage.m index fb2322a..8c0cbd5 100644 --- a/src/nsimage.m +++ b/src/nsimage.m @@ -152,7 +152,7 @@ Updated by Christian Limpach (chris@nice.ch) @implementation EmacsImage -+ (instancetype)allocInitFromFile: (Lisp_Object)file ++ allocInitFromFile: (Lisp_Object)file { NSImageRep *imgRep; Lisp_Object found; @@ -197,7 +197,7 @@ - (void)dealloc /* Create image from monochrome bitmap. If both FG and BG are 0 (black), set the background to white and make it transparent. */ -- (instancetype)initFromXBM: (unsigned char *)bits width: (int)w height: (int)h +- initFromXBM: (unsigned char *)bits width: (int)w height: (int)h fg: (unsigned long)fg bg: (unsigned long)bg { unsigned char *planes[5]; @@ -269,7 +269,7 @@ - (instancetype)initFromXBM: (unsigned char *)bits width: (int)w height: (int)h } /* Set color for a bitmap image. */ -- (instancetype)setXBMColor: (NSColor *)color +- setXBMColor: (NSColor *)color { NSSize s = [self size]; unsigned char *planes[5]; @@ -309,7 +309,7 @@ - (instancetype)setXBMColor: (NSColor *)color } -- (instancetype)initForXPMWithDepth: (int)depth width: (int)width height: (int)height +- initForXPMWithDepth: (int)depth width: (int)width height: (int)height { NSSize s = {width, height}; int i; diff --git a/src/nsmenu.m b/src/nsmenu.m index 37a1a62..2847bc6 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m @@ -493,7 +493,7 @@ @implementation EmacsMenu /* override designated initializer */ -- (instancetype)initWithTitle: (NSString *)title +- initWithTitle: (NSString *)title { frame = 0; if ((self = [super initWithTitle: title])) @@ -503,7 +503,7 @@ - (instancetype)initWithTitle: (NSString *)title /* used for top-level */ -- (instancetype)initWithTitle: (NSString *)title frame: (struct frame *)f +- initWithTitle: (NSString *)title frame: (struct frame *)f { [self initWithTitle: title]; frame = f; @@ -1146,7 +1146,7 @@ - (Lisp_Object)runMenuAt: (NSPoint)p forFrame: (struct frame *)f @implementation EmacsToolbar -- (instancetype)initForView: (EmacsView *)view withIdentifier: (NSString *)identifier +- initForView: (EmacsView *)view withIdentifier: (NSString *)identifier { NSTRACE ("[EmacsToolbar initForView: withIdentifier:]"); @@ -1302,7 +1302,7 @@ - (void)setVisible:(BOOL)shown display. */ @implementation EmacsTooltip -- (instancetype)init +- init { NSColor *col = [NSColor colorWithCalibratedRed: 1.0 green: 1.0 blue: 0.792 alpha: 0.95]; @@ -1493,7 +1493,7 @@ @implementation EmacsDialogPanel #define TEXTHEIGHT 20.0 #define MINCELLWIDTH 90.0 -- (instancetype)initWithContentRect: (NSRect)contentRect styleMask: (NSWindowStyleMask)aStyle +- initWithContentRect: (NSRect)contentRect styleMask: (NSUInteger)aStyle backing: (NSBackingStoreType)backingType defer: (BOOL)flag { NSSize spacing = {SPACER, SPACER}; @@ -1697,7 +1697,7 @@ - (void)clicked: sender } -- (instancetype)initFromContents: (Lisp_Object)contents isQuestion: (BOOL)isQ +- initFromContents: (Lisp_Object)contents isQuestion: (BOOL)isQ { Lisp_Object head; [super init]; diff --git a/src/nsterm.h b/src/nsterm.h index 443a40e..63472f2 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -451,16 +451,16 @@ } /* AppKit-side interface */ -- (instancetype)menuDown: (id)sender; -- (instancetype)toolbarClicked: (id)item; -- (instancetype)toggleToolbar: (id)sender; +- menuDown: (id)sender; +- toolbarClicked: (id)item; +- toggleToolbar: (id)sender; - (void)keyDown: (NSEvent *)theEvent; - (void)mouseDown: (NSEvent *)theEvent; - (void)mouseUp: (NSEvent *)theEvent; -- (instancetype)setMiniwindowImage: (BOOL)setMini; +- setMiniwindowImage: (BOOL)setMini; /* Emacs-side interface */ -- (instancetype) initFrameFromEmacs: (struct frame *) f; +- initFrameFromEmacs: (struct frame *) f; - (void) createToolbar: (struct frame *)f; - (void) setRows: (int) r andColumns: (int) c; - (void) setWindowClosing: (BOOL)closing; @@ -520,7 +520,7 @@ unsigned long keyEquivModMask; } -- (instancetype)initWithTitle: (NSString *)title frame: (struct frame *)f; +- initWithTitle: (NSString *)title frame: (struct frame *)f; - (void)setFrame: (struct frame *)f; - (void)menuNeedsUpdate: (NSMenu *)menu; /* (delegate method) */ - (NSString *)parseKeyEquiv: (const char *)key; @@ -554,7 +554,7 @@ NSArray *prevIdentifiers; unsigned long enablement, prevEnablement; } -- (instancetype) initForView: (EmacsView *)view withIdentifier: (NSString *)identifier; +- initForView: (EmacsView *)view withIdentifier: (NSString *)identifier; - (void) clearActive; - (void) clearAll; - (BOOL) changed; @@ -589,7 +589,7 @@ Lisp_Object dialog_return; Lisp_Object *button_values; } -- (instancetype)initFromContents: (Lisp_Object)menu isQuestion: (BOOL)isQ; +- initFromContents: (Lisp_Object)menu isQuestion: (BOOL)isQ; - (void)process_dialog: (Lisp_Object)list; - (void)addButton: (char *)str value: (int)tag row: (int)row; - (void)addString: (char *)str row: (int)row; @@ -608,7 +608,7 @@ NSTextField *textField; NSTimer *timer; } -- (instancetype) init; +- init; - (void) setText: (char *)text; - (void) showAtX: (int)x Y: (int)y for: (int)seconds; - (void) hide; @@ -656,12 +656,12 @@ NSColor *stippleMask; unsigned long xbm_fg; } -+ (instancetype)allocInitFromFile: (Lisp_Object)file; ++ allocInitFromFile: (Lisp_Object)file; - (void)dealloc; -- (instancetype)initFromXBM: (unsigned char *)bits width: (int)w height: (int)h +- initFromXBM: (unsigned char *)bits width: (int)w height: (int)h fg: (unsigned long)fg bg: (unsigned long)bg; -- (instancetype)setXBMColor: (NSColor *)color; -- (instancetype)initForXPMWithDepth: (int)depth width: (int)width height: (int)height; +- setXBMColor: (NSColor *)color; +- initForXPMWithDepth: (int)depth width: (int)width height: (int)height; - (void)setPixmapData; - (unsigned long)getPixelAtX: (int)x Y: (int)y; - (void)setPixelAtX: (int)x Y: (int)y toRed: (unsigned char)r @@ -700,16 +700,16 @@ int em_whole; } -- (instancetype) initFrame: (NSRect )r window: (Lisp_Object)win; +- initFrame: (NSRect )r window: (Lisp_Object)win; - (void)setFrame: (NSRect)r; -- (instancetype) setPosition: (int) position portion: (int) portion whole: (int) whole; +- setPosition: (int) position portion: (int) portion whole: (int) whole; - (int) checkSamePosition: (int)position portion: (int)portion whole: (int)whole; - (void) sendScrollEventAtLoc: (float)loc fromEvent: (NSEvent *)e; -- (instancetype)repeatScroll: (NSTimer *)sender; -- (instancetype)condemn; -- (instancetype)reprieve; +- repeatScroll: (NSTimer *)sender; +- condemn; +- reprieve; - (bool)judge; + (CGFloat)scrollerWidth; @end @@ -732,7 +732,7 @@ unsigned long maxChar, maxGlyph; long i, len; } -- (instancetype)initWithCapacity: (unsigned long) c; +- initWithCapacity: (unsigned long) c; - (void) setString: (NSString *)str font: (NSFont *)font; @end #endif /* NS_IMPL_COCOA */ diff --git a/src/nsterm.m b/src/nsterm.m index e69aa43..b0bb9ec 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -6897,7 +6897,7 @@ This avoids an extra clear and redraw (flicker) at frame creation. */ } -- (instancetype) initFrameFromEmacs: (struct frame *)f +- initFrameFromEmacs: (struct frame *)f { NSRect r, wr; Lisp_Object tem; @@ -7627,7 +7627,7 @@ - (void)mouseExited: (NSEvent *)theEvent } -- (instancetype)menuDown: sender +- menuDown: sender { NSTRACE ("[EmacsView menuDown:]"); if (context_menu_value == -1) @@ -7652,7 +7652,7 @@ - (EmacsToolbar *)toolbar /* this gets called on toolbar button click */ -- (instancetype)toolbarClicked: (id)item +- toolbarClicked: (id)item { NSEvent *theEvent; int idx = [item tag] * TOOL_BAR_ITEM_NSLOTS; @@ -7678,7 +7678,7 @@ - (instancetype)toolbarClicked: (id)item } -- (instancetype)toggleToolbar: (id)sender +- toggleToolbar: (id)sender { NSTRACE ("[EmacsView toggleToolbar:]"); @@ -7906,7 +7906,7 @@ - (BOOL) writeSelectionToPasteboard: (NSPasteboard *)pb types: (NSArray *)types (gives a miniaturized version of the window); currently we use the latter for frames whose active buffer doesn't correspond to any file (e.g., '*scratch*') */ -- (instancetype)setMiniwindowImage: (BOOL) setMini +- setMiniwindowImage: (BOOL) setMini { id image = [[self window] miniwindowImage]; NSTRACE ("[EmacsView setMiniwindowImage:%d]", setMini); @@ -8258,7 +8258,7 @@ + (CGFloat) scrollerWidth return r; } -- (instancetype)initFrame: (NSRect )r window: (Lisp_Object)nwin +- initFrame: (NSRect )r window: (Lisp_Object)nwin { NSTRACE ("[EmacsScroller initFrame: window:]"); @@ -8342,7 +8342,7 @@ - (void)dealloc } -- (instancetype)condemn +- condemn { NSTRACE ("[EmacsScroller condemn]"); condemned =YES; @@ -8350,7 +8350,7 @@ - (instancetype)condemn } -- (instancetype)reprieve +- reprieve { NSTRACE ("[EmacsScroller reprieve]"); condemned =NO; @@ -8405,7 +8405,7 @@ - (int) checkSamePosition: (int) position portion: (int) portion } -- (instancetype)setPosition: (int)position portion: (int)portion whole: (int)whole +- setPosition: (int)position portion: (int)portion whole: (int)whole { NSTRACE ("[EmacsScroller setPosition:portion:whole:]"); @@ -8484,7 +8484,7 @@ - (void) sendScrollEventAtLoc: (float)loc fromEvent: (NSEvent *)e /* called manually thru timer to implement repeated button action w/hold-down */ -- (instancetype)repeatScroll: (NSTimer *)scrollEntry +- repeatScroll: (NSTimer *)scrollEntry { NSEvent *e = [[self window] currentEvent]; NSPoint p = [[self window] mouseLocationOutsideOfEventStream]; -- 1.7.4.4 --------------EDB4F93321314957FC96B288-- From debbugs-submit-bounces@debbugs.gnu.org Tue May 23 15:49:57 2017 Received: (at 27041) by debbugs.gnu.org; 23 May 2017 19:49:57 +0000 Received: from localhost ([127.0.0.1]:35116 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDFob-0002MW-H2 for submit@debbugs.gnu.org; Tue, 23 May 2017 15:49:57 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:35090) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDFoa-0002MK-SM for 27041@debbugs.gnu.org; Tue, 23 May 2017 15:49:57 -0400 Received: by mail-wm0-f53.google.com with SMTP id b84so38203750wmh.0 for <27041@debbugs.gnu.org>; Tue, 23 May 2017 12:49:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=IaN5c6dJNkR88DAlDeAXajXOhxN4PKMHGcx7ffAdCKY=; b=VHiy+0TXPz3u3KmT473SMBw23630mCGpvKUkP5PjYU6+dL9s9GgM+ZfX0o1LOUu5ze mV7hjv07qKc6RIYIeHg38Q8nOLoeS/uIA2GYblc3iB3kQZRNkHoAuwaNrgJjO6zLmIqb 91qrIufahF0tDVxXFfejFrbLkaaZY7ikP0d4XvMbkmZL2gRwuOKvYQfvo7AK7eUuTvhM 1Yt7Wzf3lHYGWR/6dePRA8aa9L8Rj4WpVoEaYTCMwT0F5HPvINgb3DwiHkFYduKBN9Wq zyGpx4w+IfyWeE0pTEgY4xWNr6DU196oPTRMz7IZPCGvlQnzrXQNiNSYvWBwCjo0gvH0 QnlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=IaN5c6dJNkR88DAlDeAXajXOhxN4PKMHGcx7ffAdCKY=; b=ukYTFJ3wXi6VneNSTvzSJJj5VQnt1jKZyorxajwKmpjmEhNSPWDbFLOerd4HKKJqxY sQ4QLIjhr6gnuboV+duvLF+hE8BtcrW0aNWz49WjbPtUE6KghWyAv9kiCKuwm/umGb5L PS4kBjRXALxHkLPvmKTiAmySCG6pqPaySyzaz4m2KJXTwwS8V9frZTaXr375w4xjJMw2 ClPPK0grxvmhzq+3eWP/1GQIOhpZUyMdItVivAhmmETcscrrZX0lRi3wePbwy7v4U4cQ YwMGpJu1H5YuI1pcLJYW7Ev82nPaGdJeojk6OgIAjBAY5lbvTKYJVwyBAX2dqRILGENv ktvA== X-Gm-Message-State: AODbwcAO+JgSFvbcARZRX+aL83IOomZOxv5xFMWTMgqlDev7W2SXRUM7 xeTZwIc4y1QFHEQfORk= X-Received: by 10.28.185.200 with SMTP id j191mr3686116wmf.48.1495568991078; Tue, 23 May 2017 12:49:51 -0700 (PDT) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-1c23-04ca-53b1-12e4.holly.idiocy.org. [2001:8b0:3f8:8129:1c23:4ca:53b1:12e4]) by smtp.gmail.com with ESMTPSA id m191sm2289081wmg.30.2017.05.23.12.49.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 May 2017 12:49:49 -0700 (PDT) Date: Tue, 23 May 2017 20:49:47 +0100 From: Alan Third To: "Charles A. Roelli" Subject: Re: bug#27041: MacOS 10.6: fix NS build Message-ID: <20170523194947.GA59742@breton.holly.idiocy.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.7.2 (2016-11-26) X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 27041 Cc: 27041@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) On Tue, May 23, 2017 at 08:57:04PM +0200, Charles A. Roelli wrote: > I've changed the source back to compile correctly (see patch). It comes > down to > removing the "instancetype" identifiers and reverting an NSWindowStyleMask > to an > NSUInteger. Hi Charles, can you try enabling the two typedefs at ~ line 67 in nsterm.h to see if the first batch of errors go away? I guess it’s possible the second typedef should be an NSUInteger instead of a plain int. I just took a guess and that silenced the errors when building under GNUstep. > I also see this warning when compiling macfont.m: > > macfont.m: In function ‘mac_font_shape_1’: > macfont.m:416: warning: ‘NSLayoutManager’ may not respond to > ‘-getGlyphsInRange:glyphs:properties:characterIndexes:bidiLevels:’ > macfont.m:416: warning: (Messages without a matching method signature > macfont.m:416: warning: will be assumed to return ‘id’ and accept > macfont.m:416: warning: ‘...’ as arguments.) > > (some new arguments were added in the recent changes). But this doesn't > seem to affect functionality so I've left that change as is. Probably we should be using one function for recent macOS’s and another for old ones. Yamamoto san had something to say about it, but I’ve not had a chance to investigate: http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00565.html -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Wed May 24 12:58:53 2017 Received: (at control) by debbugs.gnu.org; 24 May 2017 16:58:53 +0000 Received: from localhost ([127.0.0.1]:36493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDZca-0007Hh-R8 for submit@debbugs.gnu.org; Wed, 24 May 2017 12:58:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47668) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDZcZ-0007HQ-Mf for control@debbugs.gnu.org; Wed, 24 May 2017 12:58:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dDZcT-0006fe-Ku for control@debbugs.gnu.org; Wed, 24 May 2017 12:58:46 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54017) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDZcT-0006fa-HW for control@debbugs.gnu.org; Wed, 24 May 2017 12:58:45 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1dDZcT-0002yf-0E for control@debbugs.gnu.org; Wed, 24 May 2017 12:58:45 -0400 Subject: control message for bug 27059 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Wed, 24 May 2017 12:58:45 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) merge 27041 27059 From debbugs-submit-bounces@debbugs.gnu.org Wed May 24 14:14:16 2017 Received: (at 27041) by debbugs.gnu.org; 24 May 2017 18:14:16 +0000 Received: from localhost ([127.0.0.1]:36565 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDanX-0004MR-Q9 for submit@debbugs.gnu.org; Wed, 24 May 2017 14:14:15 -0400 Received: from sinyavsky.aurox.ch ([37.35.109.145]:53884) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDanW-0004ME-Ff for 27041@debbugs.gnu.org; Wed, 24 May 2017 14:14:14 -0400 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 519F72243E for <27041@debbugs.gnu.org>; Wed, 24 May 2017 18:09:39 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= content-transfer-encoding:content-type:content-type:in-reply-to :mime-version:user-agent:date:date:message-id:from:from :references:to:subject:subject; s=dkim; t=1495649336; x= 1496513337; bh=zIAdLbVXKMa+MAsBiqtARMblNNMTz3Klq1D5GtYM26E=; b=o Sbj/hxlSEtr/5vNE0ph5t4hZTnEemX5VXXuGlSRGsRXolBOwalPhmUIauSZvNjop DMlWdSr6lw723bSFw0xRA8wcDzccO4Hx8XE+CTIDBaLSshTlYqAQ/wz62ISoimN4 7c5ryRUGot8dbtW5vTc0zZx6GKg87veTl/H5JnXZl0= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Ndi6Lcx6dX_2 for <27041@debbugs.gnu.org>; Wed, 24 May 2017 18:08:56 +0000 (UTC) Received: from [192.168.1.121] (179.133.105.92.dynamic.wline.res.cust.swisscom.ch [92.105.133.179]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id 6A7D622423; Wed, 24 May 2017 18:08:56 +0000 (UTC) Subject: Re: bug#27041: MacOS 10.6: fix NS build To: Alan Third References: <20170523194947.GA59742@breton.holly.idiocy.org> From: "Charles A. Roelli" Message-ID: <12b912c7-ef06-cbf1-d957-cc2f4cdac9fc@aurox.ch> Date: Wed, 24 May 2017 20:13:21 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170523194947.GA59742@breton.holly.idiocy.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 27041 Cc: 27041@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Thanks for your help. I changed the conditional to this: #if defined(NS_IMPL_GNUSTEP) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 typedef id instancetype; typedef NSUInteger NSWindowStyleMask; #endif And it compiles fine without my previous changes. Can you verify that this still builds with GNUstep? If not, we can leave the 'int' instead of the 'NSUInteger'. On 23/05/2017 21:49, Alan Third wrote: > On Tue, May 23, 2017 at 08:57:04PM +0200, Charles A. Roelli wrote: >> I've changed the source back to compile correctly (see patch). It comes >> down to >> removing the "instancetype" identifiers and reverting an NSWindowStyleMask >> to an >> NSUInteger. > Hi Charles, can you try enabling the two typedefs at ~ line 67 in > nsterm.h to see if the first batch of errors go away? > > I guess it’s possible the second typedef should be an NSUInteger > instead of a plain int. I just took a guess and that silenced the > errors when building under GNUstep. > >> I also see this warning when compiling macfont.m: >> >> macfont.m: In function ‘mac_font_shape_1’: >> macfont.m:416: warning: ‘NSLayoutManager’ may not respond to >> ‘-getGlyphsInRange:glyphs:properties:characterIndexes:bidiLevels:’ >> macfont.m:416: warning: (Messages without a matching method signature >> macfont.m:416: warning: will be assumed to return ‘id’ and accept >> macfont.m:416: warning: ‘...’ as arguments.) >> >> (some new arguments were added in the recent changes). But this doesn't >> seem to affect functionality so I've left that change as is. > Probably we should be using one function for recent macOS’s and > another for old ones. Yamamoto san had something to say about it, but > I’ve not had a chance to investigate: > > http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00565.html > From debbugs-submit-bounces@debbugs.gnu.org Wed May 24 15:03:45 2017 Received: (at 27041-done) by debbugs.gnu.org; 24 May 2017 19:03:46 +0000 Received: from localhost ([127.0.0.1]:36596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDbZR-0005W1-Md for submit@debbugs.gnu.org; Wed, 24 May 2017 15:03:45 -0400 Received: from mail-wr0-f169.google.com ([209.85.128.169]:33759) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDbZQ-0005Vl-5D for 27041-done@debbugs.gnu.org; Wed, 24 May 2017 15:03:44 -0400 Received: by mail-wr0-f169.google.com with SMTP id w50so60424240wrc.0 for <27041-done@debbugs.gnu.org>; Wed, 24 May 2017 12:03:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=2mSPd3hqoD3z24b4lwNXguR79hVBbNXTRZBvLhcLvoQ=; b=F1rmvjw1/cMFbTXGo5/rvMzdAIk2NS1+UvrhtBogM10df3oxmGUgnjL1s1RvCG+ski SD64/i5myiTjGAn9NDW+fIkFe6y8TMn3bdfzeUz1YhqY5YQDBLoFvPuraNArCiqnRBQV VzJCLpwwTKUM3k3G52GgXrUt2RtPrfpknJ+kW5Nj9eYTngbFgxc0zyhmwzkCbPI8fyKS 1vFBNrR0gAX9wmQZuJHXb5ZGXTeCCTdUMZQySLkwA1hTDXY96gEfM+7zHcgGhqQkooVI qsRc7GbR4lTbgEf3wd/cmJlBZDURqqLxydwLe8cOmi/Smau6ZcIHW4KqhPu5WRB8/2GY U+wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=2mSPd3hqoD3z24b4lwNXguR79hVBbNXTRZBvLhcLvoQ=; b=kbBvcAa0o0TT13JMFd+OPDZvyFxBfe26nD2pKlAp8fkniglmj8RvRXIPSX9okNabxp 53DhoIydhtq8D9V7PXvTRfWVhvWwddwYB/cqb5E6mjERmMnNI+5HgI148yyXCKWMaIeH mmX9YSyFF3Rcj/gSdkzH9W3H/5aT6K0sLfa+GGmbH2x8j7R8g2gu5/roIOC9l1+1BXfQ vtpHwV8VGJa3easnXUZ0VmF73/gIz5/08zLFsHQgJAGmNbC5cnqtVGGjquicZ1D1hRxl b8XCA5YGKLJ6lUZ4b9wHjs5EVrVzpCkhh6Hu4ueWoiJakMTn0p3Mj8bDT64T5HNR1Vfk OTtg== X-Gm-Message-State: AODbwcAgniAs0lRnulvyHV380UldUCxPqzikr1zCyjGKW6GOla/GpNTy AKitLJ0IMB99QA== X-Received: by 10.223.142.50 with SMTP id n47mr20427802wrb.188.1495652617849; Wed, 24 May 2017 12:03:37 -0700 (PDT) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-757d-ca29-5867-b957.holly.idiocy.org. [2001:8b0:3f8:8129:757d:ca29:5867:b957]) by smtp.gmail.com with ESMTPSA id w136sm3627315wmd.13.2017.05.24.12.03.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 May 2017 12:03:36 -0700 (PDT) Date: Wed, 24 May 2017 20:03:34 +0100 From: Alan Third To: "Charles A. Roelli" Subject: Re: bug#27041: MacOS 10.6: fix NS build Message-ID: <20170524190334.GA1018@breton.holly.idiocy.org> References: <20170523194947.GA59742@breton.holly.idiocy.org> <12b912c7-ef06-cbf1-d957-cc2f4cdac9fc@aurox.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <12b912c7-ef06-cbf1-d957-cc2f4cdac9fc@aurox.ch> User-Agent: Mutt/1.7.2 (2016-11-26) X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 27041-done Cc: 27041-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) On Wed, May 24, 2017 at 08:13:21PM +0200, Charles A. Roelli wrote: > Thanks for your help. > > I changed the conditional to this: > > > #if defined(NS_IMPL_GNUSTEP) || MAC_OS_X_VERSION_MAX_ALLOWED < > MAC_OS_X_VERSION_10_7 > typedef id instancetype; > typedef NSUInteger NSWindowStyleMask; > #endif > > > And it compiles fine without my previous changes. Can you verify that this > still builds with GNUstep? If not, we can leave the 'int' instead of the > 'NSUInteger'. It works fine on GNUstep too, so I’ve pushed the change. FWIW, that instancetype type appears to be a built‐in and we should probably be doing some sort of check whether the compiler supports it natively or not. I don’t know how to go about doing that. > > > I also see this warning when compiling macfont.m: > > > > > > macfont.m: In function ‘mac_font_shape_1’: > > > macfont.m:416: warning: ‘NSLayoutManager’ may not respond to > > > ‘-getGlyphsInRange:glyphs:properties:characterIndexes:bidiLevels:’ > > > macfont.m:416: warning: (Messages without a matching method signature > > > macfont.m:416: warning: will be assumed to return ‘id’ and accept > > > macfont.m:416: warning: ‘...’ as arguments.) > > > > > > (some new arguments were added in the recent changes). But this doesn't > > > seem to affect functionality so I've left that change as is. This warning doesn’t make much sense to me. I’ve looked up the documentation and the new method being used has allegedly been available since macOS 10.5. https://developer.apple.com/reference/appkit/nslayoutmanager/1403104-getglyphsinrange I guess if it’s working we can just ignore it. -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Wed May 24 22:16:14 2017 Received: (at 27041) by debbugs.gnu.org; 25 May 2017 02:16:14 +0000 Received: from localhost ([127.0.0.1]:36756 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDiJy-00008c-KK for submit@debbugs.gnu.org; Wed, 24 May 2017 22:16:14 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:33167) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDiJx-00008B-3O for 27041@debbugs.gnu.org; Wed, 24 May 2017 22:16:13 -0400 Received: by mail-io0-f196.google.com with SMTP id m4so19812179ioe.0 for <27041@debbugs.gnu.org>; Wed, 24 May 2017 19:16:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=w0kzl3XoPqJjtjzeNHjMBPn5QL5Co6z1JOhpgMt9p/E=; b=kbf4ewezrUtjhPa8njS7hD6AGHofBfya1mJCM6/C0+eVTZKFOWeybgV66w6vBuoQvZ WiDpEtpOvVDpSW808l2E6cm33V9YqB2apXYKiYLy44boHrcUhFtedm/RhFAR0zILHH1g 9AOw9wEiJoR6E1w5TgFNAbKWEX5hso4mfLa3AiRZzU2XKn8uwX61Bd/iP+6zS7/m7bLi 1W7QWymZeIbGg1C7cCXqF/1LntTAdfzm9w3YBj3ozizYCCPllkFSxvuzBXnbATQT0a6b 0Pn9UTUCJY2q3H86ftZFYikKLVmlFN8AADAd/jZeshsAGZ4vAzffbxm4NiFtxDC627LH 52RA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version :content-transfer-encoding; bh=w0kzl3XoPqJjtjzeNHjMBPn5QL5Co6z1JOhpgMt9p/E=; b=NWmSxZVmo56UMvchRQmJ8icgNG/fyAN8Ys5lyRJFC0Zhbm8vXiUGheNQm2etbsoK71 ShTR5G6L5GB9Opv0KXdl3b1Kequh5ON4XuftMu8QrDENjX82mGsvPb0LvuPEiKNX/QEP I3nTBVmGx+g9WfFDB6mQZGhcGoaafbdMSDI7IqqsAb/KQFPmqD80uzpeYL45XWKrAkkx HOSzlAYmG7kt9mZu4YMLYumzY9RuflMP1DI4ON3O6OgYAY/jzRwsKo2Ph9bmpuvcC22z J6LqoofacR/EiopeyiQQ6S2nRNjmLpiE1bST1z546oMjZoP/HUHJ58FUKqnoq4mIYRAU nXpQ== X-Gm-Message-State: AODbwcDJV85dPqd4ZDHez4wuMXAn7F1QIDEAwx8XUwpj+XVoxjz8Byfr k1SaMGgIXastrg== X-Received: by 10.107.170.16 with SMTP id t16mr34543526ioe.113.1495678567264; Wed, 24 May 2017 19:16:07 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id z85sm2715603ita.3.2017.05.24.19.16.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 May 2017 19:16:06 -0700 (PDT) From: npostavs@users.sourceforge.net To: 27041@debbugs.gnu.org Subject: Re: bug#27041: MacOS 10.6: fix NS build References: <20170524190334.GA1018@breton.holly.idiocy.org> Date: Wed, 24 May 2017 22:17:44 -0400 In-Reply-To: (GNU bug Tracking System's message of "Wed, 24 May 2017 19:04:02 +0000") Message-ID: <87shjt65o7.fsf_-_@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 27041 Cc: Alan Third , "Charles A. Roelli" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) > FWIW, that instancetype type appears to be a built=E2=80=90in and we shou= ld > probably be doing some sort of check whether the compiler supports it > natively or not. I don=E2=80=99t know how to go about doing that. I think you should add something like this to configure.ac: AC_CACHE_CHECK([if the Objective C compiler supports instancetype], emacs= _cv_objc_instancetype, AC_LANG_PUSH([Objective C]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[- (instancetype) foo: () {return s= elf;}]])], emacs_cv_objc_instancetype=3Dyes, emacs_cv_objc_insta= ncetype=3Dno) AC_LANG_POP([Objective C])) if test x$emacs_cv_objc_exceptions =3D xyes ; then AC_DEFINE(NATIVE_OBJC_INSTANCETYPE, 1, [Define if ObjC compiler supports instancetype natively.]) fi Probably you have to fix the code I put inside AC_LANG_PROGRAM([[...]]), I don't know Objective C at all. From debbugs-submit-bounces@debbugs.gnu.org Thu May 25 14:46:54 2017 Received: (at 27041) by debbugs.gnu.org; 25 May 2017 18:46:54 +0000 Received: from localhost ([127.0.0.1]:38074 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDxme-0000Ze-MO for submit@debbugs.gnu.org; Thu, 25 May 2017 14:46:54 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:34818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDxmY-0000ZJ-Jf for 27041@debbugs.gnu.org; Thu, 25 May 2017 14:46:51 -0400 Received: by mail-wm0-f66.google.com with SMTP id g15so35516949wmc.2 for <27041@debbugs.gnu.org>; Thu, 25 May 2017 11:46:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=9Y/AaEoEJg+icBzOjP9AM2mcalHGC407X4SrXzo+Ryo=; b=VfmbIDvQthnaF7TYSPU6HQYQ+KXZGHRuvoLLGnYiWTtpIaVrBG+qfvOLkbZSVf/AQX zZjXJYxoLVm6joVvSsWkvCS2QjJfpozPqJHHN7U2GuxhKp2BnHvYu4yzpI9J1l2Eg3uf epGzYZsnyeZeBDF/HRPrLCgAlsj12vOnqp3sdB0bfc5GV1+U2/SqYm82hFFJV9Aw/0Mf jMgPgtsbsHgJjFMVdhffEbma4E1hYiml9uqZJCVLqDL0UrW3MXHyMBxG+6DEO97aR51A 3ojksgbt0kYL3MvFmtRwjo1PUGGZ+Lj6Cdr6sdeY6zllHP7sitQHFtYNc/O/fLSzLgT5 Z2mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=9Y/AaEoEJg+icBzOjP9AM2mcalHGC407X4SrXzo+Ryo=; b=q7Dbe1RhAKWuuTbwSgCljXgygeRVuf/wUwaH+4l9LGvGcbaTcFjZr/oyr+pzqJYbRK ti/tQnF8Tm5pagMP1R8NrzVcUA/9PTgAfw6TrWT1fXdVjvMzC2YXalGe0vUT92qCvkXA +6uVrMCAK9cVe5eu0AWbxlBfrozBHu2BeG39/cGsu+rmaUFWuTHvwdztjpYtBTb4r+hc BnmSIOzAox62YSrfIrmU2kWSivCoGY2GR4gIROj1Ds8HVq55TcqpW1Cz5FmfG4peDQ9/ EJZp7vTgcI/rcGLfIbMAiKdRHSlwdBNxCbp+3TlShVgGKNoTdRPnOEpnKidNvahGdFZf RwvA== X-Gm-Message-State: AODbwcAi1uinqC28jo2lr+jxClFq711vABATGBo5/6PrEZunJN6Kb5ql M+7GPRJRQ6JpwQ== X-Received: by 10.223.153.109 with SMTP id x100mr849515wrb.190.1495737999520; Thu, 25 May 2017 11:46:39 -0700 (PDT) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-757d-ca29-5867-b957.holly.idiocy.org. [2001:8b0:3f8:8129:757d:ca29:5867:b957]) by smtp.gmail.com with ESMTPSA id g90sm10189094wrd.11.2017.05.25.11.46.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 May 2017 11:46:38 -0700 (PDT) Date: Thu, 25 May 2017 19:46:35 +0100 From: Alan Third To: npostavs@users.sourceforge.net Subject: [PATCH] Check if instancetype supported in ObjC Message-ID: <20170525184635.GA34187@breton.holly.idiocy.org> References: <87shjt65o7.fsf_-_@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87shjt65o7.fsf_-_@users.sourceforge.net> User-Agent: Mutt/1.7.2 (2016-11-26) X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 27041 Cc: 27041@debbugs.gnu.org, "Charles A. Roelli" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) * configure.ac: Add check for instancetype. * src/nsterm.h [!NATIVE_OBJC_INSTANCETYPE]: Define instancetype. --- configure.ac | 17 +++++++++++++++++ src/nsterm.h | 20 +++++++++++--------- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 6d23b5d214..b525666a85 100644 --- a/configure.ac +++ b/configure.ac @@ -1980,6 +1980,23 @@ AC_DEFUN AC_SUBST(NS_OBJ) AC_SUBST(NS_OBJC_OBJ) +AC_CACHE_CHECK( + [if the Objective C compiler supports instancetype], + [emacs_cv_objc_instancetype], + [AC_LANG_PUSH([Objective C]) + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE([[@interface Test + + (instancetype)test; + @end]])], + emacs_cv_objc_instancetype=yes, + emacs_cv_objc_instancetype=no) + AC_LANG_POP([Objective C])]) + +if test x$emacs_cv_objc_instancetype = xyes ; then + AC_DEFINE(NATIVE_OBJC_INSTANCETYPE, 1, + [Define if ObjC compiler supports instancetype natively.]) +fi + HAVE_W32=no W32_OBJ= W32_LIBS= diff --git a/src/nsterm.h b/src/nsterm.h index 8f3d92b353..f75e3759e4 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -62,15 +62,6 @@ typedef CGFloat EmacsCGFloat; typedef float EmacsCGFloat; #endif -/* 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 -typedef id instancetype; -typedef NSUInteger NSWindowStyleMask; -#endif - /* ========================================================================== Trace support @@ -365,6 +356,12 @@ char const * nstrace_fullscreen_type_name (int); #endif +/* If the compiler doesn't support instancetype, map it to id. */ +#ifndef NATIVE_OBJC_INSTANCETYPE +typedef id instancetype; +#endif + + /* ========================================================================== NSColor, EmacsColor category. @@ -1302,6 +1299,11 @@ extern char gnustep_base_version[]; /* version tracking */ #define NSWindowStyleMaskUtilityWindow NSUtilityWindowMask #define NSAlertStyleCritical NSCriticalAlertStyle #define NSControlSizeRegular NSRegularControlSize + +/* And adds NSWindowStyleMask. */ +#ifdef __OBJC__ +typedef NSUInteger NSWindowStyleMask; +#endif #endif #endif /* HAVE_NS */ -- Looks like this does the trick. Thanks Noam! Charles, could you confirm this patch builds on 10.6? -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Thu May 25 19:40:38 2017 Received: (at 27041) by debbugs.gnu.org; 25 May 2017 23:40:38 +0000 Received: from localhost ([127.0.0.1]:38358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dE2Mw-0007Ou-G2 for submit@debbugs.gnu.org; Thu, 25 May 2017 19:40:38 -0400 Received: from mail-it0-f49.google.com ([209.85.214.49]:35199) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dE2Ms-0007Og-L6 for 27041@debbugs.gnu.org; Thu, 25 May 2017 19:40:37 -0400 Received: by mail-it0-f49.google.com with SMTP id c15so65445272ith.0 for <27041@debbugs.gnu.org>; Thu, 25 May 2017 16:40:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=lidOOLoB/iVy23qY579SgpAW0NrLJeyNUsqu/fkdIng=; b=tajWkPYDHycb2j8DonB9JJaDxu7u/PYItepBorhdOdXrx64VRO2QrV+7JfcBwp0tUy aoc9XtybQnuAKIZb2I0bPFA1b/L5BnZLTyJ6tEA5dESYChswWYhGu4BEnWTFiE1WfpA/ KJ3puAETjgyqumuRxGCjn4R8YEWUpFIMIf52/vw1YCVF3m/XFH9WxLWRJZ6gzc/WN5wQ AfvqIGW1EIyOqC6GLQb05VVt+HLSURv3p3zafnAPF/4cgtUAXpUTfYf6Amh4vgXnzKhc G+6BJYiDBg6Xr8poHaOBWGJborN30xNko/KG5QsoBicVgC+LmqSiequgj43PFJgS+PyI gPuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=lidOOLoB/iVy23qY579SgpAW0NrLJeyNUsqu/fkdIng=; b=lWkecdyeHdSILbWEMd4J3aNsZbOTmYl5BvN6BJyxDykGBqfzW+xXu1MDHbq/4vgnZ9 2XcGD6TzxpLnSglmtOK51ke6VEWhvPlvOwBXgnzQtuTSAkkwUbUKdCsyX7Af82REFAyq W5r6FjNYHV1W++DAB0gmznsPTrVItJWN/O0JXQ2Tv/G6EthgrEqYnZ8/RPxmWpcSw/7U kPkB2YbJTLvEoS0PEWG9eUZi3PmVGKDusub/6+Jrxcp2jA4aM+hen4g0022acQBvRd90 FyCVJ8h1xCmxVOVujsAhGBvt1LrPQ3bdDRdy2RZAipcwjDBpzDEhkYI610rig34aYq4Z crUA== X-Gm-Message-State: AODbwcA4RJooasLAJ398vyAYUeHWthp6beC/vRfNrD0XlR8bVBOHIxx7 c8qHNM6AfAvQ3A== X-Received: by 10.36.115.10 with SMTP id y10mr17168449itb.44.1495755628997; Thu, 25 May 2017 16:40:28 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id n14sm3418668itg.0.2017.05.25.16.40.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 May 2017 16:40:28 -0700 (PDT) From: npostavs@users.sourceforge.net To: Alan Third Subject: Re: bug#27041: [PATCH] Check if instancetype supported in ObjC References: <87shjt65o7.fsf_-_@users.sourceforge.net> <20170525184635.GA34187@breton.holly.idiocy.org> Date: Thu, 25 May 2017 19:42:05 -0400 In-Reply-To: <20170525184635.GA34187@breton.holly.idiocy.org> (Alan Third's message of "Thu, 25 May 2017 19:46:35 +0100") Message-ID: <87k2545ws2.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 27041 Cc: 27041@debbugs.gnu.org, "Charles A. Roelli" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) Alan Third writes: > --- a/configure.ac > +++ b/configure.ac > @@ -1980,6 +1980,23 @@ AC_DEFUN > AC_SUBST(NS_OBJ) > AC_SUBST(NS_OBJC_OBJ) > > +AC_CACHE_CHECK( > + [if the Objective C compiler supports instancetype], > + [emacs_cv_objc_instancetype], > + [AC_LANG_PUSH([Objective C]) > + AC_COMPILE_IFELSE( > + [AC_LANG_SOURCE([[@interface Test > + + (instancetype)test; > + @end]])], > + emacs_cv_objc_instancetype=yes, > + emacs_cv_objc_instancetype=no) > + AC_LANG_POP([Objective C])]) > + > +if test x$emacs_cv_objc_instancetype = xyes ; then > + AC_DEFINE(NATIVE_OBJC_INSTANCETYPE, 1, > + [Define if ObjC compiler supports instancetype natively.]) > +fi > + > HAVE_W32=no > W32_OBJ= > W32_LIBS= I guess this should be inside 'if test "${HAVE_NS}" = yes; ...' (although it seems harmless anyway). From debbugs-submit-bounces@debbugs.gnu.org Fri May 26 15:25:14 2017 Received: (at 27041) by debbugs.gnu.org; 26 May 2017 19:25:14 +0000 Received: from localhost ([127.0.0.1]:39597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dEKrK-0004VR-87 for submit@debbugs.gnu.org; Fri, 26 May 2017 15:25:14 -0400 Received: from sinyavsky.aurox.ch ([37.35.109.145]:55518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dEKrI-0004VE-OR for 27041@debbugs.gnu.org; Fri, 26 May 2017 15:25:13 -0400 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 3660C22447 for <27041@debbugs.gnu.org>; Fri, 26 May 2017 19:20:37 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= content-transfer-encoding:content-type:content-type:in-reply-to :mime-version:user-agent:date:date:message-id:from:from :references:to:subject:subject; s=dkim; t=1495826435; x= 1496690436; bh=XH6xcTGbPeamfWETVApLGFrQ6dGyP8OU1+CQVJOS/JU=; b=T VNS9JJ3R3yGWviClAZBoby/r8EyCl6I0K7wn3g6+foP2nb950xKoYYg4YqiVfjLq ag9m59XRebt1687nEMY8hXF8KEsEHs2468DPoUr/zlPqjmqS40m5HMAfLBI/UMy0 u6A9jrPfvZx6Ei34kOt/EJ6OKXwKOJSoKJv2HU2NlU= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ajNIRk84LYAk for <27041@debbugs.gnu.org>; Fri, 26 May 2017 19:20:35 +0000 (UTC) Received: from [192.168.1.121] (179.133.105.92.dynamic.wline.res.cust.swisscom.ch [92.105.133.179]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id 2246B22423; Fri, 26 May 2017 19:20:34 +0000 (UTC) Subject: Re: [PATCH] Check if instancetype supported in ObjC To: Alan Third , npostavs@users.sourceforge.net References: <87shjt65o7.fsf_-_@users.sourceforge.net> <20170525184635.GA34187@breton.holly.idiocy.org> From: "Charles A. Roelli" Message-ID: <681b23ba-fbb7-1e01-e9ea-e87a236df8b4@aurox.ch> Date: Fri, 26 May 2017 21:25:02 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170525184635.GA34187@breton.holly.idiocy.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 27041 Cc: 27041@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) All good. Thanks for the help! On 25/05/2017 20:46, Alan Third wrote: > * configure.ac: Add check for instancetype. > * src/nsterm.h [!NATIVE_OBJC_INSTANCETYPE]: Define instancetype. > --- > configure.ac | 17 +++++++++++++++++ > src/nsterm.h | 20 +++++++++++--------- > 2 files changed, 28 insertions(+), 9 deletions(-) > > diff --git a/configure.ac b/configure.ac > index 6d23b5d214..b525666a85 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -1980,6 +1980,23 @@ AC_DEFUN > AC_SUBST(NS_OBJ) > AC_SUBST(NS_OBJC_OBJ) > > +AC_CACHE_CHECK( > + [if the Objective C compiler supports instancetype], > + [emacs_cv_objc_instancetype], > + [AC_LANG_PUSH([Objective C]) > + AC_COMPILE_IFELSE( > + [AC_LANG_SOURCE([[@interface Test > + + (instancetype)test; > + @end]])], > + emacs_cv_objc_instancetype=yes, > + emacs_cv_objc_instancetype=no) > + AC_LANG_POP([Objective C])]) > + > +if test x$emacs_cv_objc_instancetype = xyes ; then > + AC_DEFINE(NATIVE_OBJC_INSTANCETYPE, 1, > + [Define if ObjC compiler supports instancetype natively.]) > +fi > + > HAVE_W32=no > W32_OBJ= > W32_LIBS= > diff --git a/src/nsterm.h b/src/nsterm.h > index 8f3d92b353..f75e3759e4 100644 > --- a/src/nsterm.h > +++ b/src/nsterm.h > @@ -62,15 +62,6 @@ typedef CGFloat EmacsCGFloat; > typedef float EmacsCGFloat; > #endif > > -/* 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 > -typedef id instancetype; > -typedef NSUInteger NSWindowStyleMask; > -#endif > - > /* ========================================================================== > > Trace support > @@ -365,6 +356,12 @@ char const * nstrace_fullscreen_type_name (int); > #endif > > > +/* If the compiler doesn't support instancetype, map it to id. */ > +#ifndef NATIVE_OBJC_INSTANCETYPE > +typedef id instancetype; > +#endif > + > + > /* ========================================================================== > > NSColor, EmacsColor category. > @@ -1302,6 +1299,11 @@ extern char gnustep_base_version[]; /* version tracking */ > #define NSWindowStyleMaskUtilityWindow NSUtilityWindowMask > #define NSAlertStyleCritical NSCriticalAlertStyle > #define NSControlSizeRegular NSRegularControlSize > + > +/* And adds NSWindowStyleMask. */ > +#ifdef __OBJC__ > +typedef NSUInteger NSWindowStyleMask; > +#endif > #endif > > #endif /* HAVE_NS */ From unknown Sat Jun 21 10:45:52 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 29 Jun 2017 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator