Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
i
j
k
l
m
n
p
r
s
t
u
v
w
+
Functions
a
c
d
e
f
g
i
m
n
p
r
s
t
u
v
Variables
Typedefs
Enumerator
+
Classes
Class List
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
+
Enumerator
_
c
d
f
l
m
n
p
s
t
+
Related Functions
a
b
c
m
o
p
r
s
w
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
+
Functions
_
a
b
c
d
e
f
g
i
l
m
o
p
r
s
t
u
v
w
+
Variables
_
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
v
w
Enumerations
Enumerator
+
Macros
_
b
c
d
e
f
i
n
p
s
t
u
v
w
x
y
replace
replace.h
Go to the documentation of this file.
1
/* $Id: replace.h,v 1.3 2008-01-15 01:25:42 rtv Exp $
2
*
3
* replacement function prototypes
4
*/
5
6
#ifndef _REPLACE_H
7
#define _REPLACE_H
8
9
#if HAVE_CONFIG_H
10
#include <config.h>
11
#endif
12
13
/* Compatibility definitions for System V `poll' interface.
14
Copyright (C) 1994,96,97,98,99,2000 Free Software Foundation, Inc.
15
This file is part of the GNU C Library.
16
17
The GNU C Library is free software; you can redistribute it and/or
18
modify it under the terms of the GNU Library General Public License as
19
published by the Free Software Foundation; either version 2 of the
20
License, or (at your option) any later version.
21
22
The GNU C Library is distributed in the hope that it will be useful,
23
but WITHOUT ANY WARRANTY; without even the implied warranty of
24
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25
Library General Public License for more details.
26
27
You should have received a copy of the GNU Library General Public
28
License along with the GNU C Library; see the file COPYING.LIB. If not,
29
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30
Boston, MA 02111-1307, USA. */
31
32
#ifdef __cplusplus
33
extern
"C"
{
34
#endif
35
36
#if !HAVE_POLL
37
/* Event types that can be polled for. These bits may be set in `events'
38
to indicate the interesting event types; they will appear in `revents'
39
to indicate the status of the file descriptor. */
40
#define POLLIN 01
/* There is data to read. */
41
#define POLLPRI 02
/* There is urgent data to read. */
42
#define POLLOUT 04
/* Writing now will not block. */
43
44
/* Some aliases. */
45
#define POLLWRNORM POLLOUT
46
#define POLLRDNORM POLLIN
47
#define POLLRDBAND POLLPRI
48
49
/* Event types always implicitly polled for. These bits need not be set in
50
`events', but they will appear in `revents' to indicate the status of
51
the file descriptor. */
52
#define POLLERR 010
/* Error condition. */
53
#define POLLHUP 020
/* Hung up. */
54
#define POLLNVAL 040
/* Invalid polling request. */
55
56
/* Canonical number of polling requests to read in at a time in poll. */
57
#define NPOLLFILE 30
58
59
/* Data structure describing a polling request. */
60
struct
pollfd
{
61
int
fd
;
/* File descriptor to poll. */
62
short
int
events
;
/* Types of events poller cares about. */
63
short
int
revents
;
/* Types of events that actually occurred. */
64
};
65
66
/* Poll the file descriptors described by the NFDS structures starting at
67
FDS. If TIMEOUT is nonzero and not -1, allow TIMEOUT milliseconds for
68
an event to occur; if TIMEOUT is -1, block until an event occurs.
69
Returns the number of file descriptors with events, zero if timed out,
70
or -1 for errors. */
71
int
poll
(
struct
pollfd
*fds,
unsigned
long
int
nfds,
int
timeout);
72
#else
73
#include <sys/poll.h>
/* for poll(2) */
74
#endif // !HAVE_POLL
75
76
//#if !HAVE_SCANDIR
77
//#include <sys/types.h>
78
//#include <dirent.h>
79
// int scandir(const char *dir, struct dirent ***namelist,
80
// int (*select)(const struct dirent *),
81
// int (*compar)(const struct dirent **, const struct dirent **));
82
//#endif //!HAVE_SCANDIR
83
84
/*
85
86
#if !HAVE_DIRNAME
87
char * dirname (char *path);
88
#else
89
#include <libgen.h> // for dirname(3)
90
#endif // !HAVE_DIRNAME
91
92
#if !HAVE_BASENAME
93
const char * basename (const char* filename);
94
#else
95
#include <libgen.h> // for basename(3)
96
#endif // !HAVE_BASENAME
97
*/
98
99
#ifdef __cplusplus
100
}
101
#endif
102
103
#endif
poll
int poll(struct pollfd *fds, unsigned long int nfds, int timeout)
Definition:
poll.c:43
pollfd
Definition:
replace.h:60
pollfd::fd
int fd
Definition:
replace.h:61
pollfd::events
short int events
Definition:
replace.h:62
pollfd::revents
short int revents
Definition:
replace.h:63
stage
Author(s): Richard Vaughan
, Brian Gerkey
, Reed Hedges
, Andrew Howard
, Toby Collett
, Pooya Karimian
, Jeremy Asher
, Alex Couture-Beil
, Geoff Biggs
, Rich Mattes
, Abbas Sadat
autogenerated on Mon Feb 28 2022 23:48:56