* _GNU_SOURCE and sys/poll.h
@ 2006-01-21 8:51 Thorsten Kukuk
2006-01-21 9:26 ` Ulrich Drepper
0 siblings, 1 reply; 4+ messages in thread
From: Thorsten Kukuk @ 2006-01-21 8:51 UTC (permalink / raw)
To: libc-hacker
[-- Attachment #1: Type: text/plain, Size: 594 bytes --]
Hi,
The following example:
#define _GNU_SOURCE
#include <sys/poll.h>
fails with the latest changes:
In file included from /usr/include/sys/poll.h:32,
from syspoll.c:2:
/usr/include/time.h:120: error: expected specifier-qualifier-list before __time_
Attached a fix for that.
Thorsten
--
Thorsten Kukuk http://www.suse.de/~kukuk/ kukuk@suse.de
SUSE LINUX Products GmbH Maxfeldstr. 5 D-90409 Nuernberg
--------------------------------------------------------------------
Key fingerprint = A368 676B 5E1B 3E46 CFCE 2D97 F8FD 4E23 56C6 FB4B
[-- Attachment #2: glibc-2.3.90-sys_poll.diff --]
[-- Type: text/plain, Size: 460 bytes --]
2006-01-21 Thorsten Kukuk <kukuk@suse.de>
* io/sys/poll.h: Define __need_time_t to get definition
of time_t if __USE_GNU is defined.
--- io/sys/poll.h
+++ io/sys/poll.h 2006/01/21 08:49:35
@@ -27,7 +27,8 @@
#ifdef __USE_GNU
/* Get the __sigset_t definition. */
# include <bits/sigset.h>
-/* Get the timespec definition. */
+/* Get the time_t and timespec definition. */
+# define __need_time_t
# define __need_timespec
# include <time.h>
#endif
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: _GNU_SOURCE and sys/poll.h
2006-01-21 8:51 _GNU_SOURCE and sys/poll.h Thorsten Kukuk
@ 2006-01-21 9:26 ` Ulrich Drepper
2006-01-21 9:42 ` Thorsten Kukuk
0 siblings, 1 reply; 4+ messages in thread
From: Ulrich Drepper @ 2006-01-21 9:26 UTC (permalink / raw)
To: Thorsten Kukuk; +Cc: libc-hacker
[-- Attachment #1: Type: text/plain, Size: 208 bytes --]
Thorsten Kukuk wrote:
> Attached a fix for that.
No. This should not be necessary. <time.h> must be adjusted.
--
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 251 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: _GNU_SOURCE and sys/poll.h
2006-01-21 9:26 ` Ulrich Drepper
@ 2006-01-21 9:42 ` Thorsten Kukuk
2006-01-21 19:34 ` Roland McGrath
0 siblings, 1 reply; 4+ messages in thread
From: Thorsten Kukuk @ 2006-01-21 9:42 UTC (permalink / raw)
To: libc-hacker
On Sat, Jan 21, Ulrich Drepper wrote:
> Thorsten Kukuk wrote:
> > Attached a fix for that.
>
> No. This should not be necessary. <time.h> must be adjusted.
This works for me, too:
2006-01-21 Thorsten Kukuk <kukuk@suse.de>
* time/time.h: declare time_t if __need_timespec is defined.
--- time/time.h
+++ time/time.h 2006/01/21 09:42:09
@@ -66,7 +66,8 @@
#endif /* clock_t not defined and <time.h> or need clock_t. */
#undef __need_clock_t
-#if !defined __time_t_defined && (defined _TIME_H || defined __need_time_t)
+#if !defined __time_t_defined && \
+ (defined _TIME_H || defined __need_time_t || defined __need_timespec)
# define __time_t_defined 1
# include <bits/types.h>
--
Thorsten Kukuk http://www.suse.de/~kukuk/ kukuk@suse.de
SUSE LINUX Products GmbH Maxfeldstr. 5 D-90409 Nuernberg
--------------------------------------------------------------------
Key fingerprint = A368 676B 5E1B 3E46 CFCE 2D97 F8FD 4E23 56C6 FB4B
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: _GNU_SOURCE and sys/poll.h
2006-01-21 9:42 ` Thorsten Kukuk
@ 2006-01-21 19:34 ` Roland McGrath
0 siblings, 0 replies; 4+ messages in thread
From: Roland McGrath @ 2006-01-21 19:34 UTC (permalink / raw)
To: Thorsten Kukuk; +Cc: libc-hacker
I've checked in what should be the right fix.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-01-21 19:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-21 8:51 _GNU_SOURCE and sys/poll.h Thorsten Kukuk
2006-01-21 9:26 ` Ulrich Drepper
2006-01-21 9:42 ` Thorsten Kukuk
2006-01-21 19:34 ` Roland McGrath
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).