2003-09-28 Timo Schulz <twoaday@freakmail.de>

* strgutil.c [WIN32] (asprintf): New.
This commit is contained in:
Timo Schulz 2003-09-28 17:15:46 +00:00
parent 7c637a098e
commit 024bc22231
2 changed files with 17 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2003-09-28 Timo Schulz <twoaday@freakmail.de>
* strgutil.c [WIN32] (asprintf): New.
2003-09-28 Werner Koch <wk@gnupg.org>
* ttyio.c (tty_fprintf): New.

View File

@ -868,7 +868,7 @@ strncasecmp( const char *a, const char *b, size_t n )
* FIXME: Write a new CRT for W32.
*/
int
vasprintf ( char **result, const char *format, va_list args)
vasprintf (char **result, const char *format, va_list args)
{
const char *p = format;
/* Add one to make sure that it is never zero, which might cause malloc
@ -954,4 +954,16 @@ vasprintf ( char **result, const char *format, va_list args)
return 0;
}
int
asprintf (char **buf, const char *fmt, ...)
{
int status;
va_list ap;
va_start (ap, fmt);
status = vasprintf (buf, fmt, ap);
va_end (ap);
return status;
}
#endif /*_WIN32*/