From: Todd C. Miller Date: Thu, 3 Jun 2010 15:57:40 +0000 (-0400) Subject: Fix K&R compilation issues on HP-UX. X-Git-Tag: SUDO_1_7_3~121 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1399b0af1931e6bc70f5d7c17f7348f9500cd358;p=sudo Fix K&R compilation issues on HP-UX. --HG-- branch : 1.7 --- diff --git a/check.c b/check.c index 6ee8c324b..c462682d7 100644 --- a/check.c +++ b/check.c @@ -661,7 +661,8 @@ remove_timestamp(remove) * file and use it to determine whether the tty ticket file is stale. */ static int -tty_is_devpts(const char *tty) +tty_is_devpts(tty) + const char *tty; { int retval = FALSE; #ifdef __linux__ diff --git a/lbuf.h b/lbuf.h index 31ca5e38f..b76eee952 100644 --- a/lbuf.h +++ b/lbuf.h @@ -23,7 +23,7 @@ * Line buffer struct. */ struct lbuf { - int (*output)(const char *); + int (*output)__P((const char *)); char *buf; const char *continuation; int indent; diff --git a/script.c b/script.c index c495131a5..67087d1f6 100644 --- a/script.c +++ b/script.c @@ -184,7 +184,7 @@ script_nextid() if (nread == -1) log_error(USE_ERRNO, "cannot read %s", pathbuf); id = strtoul(buf, &ep, 36); - if (buf == ep || id >= 2176782336U) + if (buf == ep || id >= (unsigned long)2176782336) log_error(0, "invalid sequence number %s", pathbuf); } id++; diff --git a/sudo.c b/sudo.c index bbed617a3..09cc7ec60 100644 --- a/sudo.c +++ b/sudo.c @@ -1521,7 +1521,8 @@ usage_excl(exit_val) } static int -usage_out(const char *buf) +usage_out(buf) + const char *buf; { return fputs(buf, stderr); } diff --git a/sudo_nss.c b/sudo_nss.c index b910f74f3..2ba6b704e 100644 --- a/sudo_nss.c +++ b/sudo_nss.c @@ -225,11 +225,10 @@ reset_groups(pw) } static int -output(const char *buf) +output(buf) + const char *buf; { - if (fputs(buf, stdout) == 0) - return (int)strlen(buf); - return 0; + return fputs(buf, stdout); } /*