1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-27 14:04:05 +03:00

r18401: some of our code also relies on fprintf() handling C99

semantics. Easiest to just replace it if it doesn't.
(This used to be commit 5fc756a770b6f457bf103e2a8a240ca020fd1a02)
This commit is contained in:
Andrew Tridgell 2006-09-11 21:32:08 +00:00 committed by Gerald (Jerry) Carter
parent 513568b7e2
commit ac3e41af37

View File

@ -1230,6 +1230,27 @@ static int add_cnk_list_entry(struct pr_chunk_x **list,
}
#endif
#ifndef HAVE_C99_VSNPRINTF
int fprintf(FILE *stream, const char *fmt, ...)
{
va_list ap;
int ret;
char *s;
s = NULL;
va_start(ap, fmt);
ret = vasprintf(&s, fmt, ap);
va_end(ap);
if (s) {
fwrite(s, 1, strlen(s), stream);
}
free(s);
return ret;
}
#endif
#endif
#ifndef HAVE_VASPRINTF