From: Todd C. Miller Date: Mon, 7 Feb 2011 15:50:44 +0000 (-0500) Subject: fix K&R compilation X-Git-Tag: SUDO_1_7_5~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f3e169091662f5cbb0c0abe0647bde07cc9bd670;p=sudo fix K&R compilation --HG-- branch : 1.7 --- diff --git a/exec.c b/exec.c index bc2b865a0..1fca0ffc5 100644 --- a/exec.c +++ b/exec.c @@ -179,7 +179,7 @@ static struct signal_state { * Save signal handler state so it can be restored before exec. */ void -save_signals(void) +save_signals() { struct signal_state *ss; @@ -191,7 +191,7 @@ save_signals(void) * Restore signal handlers to initial state. */ void -restore_signals(void) +restore_signals() { struct signal_state *ss; diff --git a/missing.h b/missing.h index e60678cae..7b2d29d1b 100644 --- a/missing.h +++ b/missing.h @@ -321,10 +321,10 @@ const char *getprogname __P((void)); * Solaris does not declare getdomainname(). */ #if defined(__hpux) -int innetgr(const char *, const char *, const char *, const char *); +int innetgr __P((const char *, const char *, const char *, const char *)); #endif #if defined(__hpux) || defined(__sun) -int getdomainname(char *, size_t); +int getdomainname __P((char *, size_t)); #endif /* Functions "missing" from libc. */ diff --git a/sudo.c b/sudo.c index 2277f8403..625f8793f 100644 --- a/sudo.c +++ b/sudo.c @@ -564,7 +564,8 @@ main(argc, argv, envp) * they are not interpreted specially by the shell. */ static char * -escape_cmnd(const char *src) +escape_cmnd(src) + const char *src; { char *cmnd, *dst; diff --git a/toke.h b/toke.h index 6200826b2..75e949581 100644 --- a/toke.h +++ b/toke.h @@ -17,12 +17,12 @@ #ifndef _SUDO_TOKE_H #define _SUDO_TOKE_H -int append(char *, int); -int fill_args(char *, int, int); -int fill_cmnd(char *, int); -int fill_txt(char *, int, int); -int ipv6_valid(const char *s); -void yyerror(const char *); +int append __P((char *, int)); +int fill_args __P((char *, int, int)); +int fill_cmnd __P((char *, int)); +int fill_txt __P((char *, int, int)); +int ipv6_valid __P((const char *s)); +void yyerror __P((const char *)); /* realloc() to size + COMMANDARGINC to make room for command args */ #define COMMANDARGINC 64