22 char *ssh_get_progname(
char *);
25 #define setsid() setpgrp(0, getpid())
29 int setenv(
const char *,
const char *,
int);
33 int setlogin(
const char *);
37 int innetgr(
const char *,
const char *,
const char *,
const char *);
40 #if !defined(HAVE_SETEUID) && defined(HAVE_SETREUID)
44 #if !defined(HAVE_SETEGID) && defined(HAVE_SETRESGID)
48 #if !defined(HAVE_STRERROR) && defined(HAVE_SYS_ERRLIST) && defined(HAVE_SYS_NERR)
49 const char *strerror(
int);
52 #if !defined(HAVE_SETLINEBUF)
53 #define setlinebuf(a) (setvbuf((a), NULL, _IOLBF, 0))
57 #ifndef HAVE_STRUCT_TIMEVAL
64 int utimes(
char *,
struct timeval *);
68 # define AT_FDCWD (-2)
72 int fchmodat(
int,
const char *, mode_t,
int);
76 int fchownat(
int,
const char *, uid_t, gid_t,
int);
80 int truncate (
const char *, off_t);
83 #ifndef HAVE_STRUCT_TIMESPEC
90 #if !defined(HAVE_NANOSLEEP) && !defined(HAVE_NSLEEP)
92 int nanosleep(
const struct timespec *,
struct timespec *);
95 #ifndef HAVE_UTIMENSAT
98 # ifndef AT_SYMLINK_NOFOLLOW
99 # define AT_SYMLINK_NOFOLLOW 0x80000000
101 int utimensat(
int,
const char *,
const struct timespec[2],
int);
105 int usleep(
unsigned int useconds);
108 #ifndef HAVE_TCGETPGRP
109 pid_t tcgetpgrp(
int);
112 #ifndef HAVE_TCSENDBREAK
113 int tcsendbreak(
int,
int);
116 #ifndef HAVE_UNSETENV
117 int unsetenv(
const char *);
125 pid_t getpgid(pid_t);
128 #ifndef HAVE_ENDGRENT
129 # define endgrent() do { } while(0)
132 #ifndef HAVE_KRB5_GET_ERROR_MESSAGE
133 # define krb5_get_error_message krb5_get_err_text
136 #ifndef HAVE_KRB5_FREE_ERROR_MESSAGE
137 # define krb5_free_error_message(a,b) do { } while(0)
141 int pledge(
const char *promises,
const char *paths[]);
146 void err(
int,
const char *, ...) __attribute__((format(printf, 2, 3)));
149 void errx(
int,
const char *, ...) __attribute__((format(printf, 2, 3)));
152 void warn(
const char *, ...) __attribute__((format(printf, 1, 2)));
156 long long llabs(
long long);
159 #if defined(HAVE_DECL_BZERO) && HAVE_DECL_BZERO == 0
160 void bzero(
void *,
size_t);
172 # define LOCK_SH 0x01
173 # define LOCK_EX 0x02
174 # define LOCK_NB 0x04
175 # define LOCK_UN 0x08
179 #ifdef FFLUSH_NULL_BUG
180 # define fflush(x) (_ssh_compat_fflush(x))
183 #ifndef HAVE_LOCALTIME_R
184 struct tm *localtime_r(
const time_t *,
struct tm *);
187 #ifndef HAVE_REALPATH
188 #define realpath(x, y) (sftp_realpath((x), (y)))