Mercurial > hg > octave-jordi > gnulib-hg
annotate lib/poll.in.h @ 13761:a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define also PRAGMA_COLUMNS.
* lib/arpa_inet.in.h: Use PRAGMA_COLUMNS.
* lib/ctype.in.h: Likewise.
* lib/dirent.in.h: Likewise.
* lib/errno.in.h: Likewise.
* lib/fcntl.in.h: Likewise.
* lib/float.in.h: Likewise.
* lib/getopt.in.h: Likewise.
* lib/iconv.in.h: Likewise.
* lib/inttypes.in.h: Likewise.
* lib/langinfo.in.h: Likewise.
* lib/locale.in.h: Likewise.
* lib/math.in.h: Likewise.
* lib/netdb.in.h: Likewise.
* lib/netinet_in.in.h: Likewise.
* lib/poll.in.h: Likewise.
* lib/pthread.in.h: Likewise.
* lib/pty.in.h: Likewise.
* lib/sched.in.h: Likewise.
* lib/se-selinux.in.h: Likewise.
* lib/search.in.h: Likewise.
* lib/signal.in.h: Likewise.
* lib/spawn.in.h: Likewise.
* lib/stdarg.in.h: Likewise.
* lib/stddef.in.h: Likewise.
* lib/stdint.in.h: Likewise.
* lib/stdio.in.h: Likewise.
* lib/stdlib.in.h: Likewise.
* lib/string.in.h: Likewise.
* lib/strings.in.h: Likewise.
* lib/sys_file.in.h: Likewise.
* lib/sys_ioctl.in.h: Likewise.
* lib/sys_select.in.h: Likewise.
* lib/sys_socket.in.h: Likewise.
* lib/sys_stat.in.h: Likewise.
* lib/sys_time.in.h: Likewise.
* lib/sys_times.in.h: Likewise.
* lib/sys_utsname.in.h: Likewise.
* lib/sys_wait.in.h: Likewise.
* lib/sysexits.in.h: Likewise.
* lib/termios.in.h: Likewise.
* lib/time.in.h: Likewise.
* lib/unistd.in.h: Likewise.
* lib/wchar.in.h: Likewise.
* lib/wctype.in.h: Likewise.
* modules/arpa_inet (Makefile.am): Substitute PRAGMA_COLUMNS.
* modules/ctype (Makefile.am): Likewise.
* modules/dirent (Makefile.am): Likewise.
* modules/errno (Makefile.am): Likewise.
* modules/fcntl-h (Makefile.am): Likewise.
* modules/float (Makefile.am): Likewise.
* modules/getopt-posix (Makefile.am): Likewise.
* modules/iconv-h (Makefile.am): Likewise.
* modules/inttypes (Makefile.am): Likewise.
* modules/langinfo (Makefile.am): Likewise.
* modules/locale (Makefile.am): Likewise.
* modules/math (Makefile.am): Likewise.
* modules/netdb (Makefile.am): Likewise.
* modules/netinet_in (Makefile.am): Likewise.
* modules/poll-h (Makefile.am): Likewise.
* modules/pthread (Makefile.am): Likewise.
* modules/pty (Makefile.am): Likewise.
* modules/sched (Makefile.am): Likewise.
* modules/search (Makefile.am): Likewise.
* modules/selinux-h (Makefile.am): Likewise.
* modules/signal (Makefile.am): Likewise.
* modules/spawn (Makefile.am): Likewise.
* modules/stdarg (Makefile.am): Likewise.
* modules/stddef (Makefile.am): Likewise.
* modules/stdint (Makefile.am): Likewise.
* modules/stdio (Makefile.am): Likewise.
* modules/stdlib (Makefile.am): Likewise.
* modules/string (Makefile.am): Likewise.
* modules/strings (Makefile.am): Likewise.
* modules/sys_file (Makefile.am): Likewise.
* modules/sys_ioctl (Makefile.am): Likewise.
* modules/sys_select (Makefile.am): Likewise.
* modules/sys_socket (Makefile.am): Likewise.
* modules/sys_stat (Makefile.am): Likewise.
* modules/sys_time (Makefile.am): Likewise.
* modules/sys_times (Makefile.am): Likewise.
* modules/sys_utsname (Makefile.am): Likewise.
* modules/sys_wait (Makefile.am): Likewise.
* modules/sysexits (Makefile.am): Likewise.
* modules/termios (Makefile.am): Likewise.
* modules/time (Makefile.am): Likewise.
* modules/unistd (Makefile.am): Likewise.
* modules/wchar (Makefile.am): Likewise.
* modules/wctype (Makefile.am): Likewise.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Mon, 04 Oct 2010 23:35:51 +0200 |
parents | 39e9b3545aed |
children | 97fc9a21a8fb |
rev | line source |
---|---|
9257 | 1 /* Header for poll(2) emulation |
2 Contributed by Paolo Bonzini. | |
3 | |
12559
c2cbabec01dd
update nearly all FSF copyright year lists to include 2010
Jim Meyering <meyering@redhat.com>
parents:
12518
diff
changeset
|
4 Copyright 2001, 2002, 2003, 2007, 2009, 2010 Free Software Foundation, Inc. |
9257 | 5 |
6 This file is part of gnulib. | |
7 | |
8 This program is free software; you can redistribute it and/or modify | |
9 it under the terms of the GNU General Public License as published by | |
10 the Free Software Foundation; either version 2, or (at your option) | |
11 any later version. | |
12 | |
13 This program is distributed in the hope that it will be useful, | |
14 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 GNU General Public License for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License along | |
19 with this program; if not, write to the Free Software Foundation, | |
20 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ | |
21 | |
22 #ifndef _GL_POLL_H | |
13740
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
23 |
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
24 #if __GNUC__ >= 3 |
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
25 @PRAGMA_SYSTEM_HEADER@ |
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
26 #endif |
13761
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13740
diff
changeset
|
27 @PRAGMA_COLUMNS@ |
13740
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
28 |
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
29 /* The include_next requires a split double-inclusion guard. */ |
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
30 #if @HAVE_POLL_H@ |
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
31 # @INCLUDE_NEXT@ @NEXT_POLL_H@ |
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
32 #endif |
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
33 |
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
34 #ifndef _GL_POLL_H |
9257 | 35 #define _GL_POLL_H |
36 | |
13736 | 37 |
38 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ | |
39 | |
40 /* The definition of _GL_WARN_ON_USE is copied here. */ | |
41 | |
42 | |
13740
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
43 #if !@HAVE_POLL_H@ |
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
44 |
9257 | 45 /* fake a poll(2) environment */ |
13740
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
46 # define POLLIN 0x0001 /* any readable data available */ |
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
47 # define POLLPRI 0x0002 /* OOB/Urgent readable data */ |
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
48 # define POLLOUT 0x0004 /* file descriptor is writeable */ |
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
49 # define POLLERR 0x0008 /* some poll error occurred */ |
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
50 # define POLLHUP 0x0010 /* file descriptor was "hung up" */ |
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
51 # define POLLNVAL 0x0020 /* requested events "invalid" */ |
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
52 # define POLLRDNORM 0x0040 |
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
53 # define POLLRDBAND 0x0080 |
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
54 # define POLLWRNORM 0x0100 |
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
55 # define POLLWRBAND 0x0200 |
9257 | 56 |
57 struct pollfd | |
58 { | |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
9257
diff
changeset
|
59 int fd; /* which file descriptor to poll */ |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
9257
diff
changeset
|
60 short events; /* events we are interested in */ |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
9257
diff
changeset
|
61 short revents; /* events found on return */ |
9257 | 62 }; |
63 | |
64 typedef unsigned long nfds_t; | |
65 | |
13740
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
66 /* Define INFTIM only if doing so conforms to POSIX. */ |
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
67 # if !defined (_POSIX_C_SOURCE) && !defined (_XOPEN_SOURCE) |
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
68 # define INFTIM (-1) |
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
69 # endif |
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
70 |
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
71 #endif |
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
72 |
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
73 |
13736 | 74 #if @GNULIB_POLL@ |
75 # if @REPLACE_POLL@ | |
76 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
77 # undef poll | |
78 # define poll rpl_poll | |
79 # endif | |
80 _GL_FUNCDECL_RPL (poll, int, (struct pollfd *pfd, nfds_t nfd, int timeout)); | |
81 _GL_CXXALIAS_RPL (poll, int, (struct pollfd *pfd, nfds_t nfd, int timeout)); | |
82 # else | |
83 # if !@HAVE_POLL@ | |
84 _GL_FUNCDECL_SYS (poll, int, (struct pollfd *pfd, nfds_t nfd, int timeout)); | |
85 # endif | |
86 _GL_CXXALIAS_SYS (poll, int, (struct pollfd *pfd, nfds_t nfd, int timeout)); | |
87 # endif | |
88 _GL_CXXALIASWARN (poll); | |
89 #elif defined GNULIB_POSIXCHECK | |
90 # undef poll | |
91 # if HAVE_RAW_DECL_POLL | |
92 _GL_WARN_ON_USE (poll, "poll is unportable - " | |
93 "use gnulib module poll for portability"); | |
94 # endif | |
95 #endif | |
9257 | 96 |
13736 | 97 |
9257 | 98 #endif /* _GL_POLL_H */ |
13740
39e9b3545aed
poll-h: Create poll.h on all platforms.
Bruno Haible <bruno@clisp.org>
parents:
13736
diff
changeset
|
99 #endif /* _GL_POLL_H */ |