2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 18:08:23 +00:00
sudo/include/missing.h

87 lines
2.4 KiB
C
Raw Normal View History

/*
* Copyright (c) 2009 Todd C. Miller <Todd.Miller@courtesan.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _SUDO_MISSING_H
#define _SUDO_MISSING_H
/* Functions "missing" from libc. */
struct timeval;
struct timespec;
#ifndef HAVE_CLOSEFROM
2010-02-27 09:26:43 -05:00
void closefrom(int);
#endif
#ifndef HAVE_GETCWD
2010-02-27 09:26:43 -05:00
char *getcwd(char *, size_t size);
#endif
#ifndef HAVE_GETLINE
2010-02-27 09:26:43 -05:00
ssize_t getline(char **, size_t *, FILE *);
#endif
#ifndef HAVE_UTIMES
2010-02-27 09:26:43 -05:00
int utimes(const char *, const struct timeval *);
#endif
#ifdef HAVE_FUTIME
2010-02-27 09:26:43 -05:00
int futimes(int, const struct timeval *);
#endif
#ifndef HAVE_SNPRINTF
2010-02-27 09:26:43 -05:00
int snprintf(char *, size_t, const char *, ...) __printflike(3, 4);
#endif
#ifndef HAVE_VSNPRINTF
2010-02-27 09:26:43 -05:00
int vsnprintf(char *, size_t, const char *, va_list) __printflike(3, 0);
#endif
#ifndef HAVE_ASPRINTF
2010-02-27 09:26:43 -05:00
int asprintf(char **, const char *, ...) __printflike(2, 3);
#endif
#ifndef HAVE_VASPRINTF
2010-02-27 09:26:43 -05:00
int vasprintf(char **, const char *, va_list) __printflike(2, 0);
#endif
#ifndef HAVE_STRCASECMP
2010-02-27 09:26:43 -05:00
int strcasecmp(const char *, const char *);
#endif
#ifndef HAVE_STRLCAT
2010-02-27 09:26:43 -05:00
size_t strlcat(char *, const char *, size_t);
#endif
#ifndef HAVE_STRLCPY
2010-02-27 09:26:43 -05:00
size_t strlcpy(char *, const char *, size_t);
#endif
#ifndef HAVE_MEMRCHR
2010-02-27 09:26:43 -05:00
void *memrchr(const void *, int, size_t);
#endif
#ifndef HAVE_MKSTEMP
2010-02-27 09:26:43 -05:00
int mkstemp(char *);
#endif
#ifndef HAVE_NANOSLEEP
2010-02-27 09:26:43 -05:00
int nanosleep(const struct timespec *, struct timespec *);
#endif
#ifndef HAVE_SETENV
2010-02-27 09:26:43 -05:00
int setenv(const char *, const char *, int);
#endif
#ifndef HAVE_UNSETENV
2010-02-27 09:26:43 -05:00
int unsetenv(const char *);
#endif
#if defined(HAVE_DECL_SYS_SIGLIST) || defined(HAVE_DECL__SYS_SIGLIST) || defined(HAVE_DECL___SYS_SIGLIST)
2010-02-27 09:26:43 -05:00
char *strsignal(int);
#endif
#ifndef HAVE_STRDUP
char *strdup(const char *);
#endif
#ifndef HAVE_STRNDUP
char *strndup(const char *, size_t);
#endif
#endif /* _SUDO_MISSING_H */