From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Richard Copley Newsgroups: gmane.emacs.devel Subject: Re: Unbreak build on macOS Date: Tue, 9 Jul 2019 14:51:16 +0100 Message-ID: References: <55EE5431-8EC2-4562-8F75-33151A0F086E@acm.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000006c019d058d3fdcf6" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="156850"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Paul Eggert , Emacs developers To: =?UTF-8?Q?Mattias_Engdeg=C3=A5rd?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 09 15:51:56 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hkqXB-000eZx-Sc for ged-emacs-devel@m.gmane.org; Tue, 09 Jul 2019 15:51:54 +0200 Original-Received: from localhost ([::1]:50206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkqXA-0002Z9-Tu for ged-emacs-devel@m.gmane.org; Tue, 09 Jul 2019 09:51:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50194) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkqX4-0002VS-WC for emacs-devel@gnu.org; Tue, 09 Jul 2019 09:51:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkqX3-0004pm-RL for emacs-devel@gnu.org; Tue, 09 Jul 2019 09:51:46 -0400 Original-Received: from mail-ot1-x331.google.com ([2607:f8b0:4864:20::331]:46046) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hkqX3-0004nw-Lt for emacs-devel@gnu.org; Tue, 09 Jul 2019 09:51:45 -0400 Original-Received: by mail-ot1-x331.google.com with SMTP id x21so19951797otq.12 for ; Tue, 09 Jul 2019 06:51:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wrkFQCqqhWhPaxlbZcQWmVttqlQb3L8EcXgc+AFoLO4=; b=EB/pn2I076Ahf9SjZGmikGvi3xtGc+NxSytKtpn9N195ty7H7NGL7XNc4SiTrzfiWZ oUGRVa1wmht8Ef93LNeISLjwR7lYuWYbTc7+0WVMWbyZrRDUjb8T98dBDQcS4H01HBjt blSduNlv8H92Zc13sAaNYlSFLBDkwFtuukT8zHWUeCAswHmGj1bz0XXx2T0cxxRDNd+T VEVe8V+oqrrffhwvBmUl9a9YwRG3fUbrzrgm4pvMLCFtuNT4IXdNk+ZYOFjvdYwvi3UA IloLj9+mPGpadoeZLqQQsHTCkWfk7dZBzlPv7pjHlUETy4ajjMhOvbIpjSQN841DbKbj ibuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wrkFQCqqhWhPaxlbZcQWmVttqlQb3L8EcXgc+AFoLO4=; b=lO3vM4QlHtgzzyjvpsaqRsLRj7RJM/cvRpxl8if/NSDA0b6R+sD+FrF0HnrmIACveo ckkl5DAWHrdWxOAX0lN740trMj7YXUlgLEjGnUD1sM1cz11LuKuu69bV1XDl5Kk6komM JoHXWNFMymxn6jADtRc5qyL/3Z28BUywyvEl83ERYu7K/XQMmCERPHuG95Zt7r9Jqxhu SkH1c/NTe+8WaxzZz9vgcl68VI+uDQN2fPdAdqymT30geppUNGQYRPcmey/tuNGcHahp c8qx2x+j7thRIwhkh3DB0y4/Lqk4syq+IWeFg+6rV2LkackkXvQngvi36dBAQ7UAn3x1 cJdw== X-Gm-Message-State: APjAAAXTC8zWvFVmjtWx4jTujAbJZrmp4sVR2g5929S/ufCbKJwxMzTs +9Ll8e2xnjgR0Ey3O3a3Q2swY91szJB5n/XMYhA= X-Google-Smtp-Source: APXvYqzVAcdiqCgPne2EXwHQ1uH10GDYsOVPE95h/quXG1e4ZPlvzsnVKfDsksXc01oUA+rVUQ+6wcDMsmgrMDldFPU= X-Received: by 2002:a9d:77c2:: with SMTP id w2mr9203664otl.192.1562680304073; Tue, 09 Jul 2019 06:51:44 -0700 (PDT) In-Reply-To: <55EE5431-8EC2-4562-8F75-33151A0F086E@acm.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::331 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:238442 Archived-At: --0000000000006c019d058d3fdcf6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 9 Jul 2019 at 12:44, Mattias Engdeg=C3=A5rd wrot= e: > On macOS, lib/fcntl.h does > > # define open rpl_open > > which now (f8ab90839f) gets included in src/font.c and breaks the line > > font_object =3D driver_list->driver->open (f, entity, psize); > > As an immediate remedy, I added > > #undef open > > to src/font.c. > > In general, '#define open' is a rather unpleasant thing to do. Can we at > least assume enough of C99 to do > > #define open(...) rpl_open (__VA_ARGS__) > > instead? That would permit font.c to use bracketing as an alternative > countermeasure. > The build is currently (as of Mattias' fdea0e602b) broken on MS Windows. I didn't check which recent revision introduced the breakage; possibly also f8ab90839f. make[1]: Entering directory '/c/projects/emacs/src' CC font.o font.c: In function 'font_open_entity': font.c:2909:40: error: 'const struct font_driver' has no member named 'open= ' font_object =3D driver_list->driver->open (f, entity, psize); ^~ --0000000000006c019d058d3fdcf6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, 9 Jul 2019 at 12:44, Mattias Engdeg=C3=A5rd <mattiase@acm.org> wrote:
On macOS, lib/fcntl.h does

#=C2=A0 =C2=A0define open rpl_open

which now (f8ab90839f) gets included in src/font.c and breaks the line

=C2=A0 =C2=A0 =C2=A0 font_object =3D driver_list->driver->open (f, en= tity, psize);

As an immediate remedy, I added

#undef open

to src/font.c.

In general, '#define open' is a rather unpleasant thing to do. Can = we at least assume enough of C99 to do

#define open(...) rpl_open (__VA_ARGS__)

instead? That would permit font.c to use bracketing as an alternative count= ermeasure.

The build is currently (as o= f Mattias' fdea0e602b) broken on MS Windows. I didn't
che= ck which recent revision introduced the breakage; possibly also f8ab90839f.=

make[1]: Entering directory '/c/projects/= emacs/src'
=C2=A0 CC =C2=A0 =C2=A0 =C2=A0 font.o
font.c: In funct= ion 'font_open_entity':
font.c:2909:40: error: 'const struct= font_driver' has no member named 'open'
=C2=A0 =C2=A0 =C2= =A0 =C2=A0font_object =3D driver_list->driver->open (f, entity, psize= );
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^~

--0000000000006c019d058d3fdcf6--