Files
sudo/include/missing.h
Todd C. Miller ea4298bb54 Use mkstemps() instead of mkstemp() in sudoedit. This allows sudoedit
to preserve the file extension (if any) which may be used by the editor
(like emacs) to choose the editing mode.
2010-07-09 10:08:05 -04:00

83 lines
2.3 KiB
C

/*
* Copyright (c) 2009-2010 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
#include <stdarg.h>
/* Functions "missing" from libc. */
struct timeval;
struct timespec;
#ifndef HAVE_CLOSEFROM
void closefrom(int);
#endif
#ifndef HAVE_GETCWD
char *getcwd(char *, size_t size);
#endif
#ifndef HAVE_GETLINE
ssize_t getline(char **, size_t *, FILE *);
#endif
#ifndef HAVE_UTIMES
int utimes(const char *, const struct timeval *);
#endif
#ifdef HAVE_FUTIME
int futimes(int, const struct timeval *);
#endif
#ifndef HAVE_SNPRINTF
int snprintf(char *, size_t, const char *, ...) __printflike(3, 4);
#endif
#ifndef HAVE_VSNPRINTF
int vsnprintf(char *, size_t, const char *, va_list) __printflike(3, 0);
#endif
#ifndef HAVE_ASPRINTF
int asprintf(char **, const char *, ...) __printflike(2, 3);
#endif
#ifndef HAVE_VASPRINTF
int vasprintf(char **, const char *, va_list) __printflike(2, 0);
#endif
#ifndef HAVE_STRCASECMP
int strcasecmp(const char *, const char *);
#endif
#ifndef HAVE_STRLCAT
size_t strlcat(char *, const char *, size_t);
#endif
#ifndef HAVE_STRLCPY
size_t strlcpy(char *, const char *, size_t);
#endif
#ifndef HAVE_MEMRCHR
void *memrchr(const void *, int, size_t);
#endif
#ifndef HAVE_MKSTEMPS
int mkstemps(char *);
#endif
#ifndef HAVE_NANOSLEEP
int nanosleep(const struct timespec *, struct timespec *);
#endif
#ifndef HAVE_SETENV
int setenv(const char *, const char *, int);
#endif
#ifndef HAVE_UNSETENV
int unsetenv(const char *);
#endif
#ifndef HAVE_STRSIGNAL
char *strsignal(int);
#endif
#endif /* _SUDO_MISSING_H */