From: Eli Zaretskii <eliz@gnu.org>
To: Richard Copley <rcopley@gmail.com>
Cc: halley@play-bow.org, eggert@cs.ucla.edu, emacs-devel@gnu.org
Subject: Re: unexmacosx.c and limits.h problem
Date: Sat, 17 Sep 2016 14:51:22 +0300 [thread overview]
Message-ID: <83a8f64udh.fsf@gnu.org> (raw)
In-Reply-To: <CAPM58ogCbUSXdayzCsSZo7JDEMokzuOrJw-bQfnOBE3diJ0HXw@mail.gmail.com> (message from Richard Copley on Sat, 17 Sep 2016 12:31:36 +0100)
> From: Richard Copley <rcopley@gmail.com>
> Date: Sat, 17 Sep 2016 12:31:36 +0100
> Cc: Paul Eggert <eggert@cs.ucla.edu>, Bob Halley <halley@play-bow.org>,
> Emacs Development <emacs-devel@gnu.org>
>
> >>> >> +#ifndef _GNU_SOURCE
> >>> >> +#define _GNU_SOURCE 1
> >>> >> +#endif
> >>> >
> >>> >
> >>> > Thanks, I installed that into Emacs master.
> >>>
> >>> The Windows build is broken too (with MSYS2), presumably for a similar
> >>> reason.
> >>
> >> It isn't broken here. Can you show the error messages?
> >
> > Sure, give me a few minutes. Did you reconfigure? You need the
> > generated limits.h.
>
> Also, this is with 64-bit GCC 6.1.0.
>
> In file included from G:/emacs/repo/emacs/src/w32.c:87:0:
> G:/emacs/repo/emacs/src/lisp.h:93:26: error: 'LLONG_WIDTH' undeclared
> here (not in a function)
> enum { EMACS_INT_WIDTH = LLONG_WIDTH };
> ^~~~~~~~~~~
>
> In file included from G:/emacs/repo/emacs/src/w32proc.c:54:0:
> G:/emacs/repo/emacs/src/lisp.h:93:26: error: 'LLONG_WIDTH' undeclared
> here (not in a function)
> enum { EMACS_INT_WIDTH = LLONG_WIDTH };
> ^~~~~~~~~~~
I don't understand how this could happen. Take w32proc.c, for
example: it includes config.h _before_ lisp.h, and on my system
config.h has these:
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif
[...]
/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
# define __STDC_WANT_IEC_60559_BFP_EXT__ 1
#endif
So by the time limits.h gets included (via lib/stdint.h, which is
included by nt/inc/stdint.h, which is included by nt/inc/ms-w32.h),
both _GNU_SOURCE and __STDC_WANT_IEC_60559_BFP_EXT__ are already
defined, and the definitions of LLONG_WIDTH in lib/limits.h should
have been processed.
Which part(s) of this don't work on your system, and why?
To find out what happens during preprocessing, I did this:
cd src
make w32proc.o -W w32proc.c V=1
Then I copied the command displayed by Make, replaced -c with -E,
appended "-o w32proc.ii", ran the command, and looked inside
w32proc.ii to see how the preprocessor included the various headers
and defined the macros.
(My GCC version is 5.3.0, and this is a 32-bit build with wide ints.)
next prev parent reply other threads:[~2016-09-17 11:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-16 23:04 unexmacosx.c and limits.h problem Bob Halley
2016-09-17 1:02 ` Paul Eggert
2016-09-17 11:03 ` Richard Copley
2016-09-17 11:18 ` Eli Zaretskii
2016-09-17 11:28 ` Richard Copley
2016-09-17 11:31 ` Richard Copley
2016-09-17 11:51 ` Eli Zaretskii [this message]
2016-09-17 12:28 ` Richard Copley
2016-09-17 12:40 ` Richard Copley
2016-09-17 12:56 ` Richard Copley
2016-09-17 13:38 ` Eli Zaretskii
2016-09-17 18:14 ` Paul Eggert
2016-09-17 12:41 ` Eli Zaretskii
2016-09-17 12:46 ` Richard Copley
2016-09-17 11:34 ` Eli Zaretskii
2016-09-17 11:38 ` Richard Copley
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=83a8f64udh.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
--cc=halley@play-bow.org \
--cc=rcopley@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 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.