projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
maint: update copyright
[gnulib.git]
/
lib
/
pipe-filter-aux.h
diff --git
a/lib/pipe-filter-aux.h
b/lib/pipe-filter-aux.h
index
4964431
..
c3f1be8
100644
(file)
--- a/
lib/pipe-filter-aux.h
+++ b/
lib/pipe-filter-aux.h
@@
-1,5
+1,5
@@
/* Auxiliary code for filtering of data through a subprocess.
/* Auxiliary code for filtering of data through a subprocess.
- Copyright (C) 2001-2003, 2008-20
09
Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2008-20
14
Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2009.
This program is free software: you can redistribute it and/or modify
Written by Bruno Haible <haible@clisp.cons.org>, 2009.
This program is free software: you can redistribute it and/or modify
@@
-15,6
+15,13
@@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef PIPE_FILTER_AUX_INLINE
+# define PIPE_FILTER_AUX_INLINE _GL_INLINE
+#endif
#ifndef SSIZE_MAX
# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
#ifndef SSIZE_MAX
# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
@@
-39,7
+46,7
@@
These functions can return -1/EINTR even though we don't have any
signal handlers set up, namely when we get interrupted via SIGSTOP. */
These functions can return -1/EINTR even though we don't have any
signal handlers set up, namely when we get interrupted via SIGSTOP. */
-
static inline
int
+
PIPE_FILTER_AUX_INLINE
int
nonintr_close (int fd)
{
int retval;
nonintr_close (int fd)
{
int retval;
@@
-53,7
+60,7
@@
nonintr_close (int fd)
#undef close /* avoid warning related to gnulib module unistd */
#define close nonintr_close
#undef close /* avoid warning related to gnulib module unistd */
#define close nonintr_close
-
static inline
ssize_t
+
PIPE_FILTER_AUX_INLINE
ssize_t
nonintr_read (int fd, void *buf, size_t count)
{
ssize_t retval;
nonintr_read (int fd, void *buf, size_t count)
{
ssize_t retval;
@@
-66,7
+73,7
@@
nonintr_read (int fd, void *buf, size_t count)
}
#define read nonintr_read
}
#define read nonintr_read
-
static inline
ssize_t
+
PIPE_FILTER_AUX_INLINE
ssize_t
nonintr_write (int fd, const void *buf, size_t count)
{
ssize_t retval;
nonintr_write (int fd, const void *buf, size_t count)
{
ssize_t retval;
@@
-82,9
+89,9
@@
nonintr_write (int fd, const void *buf, size_t count)
# if HAVE_SELECT
# if HAVE_SELECT
-
static inline
int
+
PIPE_FILTER_AUX_INLINE
int
nonintr_select (int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
nonintr_select (int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
- struct timeval *timeout)
+
struct timeval *timeout)
{
int retval;
{
int retval;
@@
-102,9
+109,6
@@
nonintr_select (int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
#endif
/* Non-blocking I/O. */
#endif
/* Non-blocking I/O. */
-#ifndef O_NONBLOCK
-# define O_NONBLOCK O_NDELAY
-#endif
#if HAVE_SELECT
# define IS_EAGAIN(errcode) 0
#else
#if HAVE_SELECT
# define IS_EAGAIN(errcode) 0
#else
@@
-114,3
+118,5
@@
nonintr_select (int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
# define IS_EAGAIN(errcode) ((errcode) == EAGAIN)
# endif
#endif
# define IS_EAGAIN(errcode) ((errcode) == EAGAIN)
# endif
#endif
+
+_GL_INLINE_HEADER_END