22 char *ssh_get_progname(
char *);
23 int seed_from_prngd(
unsigned char *,
size_t);
26 #define setsid() setpgrp(0, getpid())
30 int setenv(
const char *,
const char *,
int);
34 int setlogin(
const char *);
38 int innetgr(
const char *,
const char *,
const char *,
const char *);
41 #if !defined(HAVE_SETEUID) && defined(HAVE_SETREUID)
45 #if !defined(HAVE_SETEGID) && defined(HAVE_SETRESGID)
49 #if !defined(HAVE_STRERROR) && defined(HAVE_SYS_ERRLIST) && defined(HAVE_SYS_NERR)
50 const char *strerror(
int);
53 #if !defined(HAVE_SETLINEBUF)
54 #define setlinebuf(a) (setvbuf((a), NULL, _IOLBF, 0))
58 #ifndef HAVE_STRUCT_TIMEVAL
65 int utimes(
char *,
struct timeval *);
69 # define AT_FDCWD (-2)
73 int fchmodat(
int,
const char *, mode_t,
int);
77 int fchownat(
int,
const char *, uid_t, gid_t,
int);
81 int truncate (
const char *, off_t);
84 #ifndef HAVE_STRUCT_TIMESPEC
91 #if !defined(HAVE_NANOSLEEP) && !defined(HAVE_NSLEEP)
93 int nanosleep(
const struct timespec *,
struct timespec *);
96 #ifndef HAVE_UTIMENSAT
99 # ifndef AT_SYMLINK_NOFOLLOW
100 # define AT_SYMLINK_NOFOLLOW 0x80000000
102 int utimensat(
int,
const char *,
const struct timespec[2],
int);
106 int usleep(
unsigned int useconds);
109 #ifndef HAVE_TCGETPGRP
110 pid_t tcgetpgrp(
int);
113 #ifndef HAVE_TCSENDBREAK
114 int tcsendbreak(
int,
int);
117 #ifndef HAVE_UNSETENV
118 int unsetenv(
const char *);
126 pid_t getpgid(pid_t);
130 int pselect(
int, fd_set *, fd_set *, fd_set *,
const struct timespec *,
134 #ifndef HAVE_ENDGRENT
135 # define endgrent() do { } while(0)
138 #ifndef HAVE_KRB5_GET_ERROR_MESSAGE
139 # define krb5_get_error_message krb5_get_err_text
142 #ifndef HAVE_KRB5_FREE_ERROR_MESSAGE
143 # define krb5_free_error_message(a,b) do { } while(0)
147 int pledge(
const char *promises,
const char *paths[]);
152 void err(
int,
const char *, ...) __attribute__((format(printf, 2, 3)));
155 void errx(
int,
const char *, ...) __attribute__((format(printf, 2, 3)));
158 void warn(
const char *, ...) __attribute__((format(printf, 1, 2)));
162 long long llabs(
long long);
165 #if defined(HAVE_DECL_BZERO) && HAVE_DECL_BZERO == 0
166 void bzero(
void *,
size_t);
178 # define LOCK_SH 0x01
179 # define LOCK_EX 0x02
180 # define LOCK_NB 0x04
181 # define LOCK_UN 0x08
185 #ifdef FFLUSH_NULL_BUG
186 # define fflush(x) (_ssh_compat_fflush(x))
189 #ifndef HAVE_LOCALTIME_R
190 struct tm *localtime_r(
const time_t *,
struct tm *);
193 #ifndef HAVE_REALPATH
194 #define realpath(x, y) (sftp_realpath((x), (y)))