@@ -15,8 +15,11 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#ifndef _SYS_POLL_H
-# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
+#ifndef _BITS_POLL_H
+#define _BITS_POLL_H 1
+
+#ifndef _POLL_H
+# error "Never use <bits/poll.h> directly; include <poll.h> instead."
#endif
/* Event types that can be polled for. These bits may be set in `events'
@@ -40,3 +43,5 @@
#define POLLERR 010 /* Error condition. */
#define POLLHUP 020 /* Hung up. */
#define POLLNVAL 040 /* Invalid polling request. */
+
+#endif /* bits/poll.h */
@@ -1 +1,11 @@
-#include <include/sys/poll.h>
+#ifndef _POLL_H
+# include <io/poll.h>
+
+#ifndef _ISOMAC
+extern int __poll (struct pollfd *__fds, unsigned long int __nfds,
+ int __timeout);
+libc_hidden_proto (__poll)
+libc_hidden_proto (ppoll)
+#endif
+
+#endif
@@ -1,11 +1,3 @@
-#ifndef _SYS_POLL_H
+#ifndef _POLL_H
# include <io/sys/poll.h>
-
-#ifndef _ISOMAC
-extern int __poll (struct pollfd *__fds, unsigned long int __nfds,
- int __timeout);
-libc_hidden_proto (__poll)
-libc_hidden_proto (ppoll)
-#endif
-
#endif
@@ -16,8 +16,11 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#ifndef _SYS_POLL_H
-# error "Never include <bits/poll2.h> directly; use <sys/poll.h> instead."
+#ifndef _BITS_POLL2_H
+#define _BITS_POLL2_H 1
+
+#ifndef _POLL_H
+# error "Never include <bits/poll2.h> directly; use <poll.h> instead."
#endif
@@ -79,3 +82,5 @@ ppoll (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout,
#endif
__END_DECLS
+
+#endif /* bits/poll2.h */
similarity index 95%
copy from io/sys/poll.h
copy to io/poll.h
@@ -1,4 +1,4 @@
-/* Compatibility definitions for System V `poll' interface.
+/* System V `poll' interface.
Copyright (C) 1994-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -16,8 +16,8 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#ifndef _SYS_POLL_H
-#define _SYS_POLL_H 1
+#ifndef _POLL_H
+#define _POLL_H 1
#include <features.h>
dissimilarity index 99%
@@ -?,? +1,3 @@
+#ifndef _POLL_H
+# include <poll.h>
+#endif
@@ -530,7 +530,6 @@ HEADER_ALLOWED_INCLUDES = {
"glob.h": [ "sys/cdefs.h" ],
"langinfo.h": [ "nl_types.h" ],
"mqueue.h": [ "fcntl.h", "sys/types.h" ],
- "poll.h": [ "sys/poll.h" ],
"pthread.h": [ "endian.h", "sched.h", "time.h",
"sys/cdefs.h" ],
"regex.h": [ "limits.h", "sys/types.h" ],
@@ -633,12 +632,12 @@ HEADER_ALLOWED_INCLUDES = {
# the included header did not exist or didn't provide all the
# necessary definitions.
"memory.h": [ "string.h" ],
- "poll.h": [ "sys/poll.h" ],
"re_comp.h": [ "regex.h" ],
"sys/bitypes.h": [ "sys/types.h" ],
"sys/dir.h": [ "dirent.h" ],
"sys/errno.h": [ "errno.h" ],
"sys/fcntl.h": [ "fcntl.h" ],
+ "sys/poll.h": [ "poll.h" ],
"sys/signal.h": [ "signal.h" ],
"sys/syslog.h": [ "syslog.h" ],
"sys/termios.h": [ "termios.h" ],
@@ -15,8 +15,11 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#ifndef _SYS_POLL_H
-# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
+#ifndef _BITS_POLL_H
+#define _BITS_POLL_H 1
+
+#ifndef _POLL_H
+# error "Never use <bits/poll.h> directly; include <poll.h> instead."
#endif
/* Event types that can be polled for. These bits may be set in `events'
@@ -47,3 +50,5 @@
#define POLLERR 0x008 /* Error condition. */
#define POLLHUP 0x010 /* Hung up. */
#define POLLNVAL 0x020 /* Invalid polling request. */
+
+#endif /* bits/poll.h */
@@ -15,8 +15,11 @@
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
-#ifndef _SYS_POLL_H
-# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
+#ifndef _BITS_POLL_H
+#define _BITS_POLL_H 1
+
+#ifndef _POLL_H
+# error "Never use <bits/poll.h> directly; include <poll.h> instead."
#endif
/* Event types that can be polled for. These bits may be set in `events'
@@ -47,3 +50,5 @@
#define POLLERR 0x008 /* Error condition. */
#define POLLHUP 0x010 /* Hung up. */
#define POLLNVAL 0x020 /* Invalid polling request. */
+
+#endif /* bits/poll.h */
@@ -15,8 +15,11 @@
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
-#ifndef _SYS_POLL_H
-# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
+#ifndef _BITS_POLL_H
+#define _BITS_POLL_H 1
+
+#ifndef _POLL_H
+# error "Never use <bits/poll.h> directly; include <poll.h> instead."
#endif
/* Event types that can be polled for. These bits may be set in `events'
@@ -47,3 +50,5 @@
#define POLLERR 0x008 /* Error condition. */
#define POLLHUP 0x010 /* Hung up. */
#define POLLNVAL 0x020 /* Invalid polling request. */
+
+#endif /* bits/poll.h */
@@ -15,8 +15,11 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#ifndef _SYS_POLL_H
-# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
+#ifndef _BITS_POLL_H
+#define _BITS_POLL_H 1
+
+#ifndef _POLL_H
+# error "Never use <bits/poll.h> directly; include <poll.h> instead."
#endif
/* Event types that can be polled for. These bits may be set in `events'
@@ -47,3 +50,5 @@
#define POLLERR 0x008 /* Error condition. */
#define POLLHUP 0x010 /* Hung up. */
#define POLLNVAL 0x020 /* Invalid polling request. */
+
+#endif /* bits/poll.h */