diff options
Diffstat (limited to 'bsd-snprintf.c')
-rw-r--r-- | bsd-snprintf.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bsd-snprintf.c b/bsd-snprintf.c index c31fc38d6..ff26a1048 100644 --- a/bsd-snprintf.c +++ b/bsd-snprintf.c | |||
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | #include "config.h" | 27 | #include "config.h" |
28 | 28 | ||
29 | #if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) | 29 | #if defined(BROKEN_SNPRINTF) || !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) |
30 | 30 | ||
31 | #include <sys/param.h> | 31 | #include <sys/param.h> |
32 | #include <sys/types.h> | 32 | #include <sys/types.h> |
@@ -120,7 +120,7 @@ mcleanup(str, n, p) | |||
120 | free(curobj); | 120 | free(curobj); |
121 | } | 121 | } |
122 | 122 | ||
123 | #if !defined(HAVE_VSNPRINTF) | 123 | #if !defined(HAVE_VSNPRINTF) || defined(BROKEN_SNPRINTF) |
124 | int | 124 | int |
125 | vsnprintf(str, n, fmt, ap) | 125 | vsnprintf(str, n, fmt, ap) |
126 | char *str; | 126 | char *str; |
@@ -152,9 +152,9 @@ vsnprintf(str, n, fmt, ap) | |||
152 | (void) sigaction(SIGSEGV, &osa, NULL); | 152 | (void) sigaction(SIGSEGV, &osa, NULL); |
153 | return (ret); | 153 | return (ret); |
154 | } | 154 | } |
155 | #endif /* !defined(HAVE_VSNPRINTF) */ | 155 | #endif /* !defined(HAVE_VSNPRINTF) || defined(BROKEN_SNPRINTF) */ |
156 | 156 | ||
157 | #if !defined(HAVE_SNPRINTF) | 157 | #if !defined(HAVE_SNPRINTF) || defined(BROKEN_SNPRINTF) |
158 | int | 158 | int |
159 | #if __STDC__ | 159 | #if __STDC__ |
160 | snprintf(char *str, size_t n, char const *fmt, ...) | 160 | snprintf(char *str, size_t n, char const *fmt, ...) |
@@ -176,6 +176,6 @@ snprintf(str, n, fmt, va_alist) | |||
176 | return (vsnprintf(str, n, fmt, ap)); | 176 | return (vsnprintf(str, n, fmt, ap)); |
177 | va_end(ap); | 177 | va_end(ap); |
178 | } | 178 | } |
179 | #endif /* !defined(HAVE_SNPRINTF) */ | 179 | #endif /* !defined(HAVE_SNPRINTF) || defined(BROKEN_SNPRINTF) */ |
180 | 180 | ||
181 | #endif /* !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) */ | 181 | #endif /* defined(BROKEN_SNPRINTF) || !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) */ |