Bug 31456 - x11-proto/xproto-7.0.19: configure check for poll.h
Summary: x11-proto/xproto-7.0.19: configure check for poll.h
Status: RESOLVED INVALID
Alias: None
Product: xorg
Classification: Unclassified
Component: Protocol/Core (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Interix
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard: 2011BRB_Reviewed
Keywords: patch
Depends on:
Blocks:
 
Reported: 2010-11-08 00:07 UTC by Markus Duft
Modified: 2018-06-12 19:09 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
xproto poll.h lookup (1.36 KB, patch)
2010-11-08 00:07 UTC, Markus Duft
no flags Details | Splinter Review

Description Markus Duft 2010-11-08 00:07:46 UTC
Created attachment 40112 [details] [review]
xproto poll.h lookup

For some (admittedly weird) platforms (interix in this example :)), sys/poll.h does not exist, but poll.h does. i created a patch for the xproto package in gentoo prefix to add a check for poll. is this applicable for you?
Comment 1 Julien Cristau 2010-11-08 05:31:59 UTC
Review of attachment 40112 [details] [review]:

Looks sane enough.  Should we even prefer <poll.h> over <sys/poll.h> if both are there?
Comment 2 Markus Duft 2010-11-08 05:44:33 UTC
(In reply to comment #1)
> Review of attachment 40112 [details] [review]:
> 
> Looks sane enough.  Should we even prefer <poll.h> over <sys/poll.h> if both
> are there?

hmm.. on my gentoo linux box, poll.h includes sys/poll.h, so that'd be ok. some other boxes i looked at:

Gentoo Linux (current):         poll.h includes sys/poll.h
HPPA HP-UX B.11.11:             likewise
HPPA + IA64 HP-UX B.11.31:      likewise
AIX 5.3:                        likewise
SunOS 5.10 i386 + sparc:        likewise
Interix (SFU 3.5, SUA 5.2-6.1): no sys/poll.h, poll.h is the one and only.

also, according to opengroup at [1], poll.h is known, but sys/poll.h is not in the specification. i wonder why sys/poll.h is so popular (seeing the same issue over and over again ;))

[1] http://www.opengroup.org/onlinepubs/009695399/basedefs/poll.h.html
Comment 3 Jesse Adkins 2010-11-14 23:40:33 UTC
Whomever takes this : You might want to have a look at #9537, which has a patch for autodetecting sys/select.h.
Comment 4 Markus Duft 2010-11-14 23:49:29 UTC
(In reply to comment #3)
> Whomever takes this : You might want to have a look at #9537, which has a patch
> for autodetecting sys/select.h.

is such a check really applicable? i intentionally did _not_ do such a check, as i don't want to force each and every package using xproto to do the check too (to have HAVE_POLL_H/HAVE_SYS_POLL_H defined). i rather chose to AC_SUBST the correct header, as is this will not force any changes on other packages.
Comment 5 Jeremy Huddleston Sequoia 2011-10-06 12:27:52 UTC
Why were we using sys/poll.h in the first place?  POSIX requires it to be in 
<poll.h>

I think the correct fix is just:

#else /* USE_POLL */
-#include <sys/poll.h>
+#include <poll.h>
 #endif /* USE_POLL */

Am I missing something?
Comment 6 Adam Jackson 2018-06-12 19:09:08 UTC
Mass closure: This bug has been untouched for more than six years, and is not
obviously still valid. Please reopen this bug or file a new report if you continue to experience issues with current releases.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.