From: Eli Zaretskii <eliz@gnu.org>
To: Claudio Bley <claudio.bley@googlemail.com>
Cc: emacs-devel@gnu.org
Subject: Re: build fails with new MinGW wchar.h
Date: Thu, 21 Nov 2013 19:36:41 +0200 [thread overview]
Message-ID: <83a9gxejx2.fsf@gnu.org> (raw)
In-Reply-To: <8738mq4360.wl%claudio.bley@gmail.com>
> Date: Thu, 21 Nov 2013 08:36:23 +0100
> From: Claudio Bley <claudio.bley@googlemail.com>
> Cc: emacs-devel@gnu.org
>
> > > +# define _WSTAT_DEFINED
> >
> > We cannot define this symbol without also declaring the structures
> > guarded by it in the MinGW headers. We should add them, and then
> > define _WSTAT_DEFINED.
>
> Why? Since those declarations are not used anyway, what's the point in
> defining them in the first place?
They are not currently used in Emacs, that's true, but they _are_ used
in wchar.h, which defines inline functions that reference members of
these structs. That's why you got error messages in the first place.
> Furthermore, this define actually does not guard declarations of any
> structures, but only guards declarations of the functions:
>
> _wstat
> _wstat32
> _wstat64
> _wstat32i64
> _wstat64i32
It guards both, because some of these functions are inline and use the
struct.
> IMO, since none of those functions is used in Emacs' code base, we're
> already set.
That would work for now, but is fragile: the moment the current
arrangement changes a bit (e.g., we start using wchar_t functions in
the Windows build), the problem will raise its ugly head again. We
should play by the rules, and define these symbols only if everything
they guard is indeed defined/declared.
next prev parent reply other threads:[~2013-11-21 17:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-20 7:24 build fails with new MinGW wchar.h Claudio Bley
2013-11-20 18:15 ` Eli Zaretskii
2013-11-21 7:36 ` Claudio Bley
2013-11-21 17:36 ` Eli Zaretskii [this message]
2014-01-11 14:50 ` Eli Zaretskii
2014-01-14 10:28 ` Claudio Bley
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=83a9gxejx2.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=claudio.bley@googlemail.com \
--cc=emacs-devel@gnu.org \
/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.