diff options
author | Simon Josefsson <simon@josefsson.org> | 2004-10-05 19:50:21 +0000 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2004-10-05 19:50:21 +0000 |
commit | a870b749e9b15a7af7866e4198331d11344216df (patch) | |
tree | 3f7c2d07f4bffaad2bd42050eecf164f0e99d37e /gl/asnprintf.c | |
parent | 3ef902b571052587920e84c4b9865243edcc135a (diff) | |
download | gnutls-a870b749e9b15a7af7866e4198331d11344216df.tar.gz |
Add GNULib module, for missing snprintf on OSF1 V4.0, reported by
Yoann Vandoorselaere <yoann@prelude-ids.org>.
Note that lib/ does not yet use it.
Diffstat (limited to 'gl/asnprintf.c')
-rw-r--r-- | gl/asnprintf.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/gl/asnprintf.c b/gl/asnprintf.c new file mode 100644 index 0000000000..4881a9238f --- /dev/null +++ b/gl/asnprintf.c @@ -0,0 +1,37 @@ +/* Formatted output to strings. + Copyright (C) 1999, 2002 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +/* Specification. */ +#include "vasnprintf.h" + +#include <stdarg.h> + +char * +asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) +{ + va_list args; + char *result; + + va_start (args, format); + result = vasnprintf (resultbuf, lengthp, format, args); + va_end (args); + return result; +} |