summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2005-01-12 13:01:29 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:12:01 +0200
commit9177a68dfe6cec23cc2d8a429cec5d960d1fe9e5 (patch)
tree12434bac1a6ddb4ffd0e2dad68acaa6bc5075a5f
parentc9d6f710b8965a428649e2153ef191c965642747 (diff)
downloadexternal_gettext-9177a68dfe6cec23cc2d8a429cec5d960d1fe9e5.zip
external_gettext-9177a68dfe6cec23cc2d8a429cec5d960d1fe9e5.tar.gz
external_gettext-9177a68dfe6cec23cc2d8a429cec5d960d1fe9e5.tar.bz2
Update 'memmove' and 'memset' modules from gnulib.
-rw-r--r--gettext-tools/lib/ChangeLog5
-rw-r--r--gettext-tools/lib/memmove.c9
-rw-r--r--gettext-tools/lib/memset.c8
3 files changed, 16 insertions, 6 deletions
diff --git a/gettext-tools/lib/ChangeLog b/gettext-tools/lib/ChangeLog
index 1279c8e..b48431d 100644
--- a/gettext-tools/lib/ChangeLog
+++ b/gettext-tools/lib/ChangeLog
@@ -97,6 +97,11 @@
* mbswidth.h: Add extern "C" for C++.
Reported by Albert Chin-A-Young <china@thewrittenword.com>.
+2003-09-09 Paul Eggert <eggert@twinsun.com>
+
+ * memmove.c, memset.c: Include <stddef.h>.
+ Use types required by C89 in prototype.
+
2003-09-08 Paul Eggert <eggert@twinsun.com>
* atexit.c (atexit): Define using a prototype.
diff --git a/gettext-tools/lib/memmove.c b/gettext-tools/lib/memmove.c
index 5d4af5d..79cc782 100644
--- a/gettext-tools/lib/memmove.c
+++ b/gettext-tools/lib/memmove.c
@@ -7,10 +7,13 @@
# include <config.h>
#endif
+#include <stddef.h>
+
void *
-memmove (char *dest, const char *source, unsigned length)
+memmove (void *dest0, void const *source0, size_t length)
{
- char *d0 = dest;
+ char *dest = dest0;
+ char const *source = source0;
if (source < dest)
/* Moving from low mem to hi mem; start at end. */
for (source += length, dest += length; length; --length)
@@ -21,5 +24,5 @@ memmove (char *dest, const char *source, unsigned length)
for (; length; --length)
*dest++ = *source++;
}
- return (void *) d0;
+ return dest0;
}
diff --git a/gettext-tools/lib/memset.c b/gettext-tools/lib/memset.c
index 5744bcb..d7321b2 100644
--- a/gettext-tools/lib/memset.c
+++ b/gettext-tools/lib/memset.c
@@ -1,5 +1,5 @@
/* memset.c -- set an area of memory to a given value
- Copyright (C) 1991 Free Software Foundation, Inc.
+ Copyright (C) 1991, 2003 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
@@ -15,8 +15,10 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-char *
-memset (char *str, int c, unsigned int len)
+#include <stddef.h>
+
+void *
+memset (void *str, int c, size_t len)
{
register char *st = str;