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:
authorJeff Johnston <jjohnstn@redhat.com>2002-08-29 23:38:25 +0400
committerJeff Johnston <jjohnstn@redhat.com>2002-08-29 23:38:25 +0400
commit890e7a1d1a7d701e6e5e0674e58aebe595575375 (patch)
tree6da470c325a8768eb04188a5bfa6b34b39fe02e6 /newlib/libc/stdlib
parent86620e21902f8ad14acf919d15bb49b9455311a6 (diff)
2002-08-29 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
* libc/include/wchar.h: Define NULL. Define WEOF more general way. Declare functions in newlib manner. * libc/stdlib/Makefile.am: Delete wmem*.c * libc/stdlib/Makefile.in: Regenerated. * libc/stdlib/wmemchr.c: Delete. * libc/stdlib/wmemcmp.c: Ditto. * libc/stdlib/wmemcpy.c: Ditto. * libc/stdlib/wmemmove.c: Ditto. * libc/stdlib/wmemset.c: Ditto. * libc/string/Makefile.am: Add wmem*.c and wcs*.c. * libc/string/Makefile.in: Regenerated. * libc/string/wcscat.c: New file derived from the NetBSD C Library. * libc/string/wcschr.c: Ditto. * libc/string/wcscmp.c: Ditto. * libc/string/wcscpy.c: Ditto. * libc/string/wcscspn.c: Ditto. * libc/string/wcslcat.c: Ditto. * libc/string/wcslcpy.c: Ditto. * libc/string/wcslen.c: Ditto. * libc/string/wcsncat.c: Ditto. * libc/string/wcsncmp.c: Ditto. * libc/string/wcsncpy.c: Ditto. * libc/string/wcspbrk.c: Ditto. * libc/string/wcsrchr.c: Ditto. * libc/string/wcsspn.c: Ditto. * libc/string/wcsstr.c: Ditto. * libc/string/wmemchr.c: Ditto. * libc/string/wmemcmp.c: Ditto. * libc/string/wmemcpy.c: Ditto. * libc/string/wmemmove.c: Ditto. * libc/string/wmemset.c: Ditto.
Diffstat (limited to 'newlib/libc/stdlib')
-rw-r--r--newlib/libc/stdlib/Makefile.am7
-rw-r--r--newlib/libc/stdlib/Makefile.in31
-rw-r--r--newlib/libc/stdlib/wmemchr.c49
-rw-r--r--newlib/libc/stdlib/wmemcmp.c49
-rw-r--r--newlib/libc/stdlib/wmemcpy.c41
-rw-r--r--newlib/libc/stdlib/wmemmove.c41
-rw-r--r--newlib/libc/stdlib/wmemset.c47
7 files changed, 12 insertions, 253 deletions
diff --git a/newlib/libc/stdlib/Makefile.am b/newlib/libc/stdlib/Makefile.am
index d90c8fad4..cdd7987a0 100644
--- a/newlib/libc/stdlib/Makefile.am
+++ b/newlib/libc/stdlib/Makefile.am
@@ -49,12 +49,7 @@ GENERAL_SOURCES = \
wcstombs.c \
wcstombs_r.c \
wctomb.c \
- wctomb_r.c \
- wmemchr.c \
- wmemcmp.c \
- wmemcpy.c \
- wmemmove.c \
- wmemset.c
+ wctomb_r.c
EXTENDED_SOURCES = \
drand48.c \
diff --git a/newlib/libc/stdlib/Makefile.in b/newlib/libc/stdlib/Makefile.in
index 6baa24f51..6f72debaf 100644
--- a/newlib/libc/stdlib/Makefile.in
+++ b/newlib/libc/stdlib/Makefile.in
@@ -155,12 +155,7 @@ GENERAL_SOURCES = \
wcstombs.c \
wcstombs_r.c \
wctomb.c \
- wctomb_r.c \
- wmemchr.c \
- wmemcmp.c \
- wmemcpy.c \
- wmemmove.c \
- wmemset.c
+ wctomb_r.c
EXTENDED_SOURCES = \
@@ -312,15 +307,12 @@ LIBS = @LIBS@
@USE_LIBTOOL_FALSE@realloc.$(OBJEXT) strtod.$(OBJEXT) strtol.$(OBJEXT) \
@USE_LIBTOOL_FALSE@strtoul.$(OBJEXT) wcstombs.$(OBJEXT) \
@USE_LIBTOOL_FALSE@wcstombs_r.$(OBJEXT) wctomb.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@wctomb_r.$(OBJEXT) wmemchr.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@wmemcmp.$(OBJEXT) wmemcpy.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@wmemmove.$(OBJEXT) wmemset.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@drand48.$(OBJEXT) ecvtbuf.$(OBJEXT) efgcvt.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@erand48.$(OBJEXT) jrand48.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@lcong48.$(OBJEXT) lrand48.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@mrand48.$(OBJEXT) msize.$(OBJEXT) mtrim.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@nrand48.$(OBJEXT) rand48.$(OBJEXT) seed48.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@srand48.$(OBJEXT) strtoll.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@wctomb_r.$(OBJEXT) drand48.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@ecvtbuf.$(OBJEXT) efgcvt.$(OBJEXT) erand48.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@jrand48.$(OBJEXT) lcong48.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@lrand48.$(OBJEXT) mrand48.$(OBJEXT) msize.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@mtrim.$(OBJEXT) nrand48.$(OBJEXT) rand48.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@seed48.$(OBJEXT) srand48.$(OBJEXT) strtoll.$(OBJEXT) \
@USE_LIBTOOL_FALSE@strtoll_r.$(OBJEXT) strtoull.$(OBJEXT) \
@USE_LIBTOOL_FALSE@strtoull_r.$(OBJEXT)
LTLIBRARIES = $(noinst_LTLIBRARIES)
@@ -334,11 +326,10 @@ LTLIBRARIES = $(noinst_LTLIBRARIES)
@USE_LIBTOOL_TRUE@mbstowcs.lo mbstowcs_r.lo mbtowc.lo mbtowc_r.lo \
@USE_LIBTOOL_TRUE@mlock.lo mprec.lo mstats.lo rand.lo rand_r.lo \
@USE_LIBTOOL_TRUE@realloc.lo strtod.lo strtol.lo strtoul.lo wcstombs.lo \
-@USE_LIBTOOL_TRUE@wcstombs_r.lo wctomb.lo wctomb_r.lo wmemchr.lo \
-@USE_LIBTOOL_TRUE@wmemcmp.lo wmemcpy.lo wmemmove.lo wmemset.lo \
-@USE_LIBTOOL_TRUE@drand48.lo ecvtbuf.lo efgcvt.lo erand48.lo jrand48.lo \
-@USE_LIBTOOL_TRUE@lcong48.lo lrand48.lo mrand48.lo msize.lo mtrim.lo \
-@USE_LIBTOOL_TRUE@nrand48.lo rand48.lo seed48.lo srand48.lo strtoll.lo \
+@USE_LIBTOOL_TRUE@wcstombs_r.lo wctomb.lo wctomb_r.lo drand48.lo \
+@USE_LIBTOOL_TRUE@ecvtbuf.lo efgcvt.lo erand48.lo jrand48.lo lcong48.lo \
+@USE_LIBTOOL_TRUE@lrand48.lo mrand48.lo msize.lo mtrim.lo nrand48.lo \
+@USE_LIBTOOL_TRUE@rand48.lo seed48.lo srand48.lo strtoll.lo \
@USE_LIBTOOL_TRUE@strtoll_r.lo strtoull.lo strtoull_r.lo
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
diff --git a/newlib/libc/stdlib/wmemchr.c b/newlib/libc/stdlib/wmemchr.c
deleted file mode 100644
index f236ce056..000000000
--- a/newlib/libc/stdlib/wmemchr.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*-
- * Copyright (c)1999 Citrus Project,
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * citrus Id: wmemchr.c,v 1.2 2000/12/20 14:08:31 itojun Exp
- */
-
-#include <_ansi.h>
-#include <stdlib.h>
-#include <wchar.h>
-
-wchar_t *
-_DEFUN (wmemchr, (s, c, n),
- const wchar_t *s _AND
- wchar_t c _AND
- size_t n)
-{
- size_t i;
-
- for (i = 0; i < n; i++) {
- if (*s == c) {
- /* LINTED const castaway */
- return (wchar_t *)s;
- }
- s++;
- }
- return NULL;
-}
diff --git a/newlib/libc/stdlib/wmemcmp.c b/newlib/libc/stdlib/wmemcmp.c
deleted file mode 100644
index 967acb3bd..000000000
--- a/newlib/libc/stdlib/wmemcmp.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*-
- * Copyright (c)1999 Citrus Project,
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * citrus Id: wmemcmp.c,v 1.2 2000/12/20 14:08:31 itojun Exp
- */
-
-#include <_ansi.h>
-#include <wchar.h>
-
-int
-_DEFUN (wmemcmp, (s1, s2, n),
- const wchar_t *s1 _AND
- const wchar_t *s2 _AND
- size_t n)
-{
- size_t i;
-
- for (i = 0; i < n; i++) {
- if (*s1 != *s2) {
- /* wchar might be unsigned */
- return *s1 > *s2 ? 1 : -1;
- }
- s1++;
- s2++;
- }
- return 0;
-}
diff --git a/newlib/libc/stdlib/wmemcpy.c b/newlib/libc/stdlib/wmemcpy.c
deleted file mode 100644
index 83ad5fc31..000000000
--- a/newlib/libc/stdlib/wmemcpy.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/*-
- * Copyright (c)1999 Citrus Project,
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * citrus Id: wmemcpy.c,v 1.2 2000/12/20 14:08:31 itojun Exp
- */
-
-#include <_ansi.h>
-#include <string.h>
-#include <wchar.h>
-
-wchar_t *
-_DEFUN (wmemcpy, (d, s, n),
- wchar_t *d _AND
- const wchar_t *s _AND
- size_t n)
-{
-
- return (wchar_t *)memcpy(d, s, n * sizeof(wchar_t));
-}
diff --git a/newlib/libc/stdlib/wmemmove.c b/newlib/libc/stdlib/wmemmove.c
deleted file mode 100644
index 686a2f7ad..000000000
--- a/newlib/libc/stdlib/wmemmove.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/*-
- * Copyright (c)1999 Citrus Project,
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * citrus Id: wmemmove.c,v 1.2 2000/12/20 14:08:31 itojun Exp
- */
-
-#include <_ansi.h>
-#include <string.h>
-#include <wchar.h>
-
-wchar_t *
-_DEFUN (wmemmove, (d, s, n),
- wchar_t *d _AND
- const wchar_t *s _AND
- size_t n)
-{
-
- return (wchar_t *)memmove(d, s, n * sizeof(wchar_t));
-}
diff --git a/newlib/libc/stdlib/wmemset.c b/newlib/libc/stdlib/wmemset.c
deleted file mode 100644
index bb4572739..000000000
--- a/newlib/libc/stdlib/wmemset.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*-
- * Copyright (c)1999 Citrus Project,
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * citrus Id: wmemset.c,v 1.2 2000/12/20 14:08:31 itojun Exp
- */
-
-#include <_ansi.h>
-#include <wchar.h>
-
-wchar_t *
-_DEFUN(wmemset, (s, c, n),
- wchar_t *s _AND
- wchar_t c _AND
- size_t n)
-{
- size_t i;
- wchar_t *p;
-
- p = (wchar_t *)s;
- for (i = 0; i < n; i++) {
- *p = c;
- p++;
- }
- return s;
-}