]> granicus.if.org Git - sudo/commitdiff
Fix K&R compilation issues on HP-UX.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 3 Jun 2010 15:57:40 +0000 (11:57 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 3 Jun 2010 15:57:40 +0000 (11:57 -0400)
--HG--
branch : 1.7

check.c
lbuf.h
script.c
sudo.c
sudo_nss.c

diff --git a/check.c b/check.c
index 6ee8c324b0c80fa6572cb1658e4d8ff165700761..c462682d7f405f9d1367edea5a7ed6a1f9ce06c8 100644 (file)
--- 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 31ca5e38f8b178ee7c4e6bca694ce59b03dd9885..b76eee9528575cebcdfc94186d6f2bf5c6fb3789 100644 (file)
--- 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;
index c495131a5970cd8d40137d6b325c4c5751fe66cb..67087d1f60aef1ee0d401f9848600c9069b42900 100644 (file)
--- 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 bbed617a3732c45c2afc83ca7646d2c639416a9c..09cc7ec6072c20aefceb04ad9bb027f9b41ad7dc 100644 (file)
--- 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);
 }
index b910f74f3a33768459870239819be93a8b746406..2ba6b704e334e905591787a44b523a68e236aa9e 100644 (file)
@@ -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);
 }
 
 /*