From c6b3bbe2b991f4f87ca1f8214f43c13a5a73f385 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Mon, 13 Dec 1999 08:27:33 +1100 Subject: - Fix compilation on systems with AFS. Reported by aloomis@glue.umd.edu - Fix installation on Solaris. Reported by Gordon Rowell - Fix gccisms (__attribute__ and inline). Report by edgy@us.ibm.com, patch from Markus Friedl - Auto-locate xauth. Patch from David Agraz - Compile fix from David Agraz - Avoid compiler warning in bsd-snprintf.c - Added pam_limits.so to default PAM config. Suggested by Jim Knoble --- bsd-snprintf.c | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'bsd-snprintf.c') diff --git a/bsd-snprintf.c b/bsd-snprintf.c index 11c4ff39c..e85d9296a 100644 --- a/bsd-snprintf.c +++ b/bsd-snprintf.c @@ -101,30 +101,6 @@ mcleanup(str, n, p) free(curobj); } -#if !defined(HAVE_SNPRINTF) -int -#if __STDC__ -snprintf(char *str, size_t n, char const *fmt, ...) -#else -snprintf(str, n, fmt, va_alist) - char *str; - size_t n; - char *fmt; - va_dcl -#endif -{ - va_list ap; -#if __STDC__ - va_start(ap, fmt); -#else - va_start(ap); -#endif - - return (vsnprintf(str, n, fmt, ap)); - va_end(ap); -} -#endif /* !defined(HAVE_SNPRINTF) */ - #if !defined(HAVE_VSNPRINTF) int vsnprintf(str, n, fmt, ap) @@ -159,4 +135,28 @@ vsnprintf(str, n, fmt, ap) } #endif /* !defined(HAVE_VSNPRINTF) */ +#if !defined(HAVE_SNPRINTF) +int +#if __STDC__ +snprintf(char *str, size_t n, char const *fmt, ...) +#else +snprintf(str, n, fmt, va_alist) + char *str; + size_t n; + char *fmt; + va_dcl +#endif +{ + va_list ap; +#if __STDC__ + va_start(ap, fmt); +#else + va_start(ap); +#endif + + return (vsnprintf(str, n, fmt, ap)); + va_end(ap); +} +#endif /* !defined(HAVE_SNPRINTF) */ + #endif /* !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) */ -- cgit v1.2.3