1022
/* Write at most BUFSIZE bytes from BUF into FD, starting at OFFSET.
1023
Return the number of bytes written if successful, otherwise
1024
set errno and return -1. 0 indicates nothing written. See the
1025
POSIX:2001 specification
1026
<http://www.opengroup.org/susv3xsh/pwrite.html>. */
1027
# if @REPLACE_PWRITE@
1028
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1029
# define pwrite rpl_pwrite
1031
_GL_FUNCDECL_RPL (pwrite, ssize_t,
1032
(int fd, const void *buf, size_t bufsize, off_t offset)
1033
_GL_ARG_NONNULL ((2)));
1034
_GL_CXXALIAS_RPL (pwrite, ssize_t,
1035
(int fd, const void *buf, size_t bufsize, off_t offset));
1038
_GL_FUNCDECL_SYS (pwrite, ssize_t,
1039
(int fd, const void *buf, size_t bufsize, off_t offset)
1040
_GL_ARG_NONNULL ((2)));
1042
_GL_CXXALIAS_SYS (pwrite, ssize_t,
1043
(int fd, const void *buf, size_t bufsize, off_t offset));
1045
_GL_CXXALIASWARN (pwrite);
1046
#elif defined GNULIB_POSIXCHECK
1048
# if HAVE_RAW_DECL_PWRITE
1049
_GL_WARN_ON_USE (pwrite, "pwrite is unportable - "
1050
"use gnulib module pwrite for portability");
1021
1055
#if @GNULIB_READLINK@
1022
1056
/* Read the contents of the symbolic link FILE and place the first BUFSIZE
1023
1057
bytes of it into BUF. Return the number of bytes placed into BUF if
1166
1200
#if @GNULIB_TTYNAME_R@
1167
1201
/* Store at most BUFLEN characters of the pathname of the terminal FD is
1168
1202
open on in BUF. Return 0 on success, otherwise an error number. */
1169
# if !@HAVE_TTYNAME_R@
1203
# if @REPLACE_TTYNAME_R@
1204
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1206
# define ttyname_r rpl_ttyname_r
1208
_GL_FUNCDECL_RPL (ttyname_r, int,
1209
(int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2)));
1210
_GL_CXXALIAS_RPL (ttyname_r, int,
1211
(int fd, char *buf, size_t buflen));
1213
# if !@HAVE_TTYNAME_R@
1170
1214
_GL_FUNCDECL_SYS (ttyname_r, int,
1171
1215
(int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2)));
1173
1217
_GL_CXXALIAS_SYS (ttyname_r, int,
1174
1218
(int fd, char *buf, size_t buflen));
1175
1220
_GL_CXXALIASWARN (ttyname_r);
1176
1221
#elif defined GNULIB_POSIXCHECK
1177
1222
# undef ttyname_r