Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2011-08-23 16:03:55 +0400
committerRalf Corsepius <ralf.corsepius@rtems.org>2011-08-23 16:03:55 +0400
commit1c5c40f638cf66cced5ed614a3e937a3d6be79f8 (patch)
treee324ae1033a065a080fc1b0a15006d48a72e4ca2
parentda344d0ea92b1e566f53b1bb31eb4ac8bd7b6c5f (diff)
2011-08-23 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/stdlib/putenv_r.c: Use "strchr" instead of obsolete "index". * libc/stdlib/setenv_r.c: Use "memcpy" instead of obsolete "bcopy".
-rw-r--r--newlib/ChangeLog5
-rw-r--r--newlib/libc/stdlib/putenv_r.c2
-rw-r--r--newlib/libc/stdlib/setenv_r.c2
3 files changed, 7 insertions, 2 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 3991a837f..f3f6a96c8 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,5 +1,10 @@
2011-08-23 Ralf Corsépius <ralf.corsepius@rtems.org>
+ * libc/stdlib/putenv_r.c: Use "strchr" instead of obsolete "index".
+ * libc/stdlib/setenv_r.c: Use "memcpy" instead of obsolete "bcopy".
+
+2011-08-23 Ralf Corsépius <ralf.corsepius@rtems.org>
+
* libc/misc/ffs.c, libc/string/bcmp.c, libc/string/bcopy.c,
libc/string/bzero.c, libc/string/index.c, libc/string/rindex.c,
libc/string/strcasecmp.c, libc/string/strncasecmp.c:
diff --git a/newlib/libc/stdlib/putenv_r.c b/newlib/libc/stdlib/putenv_r.c
index 9ba626025..a0f476721 100644
--- a/newlib/libc/stdlib/putenv_r.c
+++ b/newlib/libc/stdlib/putenv_r.c
@@ -43,7 +43,7 @@ _DEFUN (_putenv_r, (reent_ptr, str),
if (!p)
return 1;
- if (!(equal = index (p, '=')))
+ if (!(equal = strchr (p, '=')))
{
(void) _free_r (reent_ptr, p);
return 1;
diff --git a/newlib/libc/stdlib/setenv_r.c b/newlib/libc/stdlib/setenv_r.c
index d73ba3949..f9ff2c1cd 100644
--- a/newlib/libc/stdlib/setenv_r.c
+++ b/newlib/libc/stdlib/setenv_r.c
@@ -110,7 +110,7 @@ _DEFUN (_setenv_r, (reent_ptr, name, value, rewrite),
ENV_UNLOCK;
return (-1);
}
- bcopy ((char *) *p_environ, (char *) P, cnt * sizeof (char *));
+ memcpy((char *) P,(char *) *p_environ, cnt * sizeof (char *));
*p_environ = P;
}
(*p_environ)[cnt + 1] = NULL;