From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Bob Halley Newsgroups: gmane.emacs.devel Subject: unexmacosx.c and limits.h problem Date: Fri, 16 Sep 2016 16:04:44 -0700 Message-ID: <17A5977B-7474-4740-BEC7-CFF27E57FC73@play-bow.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 10.0 \(3226\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1474070241 30605 195.159.176.226 (16 Sep 2016 23:57:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 16 Sep 2016 23:57:21 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 17 01:57:17 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bl30M-00071G-Qt for ged-emacs-devel@m.gmane.org; Sat, 17 Sep 2016 01:57:14 +0200 Original-Received: from localhost ([::1]:44245 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bl30K-0006CT-Ee for ged-emacs-devel@m.gmane.org; Fri, 16 Sep 2016 19:57:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47512) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bl2Ce-0000vP-42 for emacs-devel@gnu.org; Fri, 16 Sep 2016 19:05:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bl2Ca-0004Bf-UJ for emacs-devel@gnu.org; Fri, 16 Sep 2016 19:05:52 -0400 Original-Received: from mail-pf0-f181.google.com ([209.85.192.181]:34390) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bl2Ca-0004BG-O4 for emacs-devel@gnu.org; Fri, 16 Sep 2016 19:05:48 -0400 Original-Received: by mail-pf0-f181.google.com with SMTP id p64so31425892pfb.1 for ; Fri, 16 Sep 2016 16:05:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=play-bow.org; s=google; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=kikeLfjymiwgaMjdbnDdr+6iL0fYYLn47YwIwcI8Lto=; b=B/+xMZiWWqvtmUT76daUgaOrMVzn8Nl9GpWLI4sS8i4cR60ecQFzztNKur6StGq9r8 Yik3r2bBc1Dvjs9Gl4VYx/IjbR7fo7GiTobslShTT+MaH3djWV/rMDlMgv4fw5Ty1VRM +RFAQ1zqeMZ89S1Z2+leHBZztEjwF/ACSwKkA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=kikeLfjymiwgaMjdbnDdr+6iL0fYYLn47YwIwcI8Lto=; b=Cl8XavVwAekwUHD4f7UGTj0oW0RcJHhy82ueuGHayG98EwBqhE57mm6vNL3WMcCgGr JuBwJOOcKY0fgc3MFMkGfSNx4066x+yBfvKXwwCHKLcCljvQPXlpJDtE7lh9r5/KdsgZ wGcI3cZSZKYRscLE/f6VTtpr7lep4tdERbyjfAxdmDEaiiRSUFidzzfptwqevpspmjpJ VAX+Zjlc899YVNgWOk5E/M0xSMDhP9gktBnwPA3wS5ciAJOm6Lw0lc2VPT/qDypNR0n2 Wjgpydd2TpM6/TSzBNl2iGrA3DlYTsItd5GJIT3VpHytKddJq+tXyExUKbxRQMwo6obl udpQ== X-Gm-Message-State: AE9vXwMvQmsTcqWkMSVp/KuFtJX8MSbH7tBMVwwwfgNV1FCQCdY5s6INnFFIA0nb/Nbemw== X-Received: by 10.98.200.4 with SMTP id z4mr16213725pff.95.1474067087249; Fri, 16 Sep 2016 16:04:47 -0700 (PDT) Original-Received: from ?IPv6:2602:30a:2ce4:c900:2c4c:a1e4:a511:c555? ([2602:30a:2ce4:c900:2c4c:a1e4:a511:c555]) by smtp.gmail.com with ESMTPSA id bx9sm14451385pab.17.2016.09.16.16.04.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Sep 2016 16:04:46 -0700 (PDT) X-Mailer: Apple Mail (2.3226) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.192.181 X-Mailman-Approved-At: Fri, 16 Sep 2016 19:56:40 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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:207470 Archived-At: Note that I build with -with-wide-int in my ./configure, which is likely = relevant here. The recent changes to generate limits.h on the master branch run because = my platform (MacOS Sierra) does not define things like ULLONG_WIDTH). Most of the C source compiles, but unexmacosx.c fails with: In file included from unexmacosx.c:100: ./lisp.h:93:26: error: use of undeclared identifier 'LLONG_WIDTH' enum { EMACS_INT_WIDTH =3D LLONG_WIDTH }; ^ ./lisp.h:119:29: error: use of undeclared identifier 'SIZE_WIDTH' enum { BITS_PER_BITS_WORD =3D SIZE_WIDTH }; ^ And a bunch more related errors, all because those limits.h constants = are not defined. Analysis reveals that while the generated ../lib/limits.h is indeed = read, it does NOT define LLONG_WIDTH, etc. The reason for this is that #if (! defined ULLONG_WIDTH = \ && (defined _GNU_SOURCE || defined = __STDC_WANT_IEC_60559_BFP_EXT__)) is false, because neither _GNU_SOURCE nor = __STDC_WANT_IEC_60559_BFP_EXT__ are defined. The reason other code works is because it #include which = defines it before including , but unexmacosx.c includes = before including for reasons it describes, and = this causes to get included as well. My fix was: diff --git a/src/unexmacosx.c b/src/unexmacosx.c index bdacc8b..4dd35fb 100644 --- a/src/unexmacosx.c +++ b/src/unexmacosx.c @@ -90,6 +90,9 @@ along with GNU Emacs. If not, see = . */ with the #define:s in place, the prototypes will be wrong and we get warnings. To prevent that, include stdlib.h before config.h. */ =20 +#ifndef _GNU_SOURCE +#define _GNU_SOURCE 1 +#endif #include #include #undef malloc Regards, /Bob