2 * Copyright (c) 2009-2010 Todd C. Miller <Todd.Miller@courtesan.com>
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 #ifndef _SUDO_MISSING_H
18 #define _SUDO_MISSING_H
26 /* Functions "missing" from libc. */
31 #ifndef HAVE_CLOSEFROM
32 void closefrom __P((int));
35 char *getcwd __P((char *, size_t size));
38 ssize_t getline __P((char **, size_t *, FILE *));
41 int utimes __P((const char *, const struct timeval *));
44 int futimes __P((int, const struct timeval *));
47 int snprintf __P((char *, size_t, const char *, ...))
50 #ifndef HAVE_VSNPRINTF
51 int vsnprintf __P((char *, size_t, const char *, va_list))
55 int asprintf __P((char **, const char *, ...))
58 #ifndef HAVE_VASPRINTF
59 int vasprintf __P((char **, const char *, va_list))
62 #ifndef HAVE_STRCASECMP
63 int strcasecmp __P((const char *, const char *));
66 size_t strlcat __P((char *, const char *, size_t));
69 size_t strlcpy __P((char *, const char *, size_t));
72 void *memrchr __P((const void *, int, size_t));
75 int mkstemps __P((char *, int));
77 #ifndef HAVE_NANOSLEEP
78 int nanosleep __P((const struct timespec *, struct timespec *));
81 int setenv __P((const char *, const char *, int));
84 int unsetenv __P((const char *));
86 #ifndef HAVE_STRSIGNAL
87 char *strsignal __P((int));
90 pid_t setsid __P((void));
93 #endif /* _SUDO_MISSING_H */