summaryrefslogtreecommitdiff
path: root/openbsd-compat/bsd-misc.h
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat/bsd-misc.h')
-rw-r--r--openbsd-compat/bsd-misc.h45
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
32char *ssh_get_progname(char *); 32char *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
39int setenv(const char *, const char *, int); 39int 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
43int setlogin(const char *); 43int setlogin(const char *name);
44#endif /* !HAVE_SETLOGIN */ 44#endif /* !HAVE_SETLOGIN */
45 45
46#ifndef HAVE_INNETGR 46#ifndef HAVE_INNETGR
47int innetgr(const char *, const char *, const char *, const char *); 47int 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)
51int seteuid(uid_t); 52int 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)
55int setegid(uid_t); 56int 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)
59const char *strerror(int); 60const 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
71int utimes(char *, struct timeval *); 72int utimes(char *filename, struct timeval *tvp);
72#endif /* HAVE_UTIMES */ 73#endif /* HAVE_UTIMES */
73 74
74#ifndef HAVE_TRUNCATE 75#ifndef HAVE_TRUNCATE
75int truncate (const char *, off_t); 76int 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)
79int setgroups(size_t, const gid_t *); 80int 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
89int nanosleep(const struct timespec *, struct timespec *); 90int nanosleep(const struct timespec *req, struct timespec *rem);
90#endif
91
92#ifndef HAVE_TCGETPGRP
93pid_t tcgetpgrp(int);
94#endif
95
96#ifndef HAVE_TCSENDBREAK
97int tcsendbreak(int, int);
98#endif 91#endif
99 92
100/* wrapper for signal interface */
101typedef void (*mysig_t)(int);
102mysig_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 */