Move prototypes for missing libc functions to missing.h
This commit is contained in:
21
Makefile.in
21
Makefile.in
@@ -108,10 +108,10 @@ SRCS = aix.c alias.c alloc.c audit.c bsm_audit.c check.c closefrom.c \
|
||||
def_data.c defaults.c env.c error.c fileops.c find_path.c fnmatch.c \
|
||||
getcwd.c getprogname.c getspwuid.c gettime.c glob.c goodpath.c gram.c \
|
||||
gram.y interfaces.c isblank.c lbuf.c ldap.c list.c logging.c match.c \
|
||||
mkstemp.c memrchr.c nanosleep.c parse.c pwutil.c script.c set_perms.c \
|
||||
sigaction.c snprintf.c strcasecmp.c strerror.c strlcat.c strlcpy.c \
|
||||
strsignal.c sudo.c sudo_noexec.c sudo_edit.c sudo_nss.c term.c \
|
||||
testsudoers.c tgetpass.c toke.c toke.l tsgetgrpw.c utimes.c \
|
||||
mkstemp.c memrchr.c nanosleep.c parse.c pwutil.c pty.c script.c \
|
||||
set_perms.c sigaction.c snprintf.c strcasecmp.c strerror.c strlcat.c \
|
||||
strlcpy.c strsignal.c sudo.c sudo_noexec.c sudo_edit.c sudo_nss.c \
|
||||
term.c testsudoers.c tgetpass.c toke.c toke.l tsgetgrpw.c utimes.c \
|
||||
vasgroups.c visudo.c zero_bytes.c redblack.c selinux.c sesh.c \
|
||||
sudoreplay.c getdate.c getdate.y getline.c timestr.c $(AUTH_SRCS)
|
||||
|
||||
@@ -122,9 +122,9 @@ AUTH_SRCS = auth/afs.c auth/aix_auth.c auth/bsdauth.c auth/dce.c auth/fwtk.c \
|
||||
|
||||
HDRS = bsm_audit.h compat.h def_data.h defaults.h error.h ins_2001.h \
|
||||
ins_classic.h ins_csops.h ins_goons.h insults.h interfaces.h lbuf.h \
|
||||
list.h logging.h nonunix.h redblack.h parse.h sudo.h sudo_nss.h gram.h \
|
||||
auth/sudo_auth.h emul/charclass.h emul/fnmatch.h emul/glob.h \
|
||||
emul/timespec.h emul/utime.h
|
||||
list.h logging.h missing.h nonunix.h redblack.h parse.h sudo.h \
|
||||
sudo_nss.h gram.h auth/sudo_auth.h emul/charclass.h emul/fnmatch.h \
|
||||
emul/glob.h emul/timespec.h emul/utime.h
|
||||
|
||||
AUTH_OBJS = sudo_auth.o @AUTH_OBJS@
|
||||
|
||||
@@ -170,7 +170,8 @@ BINSPECIAL= INSTALL.binary Makefile.binary.in libtool
|
||||
|
||||
SUDODEP = $(srcdir)/sudo.h $(srcdir)/compat.h $(srcdir)/defaults.h \
|
||||
$(srcdir)/error.h $(srcdir)/list.h $(srcdir)/logging.h \
|
||||
$(srcdir)/sudo_nss.h $(devdir)/def_data.h pathnames.h config.h
|
||||
$(srcdir)/missing.h $(srcdir)/sudo_nss.h $(devdir)/def_data.h \
|
||||
pathnames.h config.h
|
||||
|
||||
AUTHDEP = $(SUDODEP) $(authdir)/sudo_auth.h
|
||||
|
||||
@@ -309,6 +310,8 @@ parse.o: $(srcdir)/parse.c $(SUDODEP) $(srcdir)/parse.h $(srcdir)/list.h $(devdi
|
||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/parse.c
|
||||
pwutil.o: $(srcdir)/pwutil.c $(SUDODEP)
|
||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/pwutil.c
|
||||
pty.o: $(srcdir)/pty.c $(SUDODEP)
|
||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/pty.c
|
||||
redblack.o: $(srcdir)/redblack.c $(SUDODEP) $(srcdir)/redblack.h
|
||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/redblack.c
|
||||
script.o: $(srcdir)/script.c $(SUDODEP)
|
||||
@@ -333,7 +336,7 @@ selinux.o: $(srcdir)/selinux.c $(SUDODEP)
|
||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/selinux.c
|
||||
sudo.o: $(srcdir)/sudo.c $(SUDODEP) sudo_usage.h $(srcdir)/interfaces.h
|
||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/sudo.c
|
||||
sudoreplay.o: $(srcdir)/sudoreplay.c $(srcdir)/compat.h $(srcdir)/error.h config.h
|
||||
sudoreplay.o: $(srcdir)/sudoreplay.c $(srcdir)/compat.h $(srcdir)/error.h $(srcdir)/missing.h config.h
|
||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/sudoreplay.c
|
||||
sudo_edit.o: $(srcdir)/sudo_edit.c $(SUDODEP)
|
||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/sudo_edit.c
|
||||
|
53
sudo.h
53
sudo.h
@@ -31,6 +31,7 @@
|
||||
#include "error.h"
|
||||
#include "list.h"
|
||||
#include "logging.h"
|
||||
#include "missing.h"
|
||||
#include "sudo_nss.h"
|
||||
|
||||
/*
|
||||
@@ -197,58 +198,6 @@ struct timeval;
|
||||
*/
|
||||
#define YY_DECL int yylex __P((void))
|
||||
|
||||
#ifndef HAVE_CLOSEFROM
|
||||
void closefrom __P((int));
|
||||
#endif
|
||||
#ifndef HAVE_GETCWD
|
||||
char *getcwd __P((char *, size_t size));
|
||||
#endif
|
||||
#ifndef HAVE_UTIMES
|
||||
int utimes __P((const char *, const struct timeval *));
|
||||
#endif
|
||||
#ifdef HAVE_FUTIME
|
||||
int futimes __P((int, const struct timeval *));
|
||||
#endif
|
||||
#ifndef HAVE_SNPRINTF
|
||||
int snprintf __P((char *, size_t, const char *, ...))
|
||||
__printflike(3, 4);
|
||||
#endif
|
||||
#ifndef HAVE_VSNPRINTF
|
||||
int vsnprintf __P((char *, size_t, const char *, va_list))
|
||||
__printflike(3, 0);
|
||||
#endif
|
||||
#ifndef HAVE_ASPRINTF
|
||||
int asprintf __P((char **, const char *, ...))
|
||||
__printflike(2, 3);
|
||||
#endif
|
||||
#ifndef HAVE_VASPRINTF
|
||||
int vasprintf __P((char **, const char *, va_list))
|
||||
__printflike(2, 0);
|
||||
#endif
|
||||
#ifndef HAVE_STRCASECMP
|
||||
int strcasecmp __P((const char *, const char *));
|
||||
#endif
|
||||
#ifndef HAVE_STRLCAT
|
||||
size_t strlcat __P((char *, const char *, size_t));
|
||||
#endif
|
||||
#ifndef HAVE_STRLCPY
|
||||
size_t strlcpy __P((char *, const char *, size_t));
|
||||
#endif
|
||||
#ifndef HAVE_MEMRCHR
|
||||
void *memrchr __P((const void *, int, size_t));
|
||||
#endif
|
||||
#ifndef HAVE_MKSTEMP
|
||||
int mkstemp __P((char *));
|
||||
#endif
|
||||
#ifndef HAVE_SETENV
|
||||
int setenv __P((const char *, const char *, int));
|
||||
#endif
|
||||
#ifndef HAVE_UNSETENV
|
||||
int unsetenv __P((const char *));
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SIGLIST
|
||||
char *strsignal __P((int));
|
||||
#endif
|
||||
char *sudo_goodpath __P((const char *, struct stat *));
|
||||
char *tgetpass __P((const char *, int, int));
|
||||
int find_path __P((char *, char **, struct stat *, char *));
|
||||
|
13
sudoreplay.c
13
sudoreplay.c
@@ -82,6 +82,7 @@
|
||||
|
||||
#include "compat.h"
|
||||
#include "error.h"
|
||||
#include "missing.h"
|
||||
|
||||
#ifndef lint
|
||||
__unused static const char rcsid[] = "$Sudo$";
|
||||
@@ -153,18 +154,6 @@ extern void *erealloc __P((void *, size_t));
|
||||
extern void efree __P((void *));
|
||||
extern time_t get_date __P((char *));
|
||||
extern char *get_timestr __P((time_t, int));
|
||||
#ifndef HAVE_GETLINE
|
||||
extern ssize_t getline __P((char **, size_t *, FILE *));
|
||||
#endif
|
||||
#ifndef HAVE_STRLCPY
|
||||
extern size_t strlcpy __P((char *, const char *, size_t));
|
||||
#endif
|
||||
#ifndef HAVE_SNPRINTF
|
||||
extern int snprintf __P((char *, size_t, const char *, ...)) __printflike(3, 4);
|
||||
#endif
|
||||
#ifndef HAVE_NANOSLEEP
|
||||
extern int nanosleep __P((const struct timespec *, struct timespec *));
|
||||
#endif
|
||||
extern int term_cbreak __P((int));
|
||||
extern int term_restore __P((int));
|
||||
extern void zero_bytes __P((volatile void *, size_t));
|
||||
|
Reference in New Issue
Block a user