]> andersk Git - openssh.git/blame - openbsd-compat/bsd-misc.h
- (dtucker) [configure.ac sshd.c openbsd-compat/bsd-misc.h
[openssh.git] / openbsd-compat / bsd-misc.h
CommitLineData
2274ae66 1/* $Id$ */
2
8efc0c15 3/*
9cd11896 4 * Copyright (c) 1999-2004 Damien Miller <djm@mindrot.org>
bfc9a610 5 *
9cd11896 6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
bfc9a610 9 *
9cd11896 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
bfc9a610 17 */
0b202697 18
d7a582ea 19#ifndef _BSD_MISC_H
20#define _BSD_MISC_H
8efc0c15 21
2274ae66 22#include "includes.h"
fb723d82 23
fda04d7d 24char *ssh_get_progname(char *);
260d427b 25
a30ce26d 26#ifndef HAVE_SETSID
27#define setsid() setpgrp(0, getpid())
28#endif /* !HAVE_SETSID */
29
1647c2b5 30#ifndef HAVE_SETENV
9901cb37 31int setenv(const char *, const char *, int);
1647c2b5 32#endif /* !HAVE_SETENV */
33
a5c9cd31 34#ifndef HAVE_SETLOGIN
9901cb37 35int setlogin(const char *);
a5c9cd31 36#endif /* !HAVE_SETLOGIN */
37
38#ifndef HAVE_INNETGR
9901cb37 39int innetgr(const char *, const char *, const char *, const char *);
a5c9cd31 40#endif /* HAVE_INNETGR */
41
42#if !defined(HAVE_SETEUID) && defined(HAVE_SETREUID)
9901cb37 43int seteuid(uid_t);
a5c9cd31 44#endif /* !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) */
45
febd3f8e 46#if !defined(HAVE_SETEGID) && defined(HAVE_SETRESGID)
9901cb37 47int setegid(uid_t);
febd3f8e 48#endif /* !defined(HAVE_SETEGID) && defined(HAVE_SETRESGID) */
49
416ed5a7 50#if !defined(HAVE_STRERROR) && defined(HAVE_SYS_ERRLIST) && defined(HAVE_SYS_NERR)
9901cb37 51const char *strerror(int);
416ed5a7 52#endif
819b676f 53
89c7e31c 54
55#ifndef HAVE_UTIMES
56#ifndef HAVE_STRUCT_TIMEVAL
57struct timeval {
58 long tv_sec;
59 long tv_usec;
60}
61#endif /* HAVE_STRUCT_TIMEVAL */
62
9901cb37 63int utimes(char *, struct timeval *);
89c7e31c 64#endif /* HAVE_UTIMES */
65
f25cd32c 66#ifndef HAVE_TRUNCATE
9901cb37 67int truncate (const char *, off_t);
f25cd32c 68#endif /* HAVE_TRUNCATE */
89c7e31c 69
246446cd 70#if !defined(HAVE_SETGROUPS) && defined(SETGROUPS_NOOP)
9901cb37 71int setgroups(size_t, const gid_t *);
246446cd 72#endif
73
5271b55c 74#if !defined(HAVE_NANOSLEEP) && !defined(HAVE_NSLEEP)
75#ifndef HAVE_STRUCT_TIMESPEC
76struct timespec {
77 time_t tv_sec;
78 long tv_nsec;
79};
80#endif
9901cb37 81int nanosleep(const struct timespec *, struct timespec *);
5271b55c 82#endif
246446cd 83
c5d3dd1b 84#ifndef HAVE_TCGETPGRP
85pid_t tcgetpgrp(int);
5af25b1d 86#endif
87
88#ifndef HAVE_TCSENDBREAK
89int tcsendbreak(int, int);
90#endif
c5d3dd1b 91
351f44a0 92#ifndef HAVE_UNSETENV
93void unsetenv(const char *);
94#endif
95
f00d1f78 96/* wrapper for signal interface */
97typedef void (*mysig_t)(int);
98mysig_t mysignal(int sig, mysig_t act);
99
100#define signal(a,b) mysignal(a,b)
101
d7a582ea 102#endif /* _BSD_MISC_H */
This page took 2.125094 seconds and 5 git commands to generate.