1/* -*- buffer-read-only: t -*- vi: set ro: */
2/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3#line 1
4/* Substitute for <sys/select.h>.
5   Copyright (C) 2007-2010 Free Software Foundation, Inc.
6
7   This program is free software; you can redistribute it and/or modify
8   it under the terms of the GNU General Public License as published by
9   the Free Software Foundation; either version 3, or (at your option)
10   any later version.
11
12   This program is distributed in the hope that it will be useful,
13   but WITHOUT ANY WARRANTY; without even the implied warranty of
14   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   GNU General Public License for more details.
16
17   You should have received a copy of the GNU General Public License
18   along with this program; if not, write to the Free Software Foundation,
19   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
20
21# if __GNUC__ >= 3
22@PRAGMA_SYSTEM_HEADER@
23# endif
24
25/* On OSF/1, <sys/types.h> and <sys/time.h> include <sys/select.h>.
26   Simply delegate to the system's header in this case.  */
27#if @HAVE_SYS_SELECT_H@ && defined __osf__ && (defined _SYS_TYPES_H_ && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H) && defined _OSF_SOURCE
28
29# define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H
30# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@
31
32#elif @HAVE_SYS_SELECT_H@ && defined __osf__ && (defined _SYS_TIME_H_ && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H) && defined _OSF_SOURCE
33
34# define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H
35# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@
36
37#else
38
39#ifndef _GL_SYS_SELECT_H
40
41#if @HAVE_SYS_SELECT_H@
42
43/* On many platforms, <sys/select.h> assumes prior inclusion of
44   <sys/types.h>.  */
45# include <sys/types.h>
46
47/* On OSF/1 4.0, <sys/select.h> provides only a forward declaration
48   of 'struct timeval', and no definition of this type.
49   But avoid namespace pollution on glibc systems.  */
50# ifndef __GLIBC__
51#  include <sys/time.h>
52# endif
53
54/* On Solaris 10, <sys/select.h> provides an FD_ZERO implementation
55   that relies on memset(), but without including <string.h>.
56   But avoid namespace pollution on glibc systems.  */
57# ifndef __GLIBC__
58#  include <string.h>
59# endif
60
61/* The include_next requires a split double-inclusion guard.  */
62# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@
63
64#endif
65
66#ifndef _GL_SYS_SELECT_H
67#define _GL_SYS_SELECT_H
68
69#if !@HAVE_SYS_SELECT_H@
70
71/* A platform that lacks <sys/select.h>.  */
72
73# include <sys/socket.h>
74
75/* The definition of GL_LINK_WARNING is copied here.  */
76
77# ifdef __cplusplus
78extern "C" {
79# endif
80
81# if @GNULIB_SELECT@
82#  if @HAVE_WINSOCK2_H@ || @REPLACE_SELECT@
83#   undef select
84#   define select rpl_select
85extern int rpl_select (int, fd_set *, fd_set *, fd_set *, struct timeval *);
86#  endif
87# elif @HAVE_WINSOCK2_H@
88#  undef select
89#  define select select_used_without_requesting_gnulib_module_select
90# elif defined GNULIB_POSIXCHECK
91#  undef select
92#  define select(n,r,w,e,t) \
93     (GL_LINK_WARNING ("select is not always POSIX compliant - " \
94                       "use gnulib module select for portability"), \
95      select (n, r, w, e, t))
96# endif
97
98# ifdef __cplusplus
99}
100# endif
101
102#endif
103
104#endif /* _GL_SYS_SELECT_H */
105#endif /* _GL_SYS_SELECT_H */
106#endif /* OSF/1 */
107