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.
gcc warning cleanups
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13227
dc483132-0cff-0310-8789-
dd5450dbe970
+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 ->
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);
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);
#include "libpty.h"
#include <arpa/inet.h>
+#ifdef HAVE_GETNAMEINFO
static size_t
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
return ENOMEM;
if (always_ipaddr)
+#ifdef HAVE_GETNAMEINFO
use_ipaddr:
+#endif
return do_ntoa(addr, ut_host_len, out);
#ifdef HAVE_GETNAMEINFO