X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fxvasprintf.c;h=fd7f21b101d49c2f0b5b480664cf5b1f3eef57ee;hb=e29e19dce9e19be76fae92b0955d02c843333093;hp=d68a50d83c61dc79cfe6db4c2248265d0bba598a;hpb=f46a1e87e0533bfb1801edf0465c45f7fe574f5c;p=gnulib.git
diff --git a/lib/xvasprintf.c b/lib/xvasprintf.c
index d68a50d83..fd7f21b10 100644
--- a/lib/xvasprintf.c
+++ b/lib/xvasprintf.c
@@ -1,23 +1,20 @@
/* vasprintf and asprintf with out-of-memory checking.
- Copyright (C) 1999, 2002-2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002-2004, 2006-2008 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ 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.
+ the Free Software Foundation; either version 3 of the License, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see . */
-#ifdef HAVE_CONFIG_H
-# include
-#endif
+#include
/* Specification. */
#include "xvasprintf.h"
@@ -25,18 +22,13 @@
#include
#include
#include
+#include
-#include "vasprintf.h"
#include "xalloc.h"
/* Checked size_t computations. */
#include "xsize.h"
-/* Some systems, like OSF/1 4.0 and Woe32, don't have EOVERFLOW. */
-#ifndef EOVERFLOW
-# define EOVERFLOW E2BIG
-#endif
-
static inline char *
xstrcat (size_t argcount, va_list args)
{
@@ -66,7 +58,7 @@ xstrcat (size_t argcount, va_list args)
}
/* Allocate and fill the result string. */
- result = (char *) xmalloc (totalsize + 1);
+ result = XNMALLOC (totalsize + 1, char);
p = result;
for (i = argcount; i > 0; i--)
{