From a48924be291bc09a6fdeff5cbb974dace67ddeab Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Fri, 6 Jul 2001 19:57:45 +0000 Subject: [PATCH] * configure.in: Check for need to provide setenv prototype if setenv is in the C library. * forward.c: Provide setenv prototype if needed. * auth.c (auth_name): Cast result of sizeof() to int to match printf format specification. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13580 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/telnet/libtelnet/ChangeLog | 10 ++++++++++ src/appl/telnet/libtelnet/auth.c | 2 +- src/appl/telnet/libtelnet/configure.in | 2 ++ src/appl/telnet/libtelnet/forward.c | 2 +- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/appl/telnet/libtelnet/ChangeLog b/src/appl/telnet/libtelnet/ChangeLog index f1b5e1600..82424a67b 100644 --- a/src/appl/telnet/libtelnet/ChangeLog +++ b/src/appl/telnet/libtelnet/ChangeLog @@ -1,3 +1,13 @@ +2001-07-06 Ezra Peisach + + * configure.in: Check for need to provide setenv prototype if + setenv is in the C library. + + * forward.c: Provide setenv prototype if needed. + + * auth.c (auth_name): Cast result of sizeof() to int to match + printf format specification. + 2001-07-05 Ezra Peisach * encrypt.c (encrypt_reply): Cast arguments to printf to match diff --git a/src/appl/telnet/libtelnet/auth.c b/src/appl/telnet/libtelnet/auth.c index d3150846a..f03c23b5d 100644 --- a/src/appl/telnet/libtelnet/auth.c +++ b/src/appl/telnet/libtelnet/auth.c @@ -510,7 +510,7 @@ auth_name(data, cnt) if (cnt > sizeof(savename) - 1) { if (auth_debug_mode) printf(">>>%s: Name in NAME (%d) exceeds %d length\r\n", - Name, cnt, sizeof(savename)-1); + Name, cnt, (int) sizeof(savename)-1); return; } memcpy((void *)savename, (void *)data, cnt); diff --git a/src/appl/telnet/libtelnet/configure.in b/src/appl/telnet/libtelnet/configure.in index 3b55d3ddb..81703e159 100644 --- a/src/appl/telnet/libtelnet/configure.in +++ b/src/appl/telnet/libtelnet/configure.in @@ -12,6 +12,8 @@ if test $ac_cv_func_setenv = no || test $ac_cv_func_unsetenv = no \ LIBOBJS="$LIBOBJS setenv.o" AC_DEFINE([NEED_SETENV]) fi +dnl +KRB5_NEED_PROTO([#include ],setenv) AC_C_CONST if test "$KRB4_LIB" = ''; then AC_MSG_RESULT(No Kerberos 4 authentication) diff --git a/src/appl/telnet/libtelnet/forward.c b/src/appl/telnet/libtelnet/forward.c index 62a59d592..d161e78dc 100644 --- a/src/appl/telnet/libtelnet/forward.c +++ b/src/appl/telnet/libtelnet/forward.c @@ -30,7 +30,7 @@ #include "k5-int.h" #include "krb5forw.h" -#ifdef NEED_SETENV +#if defined(NEED_SETENV) || defined(NEED_SETENV_PROTO) extern int setenv(char *, char *, int); #endif -- 2.26.2