summaryrefslogtreecommitdiffstats
path: root/bsd-snprintf.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-12-13 08:27:33 +1100
committerDamien Miller <djm@mindrot.org>1999-12-13 08:27:33 +1100
commitc6b3bbe2b991f4f87ca1f8214f43c13a5a73f385 (patch)
tree5eadc1e35464be6ec748793060d92b12fa637052 /bsd-snprintf.c
parent4e0dbd07cf1021897210c11a16fd05f207d95b8e (diff)
- Fix compilation on systems with AFS. Reported by
aloomis@glue.umd.edu - Fix installation on Solaris. Reported by Gordon Rowell <gordonr@gormand.com.au> - Fix gccisms (__attribute__ and inline). Report by edgy@us.ibm.com, patch from Markus Friedl <markus.friedl@informatik.uni-erlangen.de> - Auto-locate xauth. Patch from David Agraz <dagraz@jahoopa.com> - Compile fix from David Agraz <dagraz@jahoopa.com> - Avoid compiler warning in bsd-snprintf.c - Added pam_limits.so to default PAM config. Suggested by Jim Knoble <jmknoble@pobox.com>
Diffstat (limited to 'bsd-snprintf.c')
-rw-r--r--bsd-snprintf.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/bsd-snprintf.c b/bsd-snprintf.c
index 11c4ff39..e85d9296 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) */