2001-03-17 04:17:14 +05:30
|
|
|
/* vi: set sw=4 ts=4: */
|
|
|
|
/*
|
|
|
|
* Utility routines.
|
|
|
|
*
|
2004-03-15 13:59:22 +05:30
|
|
|
* Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
|
2001-03-17 04:17:14 +05:30
|
|
|
*
|
2010-08-16 23:44:46 +05:30
|
|
|
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
|
2001-03-17 04:17:14 +05:30
|
|
|
*/
|
|
|
|
|
|
|
|
#include "libbb.h"
|
|
|
|
|
2006-12-19 03:19:06 +05:30
|
|
|
#if defined(__GLIBC__) && __GLIBC__ < 2
|
2008-06-27 08:22:20 +05:30
|
|
|
int FAST_FUNC vdprintf(int d, const char *format, va_list ap)
|
2001-03-17 04:17:14 +05:30
|
|
|
{
|
2011-10-24 07:36:18 +05:30
|
|
|
char buf[8 * 1024];
|
2001-03-17 04:17:14 +05:30
|
|
|
int len;
|
|
|
|
|
2011-10-24 07:36:18 +05:30
|
|
|
len = vsnprintf(buf, sizeof(buf), format, ap);
|
2001-03-17 04:17:14 +05:30
|
|
|
return write(d, buf, len);
|
|
|
|
}
|
|
|
|
#endif
|