From 03d9b8adb836b92136791c6f0a4ffb820f8796a8 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Tue, 18 Jul 2000 14:21:41 +0000 Subject: [PATCH] * krcp.c: Provide format attribute for error() for versions of gcc that support it. * configure.in (LOGINLIBS): Test for crypt() in crypt library only modifies LOGINLIBS. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12553 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/bsd/ChangeLog | 8 ++++++++ src/appl/bsd/configure.in | 6 +++++- src/appl/bsd/krcp.c | 6 +++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog index 8fa89784e..ed9da4367 100644 --- a/src/appl/bsd/ChangeLog +++ b/src/appl/bsd/ChangeLog @@ -1,3 +1,11 @@ +2000-07-18 Ezra Peisach + + * krcp.c: Provide format attribute for error() for versions of gcc + that support it. + + * configure.in (LOGINLIBS): Test for crypt() in crypt library only + modifies LOGINLIBS. + 2000-07-03 Ezra Peisach * Makefile.in: Remove linking of krb5util library from diff --git a/src/appl/bsd/configure.in b/src/appl/bsd/configure.in index cf6547679..045d3fb2f 100644 --- a/src/appl/bsd/configure.in +++ b/src/appl/bsd/configure.in @@ -12,7 +12,11 @@ fi AC_PROG_INSTALL dnl dbm libs for use of an_to_ln AC_CHECK_LIB(util,main) -AC_CHECK_LIB(crypt,crypt) +save_LIBS="$LIBS" + LIBS= + AC_CHECK_LIB(crypt,crypt) + LOGINLIBS="$LOGINLIBS $LIBS" +LIBS="$save_LIBS" dnl dnl AIX has them all; SCO might too AC_CHECK_LIB(odm,main, diff --git a/src/appl/bsd/krcp.c b/src/appl/bsd/krcp.c index 7292e72fe..dc5cc79a3 100644 --- a/src/appl/bsd/krcp.c +++ b/src/appl/bsd/krcp.c @@ -127,7 +127,11 @@ struct buffer { #define NULLBUF (struct buffer *) 0 #ifdef HAVE_STDARG_H -void error KRB5_STDARG_P((char *fmt, ...)); +void error KRB5_STDARG_P((char *fmt, ...)) +#if !defined (__cplusplus) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)) + __attribute__ ((__format__ (__printf__, 1, 2))) +#endif + ; #else /*VARARGS*/ void error KRB5_STDARG_P((char *, va_list)); -- 2.26.2