/* * asprintf(3) * 20020809 entropy@tappedin.com * public domain. no warranty. use at your own risk. have a nice day. */ #if HAVE_CONFIG_H #include #endif #include #include #if HAVE_STRING_H #include #endif /* HAVE_STRING_H */ #include "tds_sysdep_private.h" #include "replacements.h" TDS_RCSID(var, "$Id: asprintf.c,v 1.6 2005/07/15 11:52:18 freddy77 Exp $"); int asprintf(char **ret, const char *fmt, ...) { int len; va_list ap; va_start(ap, fmt); len = vasprintf(ret, fmt, ap); va_end(ap); return len; }