Include <stdlib.h>, for malloc().
authorBruno Haible <bruno@clisp.org>
Sat, 17 Mar 2007 18:35:49 +0000 (18:35 +0000)
committerBruno Haible <bruno@clisp.org>
Sat, 17 Mar 2007 18:35:49 +0000 (18:35 +0000)
ChangeLog
lib/unistr/u16-cpy-alloc.c [new file with mode: 0644]

index cc7c266..117c58f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2007-03-17  Bruno Haible  <bruno@clisp.org>
 
+       * lib/unistr/u8-cpy-alloc.c: Include <stdlib.h>.
+       * lib/unistr/u16-cpy-alloc.c: Include <stdlib.h>.
+       * lib/unistr/u32-cpy-alloc.c: Include <stdlib.h>.
+
+2007-03-17  Bruno Haible  <bruno@clisp.org>
+
        * gnulib-tool (func_import): Update .cvsignore and .gitignore files
        to reflect files copied from gnulib (with or without modifications).
        Suggested by Jim Meyering.
diff --git a/lib/unistr/u16-cpy-alloc.c b/lib/unistr/u16-cpy-alloc.c
new file mode 100644 (file)
index 0000000..605fc89
--- /dev/null
@@ -0,0 +1,29 @@
+/* Copy piece of UTF-16 string.
+   Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2002.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library 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.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "unistr.h"
+
+#include <stdlib.h>
+
+#define FUNC u16_cpy_alloc
+#define UNIT uint16_t
+#include "u-cpy-alloc.h"