diff options
Diffstat (limited to 'openbsd-compat/bsd-misc.h')
-rw-r--r-- | openbsd-compat/bsd-misc.h | 45 |
1 files changed, 16 insertions, 29 deletions
diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h index 6b70473f3..78d9ccdd4 100644 --- a/openbsd-compat/bsd-misc.h +++ b/openbsd-compat/bsd-misc.h | |||
@@ -1,7 +1,5 @@ | |||
1 | /* $Id: bsd-misc.h,v 1.13 2003/08/29 16:59:52 mouring Exp $ */ | ||
2 | |||
3 | /* | 1 | /* |
4 | * Copyright (c) 1999-2003 Damien Miller. All rights reserved. | 2 | * Copyright (c) 1999-2000 Damien Miller. All rights reserved. |
5 | * | 3 | * |
6 | * Redistribution and use in source and binary forms, with or without | 4 | * Redistribution and use in source and binary forms, with or without |
7 | * modification, are permitted provided that the following conditions | 5 | * modification, are permitted provided that the following conditions |
@@ -24,39 +22,42 @@ | |||
24 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
25 | */ | 23 | */ |
26 | 24 | ||
25 | /* $Id: bsd-misc.h,v 1.7 2003/03/18 18:21:41 tim Exp $ */ | ||
26 | |||
27 | #ifndef _BSD_MISC_H | 27 | #ifndef _BSD_MISC_H |
28 | #define _BSD_MISC_H | 28 | #define _BSD_MISC_H |
29 | 29 | ||
30 | #include "includes.h" | 30 | #include "config.h" |
31 | 31 | ||
32 | char *ssh_get_progname(char *); | 32 | char *get_progname(char *argv0); |
33 | 33 | ||
34 | #ifndef HAVE_SETSID | 34 | #ifndef HAVE_SETSID |
35 | #define setsid() setpgrp(0, getpid()) | 35 | #define setsid() setpgrp(0, getpid()) |
36 | #endif /* !HAVE_SETSID */ | 36 | #endif /* !HAVE_SETSID */ |
37 | 37 | ||
38 | #ifndef HAVE_SETENV | 38 | #ifndef HAVE_SETENV |
39 | int setenv(const char *, const char *, int); | 39 | int setenv(const char *name, const char *value, int overwrite); |
40 | #endif /* !HAVE_SETENV */ | 40 | #endif /* !HAVE_SETENV */ |
41 | 41 | ||
42 | #ifndef HAVE_SETLOGIN | 42 | #ifndef HAVE_SETLOGIN |
43 | int setlogin(const char *); | 43 | int setlogin(const char *name); |
44 | #endif /* !HAVE_SETLOGIN */ | 44 | #endif /* !HAVE_SETLOGIN */ |
45 | 45 | ||
46 | #ifndef HAVE_INNETGR | 46 | #ifndef HAVE_INNETGR |
47 | int innetgr(const char *, const char *, const char *, const char *); | 47 | int innetgr(const char *netgroup, const char *host, |
48 | const char *user, const char *domain); | ||
48 | #endif /* HAVE_INNETGR */ | 49 | #endif /* HAVE_INNETGR */ |
49 | 50 | ||
50 | #if !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) | 51 | #if !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) |
51 | int seteuid(uid_t); | 52 | int seteuid(uid_t euid); |
52 | #endif /* !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) */ | 53 | #endif /* !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) */ |
53 | 54 | ||
54 | #if !defined(HAVE_SETEGID) && defined(HAVE_SETRESGID) | 55 | #if !defined(HAVE_SETEGID) && defined(HAVE_SETRESGID) |
55 | int setegid(uid_t); | 56 | int setegid(uid_t egid); |
56 | #endif /* !defined(HAVE_SETEGID) && defined(HAVE_SETRESGID) */ | 57 | #endif /* !defined(HAVE_SETEGID) && defined(HAVE_SETRESGID) */ |
57 | 58 | ||
58 | #if !defined(HAVE_STRERROR) && defined(HAVE_SYS_ERRLIST) && defined(HAVE_SYS_NERR) | 59 | #if !defined(HAVE_STRERROR) && defined(HAVE_SYS_ERRLIST) && defined(HAVE_SYS_NERR) |
59 | const char *strerror(int); | 60 | const char *strerror(int e); |
60 | #endif | 61 | #endif |
61 | 62 | ||
62 | 63 | ||
@@ -68,15 +69,15 @@ struct timeval { | |||
68 | } | 69 | } |
69 | #endif /* HAVE_STRUCT_TIMEVAL */ | 70 | #endif /* HAVE_STRUCT_TIMEVAL */ |
70 | 71 | ||
71 | int utimes(char *, struct timeval *); | 72 | int utimes(char *filename, struct timeval *tvp); |
72 | #endif /* HAVE_UTIMES */ | 73 | #endif /* HAVE_UTIMES */ |
73 | 74 | ||
74 | #ifndef HAVE_TRUNCATE | 75 | #ifndef HAVE_TRUNCATE |
75 | int truncate (const char *, off_t); | 76 | int truncate (const char *path, off_t length); |
76 | #endif /* HAVE_TRUNCATE */ | 77 | #endif /* HAVE_TRUNCATE */ |
77 | 78 | ||
78 | #if !defined(HAVE_SETGROUPS) && defined(SETGROUPS_NOOP) | 79 | #if !defined(HAVE_SETGROUPS) && defined(SETGROUPS_NOOP) |
79 | int setgroups(size_t, const gid_t *); | 80 | int setgroups(size_t size, const gid_t *list); |
80 | #endif | 81 | #endif |
81 | 82 | ||
82 | #if !defined(HAVE_NANOSLEEP) && !defined(HAVE_NSLEEP) | 83 | #if !defined(HAVE_NANOSLEEP) && !defined(HAVE_NSLEEP) |
@@ -86,21 +87,7 @@ struct timespec { | |||
86 | long tv_nsec; | 87 | long tv_nsec; |
87 | }; | 88 | }; |
88 | #endif | 89 | #endif |
89 | int nanosleep(const struct timespec *, struct timespec *); | 90 | int nanosleep(const struct timespec *req, struct timespec *rem); |
90 | #endif | ||
91 | |||
92 | #ifndef HAVE_TCGETPGRP | ||
93 | pid_t tcgetpgrp(int); | ||
94 | #endif | ||
95 | |||
96 | #ifndef HAVE_TCSENDBREAK | ||
97 | int tcsendbreak(int, int); | ||
98 | #endif | 91 | #endif |
99 | 92 | ||
100 | /* wrapper for signal interface */ | ||
101 | typedef void (*mysig_t)(int); | ||
102 | mysig_t mysignal(int sig, mysig_t act); | ||
103 | |||
104 | #define signal(a,b) mysignal(a,b) | ||
105 | |||
106 | #endif /* _BSD_MISC_H */ | 93 | #endif /* _BSD_MISC_H */ |