1 /* Copyright (C) 2004 Manuel Novoa III <mjn3@codepoet.org> 2 * 3 * GNU Library General Public License (LGPL) version 2 or later. 4 * 5 * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details. 6 */ 7 8 #include <features.h> 9 10 #ifdef __USE_GNU 11 #include "_stdio.h" 12 #include <stdarg.h> 13 14 15 16 #ifndef __STDIO_HAS_VSNPRINTF 17 #warning Skipping asprintf and __asprintf since no vsnprintf! 18 #else 19 asprintf(char ** __restrict buf,const char * __restrict format,...)20int asprintf(char **__restrict buf, const char * __restrict format, ...) 21 { 22 va_list arg; 23 int rv; 24 25 va_start(arg, format); 26 rv = vasprintf(buf, format, arg); 27 va_end(arg); 28 29 return rv; 30 } 31 libc_hidden_def(asprintf) 32 33 #endif 34 #endif 35