#2037 closed enhancement (fixed)
Please add <sys/poll.h>
Reported by: | mjw | Owned by: | axeld |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | System/libroot.so | Version: | R1/pre-alpha1 |
Keywords: | Cc: | nielx | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
This may be a bit controversial, but I'll give it a go anyway...
Most documentation for poll() states that programs using poll() should #include <poll.h>. However, this rule seems to be more honoured in the breech than the observance, with a lot of 3rd party code #including <sys/poll.h>. Haiku does not have <sys/poll.h>, so 3rd party code that #includes <sys/poll.h> needs to be modified to compile.
Posix OSs that I have seen (Linux, Solaris and NetBSD) have the main poll() header in <sys/poll.h>. <poll.h> either #includes, or is a symbolic link to, <sys/poll.h>.
I have attached a patch that makes Haiku emulate Linux/Solaris semantics: <poll.h> #includes <sys/poll.h>. This patch should not break existing Haiku/BeOS software, and will allow 3rd party apps to be ported with less modifications.
Any chance of it being applied?
Attachments (1)
Change History (7)
by , 17 years ago
Attachment: | sys_poll.patch added |
---|
comment:1 by , 17 years ago
comment:2 by , 17 years ago
Cc: | added |
---|
comment:3 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
poll.h is a POSIX header, while sys/poll.h is not. I would always prefer to fix broken software which is not POSIX conformant for no reason. Anyway, I've added a sys/poll.h header in hrev24864 that includes the POSIX poll.h header now. If that isn't okay for you, please tell.
comment:6 by , 17 years ago
Considering this is not standard POSIX, I agree with Axel that the tool needs to be fixed. I will try to work it in.
N.
I'd like to second this. Also python assumes it is in sys/poll.h.