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