summaryrefslogtreecommitdiff
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 11c4ff39c..e85d9296a 100644
--- a/bsd-snprintf.c
+++ b/bsd-snprintf.c
@@ -101,30 +101,6 @@ mcleanup(str, n, p)
101 free(curobj); 101 free(curobj);
102} 102}
103 103
104#if !defined(HAVE_SNPRINTF)
105int
106#if __STDC__
107snprintf(char *str, size_t n, char const *fmt, ...)
108#else
109snprintf(str, n, fmt, va_alist)
110 char *str;
111 size_t n;
112 char *fmt;
113 va_dcl
114#endif
115{
116 va_list ap;
117#if __STDC__
118 va_start(ap, fmt);
119#else
120 va_start(ap);
121#endif
122
123 return (vsnprintf(str, n, fmt, ap));
124 va_end(ap);
125}
126#endif /* !defined(HAVE_SNPRINTF) */
127
128#if !defined(HAVE_VSNPRINTF) 104#if !defined(HAVE_VSNPRINTF)
129int 105int
130vsnprintf(str, n, fmt, ap) 106vsnprintf(str, n, fmt, ap)
@@ -159,4 +135,28 @@ vsnprintf(str, n, fmt, ap)
159} 135}
160#endif /* !defined(HAVE_VSNPRINTF) */ 136#endif /* !defined(HAVE_VSNPRINTF) */
161 137
138#if !defined(HAVE_SNPRINTF)
139int
140#if __STDC__
141snprintf(char *str, size_t n, char const *fmt, ...)
142#else
143snprintf(str, n, fmt, va_alist)
144 char *str;
145 size_t n;
146 char *fmt;
147 va_dcl
148#endif
149{
150 va_list ap;
151#if __STDC__
152 va_start(ap, fmt);
153#else
154 va_start(ap);
155#endif
156
157 return (vsnprintf(str, n, fmt, ap));
158 va_end(ap);
159}
160#endif /* !defined(HAVE_SNPRINTF) */
161
162#endif /* !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) */ 162#endif /* !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) */