summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/pty/ChangeLog12
-rw-r--r--src/util/pty/cleanup.c2
-rw-r--r--src/util/pty/logwtmp.c2
-rw-r--r--src/util/pty/sane_hostname.c6
4 files changed, 21 insertions, 1 deletions
diff --git a/src/util/pty/ChangeLog b/src/util/pty/ChangeLog
index 90a0a1ef4..a3794f784 100644
--- a/src/util/pty/ChangeLog
+++ b/src/util/pty/ChangeLog
@@ -1,3 +1,15 @@
+2001-05-03 Ezra Peisach <epeisach@mit.edu>
+
+ * cleanup.c (pty_cleanup): Delcare local variable only if
+ VHANG_LAST defined.
+
+ * logwtmp.c (pty_logwtmp): Only declare local variables if
+ logwtmp() not available on system.
+
+ * sane_hostname.c (sockaddrlen): Only define static function if
+ HAVE_GETNAMEINFO defined. (pty_make_sane_hostname) Declare goto
+ target only if code compiled in.
+
2001-05-01 Ken Raeburn <raeburn@mit.edu>
* update_utmp.c (pty_update_utmp): Fix typo (OWRONLY ->
diff --git a/src/util/pty/cleanup.c b/src/util/pty/cleanup.c
index 32384108b..23db2a2f3 100644
--- a/src/util/pty/cleanup.c
+++ b/src/util/pty/cleanup.c
@@ -32,7 +32,9 @@ long pty_cleanup (slave, pid, update_utmp)
int pid; /* May be zero for unknown.*/
int update_utmp;
{
+#ifdef VHANG_LAST
int retval, fd;
+#endif
if (update_utmp)
pty_update_utmp(PTY_DEAD_PROCESS,0, "", slave, (char *)0, PTY_UTMP_USERNAME_VALID);
diff --git a/src/util/pty/logwtmp.c b/src/util/pty/logwtmp.c
index 684033ed2..5b10f4616 100644
--- a/src/util/pty/logwtmp.c
+++ b/src/util/pty/logwtmp.c
@@ -33,11 +33,13 @@
long
pty_logwtmp(const char *tty, const char *user, const char *host)
{
+#ifndef HAVE_LOGWTMP
PTY_STRUCT_UTMPX utx;
int loggingin;
size_t len;
const char *cp;
char utmp_id[5];
+#endif
#ifdef HAVE_LOGWTMP
logwtmp(tty,user,host);
diff --git a/src/util/pty/sane_hostname.c b/src/util/pty/sane_hostname.c
index 753683ccc..5edd443ca 100644
--- a/src/util/pty/sane_hostname.c
+++ b/src/util/pty/sane_hostname.c
@@ -26,6 +26,7 @@
#include "libpty.h"
#include <arpa/inet.h>
+#ifdef HAVE_GETNAMEINFO
static size_t
sockaddrlen (const struct sockaddr *addr)
{
@@ -42,12 +43,13 @@ sockaddrlen (const struct sockaddr *addr)
return 0;
#endif
}
+#endif
static void
downcase (char *s)
{
for (; *s != '\0'; s++)
- *s = tolower (*s);
+ *s = tolower ((int) *s);
}
static long
@@ -106,7 +108,9 @@ pty_make_sane_hostname(const struct sockaddr *addr, int maxlen,
return ENOMEM;
if (always_ipaddr)
+#ifdef HAVE_GETNAMEINFO
use_ipaddr:
+#endif
return do_ntoa(addr, ut_host_len, out);
#ifdef HAVE_GETNAMEINFO