From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Error: unknown type name ‘pthread_attr_t’ in signal.h
Date: Mon, 16 Oct 2017 09:20:00 -0000 [thread overview]
Message-ID: <20171016092024.GE16436@calimero.vinschen.de> (raw)
In-Reply-To: <CAH8yC8=eY+bFd=t_4-UKFk+JnfamzQspzxFVpRdVT571LjBERQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2436 bytes --]
On Oct 16 03:12, Jeffrey Walton wrote:
> Hi Everyone,
>
> I'm trying to build Emacs on Cygwin. I use the platform as a test bed
> because of Newlib. Emacs is failing with:
>
> gcc -DHAVE_CONFIG_H -I. -I../lib -I../src -I../src
> -I/usr/local/include -DNDEBUG -pthread -D_XOPEN_SOURCE=600 -m64 -MT
> close-stream.o -MD -MP -MF .deps/close-stream.Tpo -c -o close-stream.o
> close-stream.c
> In file included from /usr/include/sys/signal.h:22:0,
> from /usr/include/signal.h:6,
> from ./signal.h:52,
> from ./sys/select.h:107,
> from /usr/include/sys/time.h:47,
> from ./sys/time.h:39,
> from ./sys/select.h:86,
> from /usr/include/sys/types.h:68,
> from ./sys/types.h:28,
> from ./fcntl.h:50,
> from binary-io.h:23,
> from binary-io.c:3:
> /usr/include/cygwin/signal.h:175:3: error: unknown type name ‘pthread_attr_t’
> pthread_attr_t *sigev_notify_attributes; /* notification attributes */
> ^~~~~~~~~~~~~~
>
> Examining /usr/include/cygwin/signal.h around 175, I see:
>
> typedef struct sigevent
> {
> sigval_t sigev_value; /* signal value */
> int sigev_signo; /* signal number */
> int sigev_notify; /* notification type */
> void (*sigev_notify_function) (sigval_t); /* notification function */
> pthread_attr_t *sigev_notify_attributes; /* notification attributes */
> } sigevent_t;
>
> But I don't see an include for the pthread gear in the signal.h header file.
That's right, but that's usually not a problem because the pthread
types are included via sys/types.h. That means, a simple testcase
like
#include <signal.h>
main(){}
isn't sufficient to trigger the above, neither with nor without
-D_XOPEN_SOURCE=600. And there's the fact that emacs is part
of the Cygwin distro, so it seems you're using a non-standard
setting somewhere.
We could add #include sys/_pthreadtypes.h to cygwin/signal.h
unconditioanlly, but it would be interesting to know how the
above include chain works, and why sys/_pthreadtypes.h isn't
picked up.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2017-10-16 9:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-16 7:12 Jeffrey Walton
2017-10-16 8:39 ` Jeffrey Walton
2017-10-16 8:55 ` Marco Atzeri
2017-10-16 9:20 ` Corinna Vinschen [this message]
2017-10-16 14:59 ` Ken Brown
2017-10-17 22:36 ` Jeffrey Walton
2017-10-18 10:13 ` Corinna Vinschen
2017-10-18 11:52 ` Ken Brown
2017-10-18 14:11 ` Corinna Vinschen
2017-10-18 14:19 ` Ken Brown
2017-10-18 14:42 ` Yaakov Selkowitz
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=20171016092024.GE16436@calimero.vinschen.de \
--to=corinna-cygwin@cygwin.com \
--cc=cygwin@cygwin.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).