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:
Diffstat (limited to 'newlib/libc/string')
-rw-r--r--newlib/libc/string/local.h2
-rw-r--r--newlib/libc/string/memccpy.c2
-rw-r--r--newlib/libc/string/memchr.c2
-rw-r--r--newlib/libc/string/memrchr.c2
-rw-r--r--newlib/libc/string/memset.c2
-rw-r--r--newlib/libc/string/rawmemchr.c4
-rw-r--r--newlib/libc/string/strcasestr.c5
-rw-r--r--newlib/libc/string/strerror.c91
-rw-r--r--newlib/libc/string/u_strerr.c5
9 files changed, 26 insertions, 89 deletions
diff --git a/newlib/libc/string/local.h b/newlib/libc/string/local.h
index babaad0e5..dfe01d70b 100644
--- a/newlib/libc/string/local.h
+++ b/newlib/libc/string/local.h
@@ -6,7 +6,7 @@ int _EXFUN (__wcwidth, (wint_t));
/* Defined in locale/locale.c. Returns a value != 0 if the current
language is assumed to use CJK fonts. */
-int _EXFUN (__locale_cjk_lang, (void));
+int __locale_cjk_lang ();
/*
Taken from glibc:
diff --git a/newlib/libc/string/memccpy.c b/newlib/libc/string/memccpy.c
index 332ed4660..dded85781 100644
--- a/newlib/libc/string/memccpy.c
+++ b/newlib/libc/string/memccpy.c
@@ -98,7 +98,7 @@ _DEFUN (memccpy, (dst0, src0, endchar, len0),
then punt into the byte copy loop. This should be rare. */
if (!TOO_SMALL(len0) && !UNALIGNED (src, dst))
{
- unsigned int i;
+ int i;
unsigned long mask = 0;
aligned_dst = (long*)dst;
diff --git a/newlib/libc/string/memchr.c b/newlib/libc/string/memchr.c
index db0af7cd7..13ed88186 100644
--- a/newlib/libc/string/memchr.c
+++ b/newlib/libc/string/memchr.c
@@ -80,7 +80,7 @@ _DEFUN (memchr, (src_void, c, length),
#if !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__)
unsigned long *asrc;
unsigned long mask;
- unsigned int i;
+ int i;
while (UNALIGNED (src))
{
diff --git a/newlib/libc/string/memrchr.c b/newlib/libc/string/memrchr.c
index 60dee42ed..42d9d147b 100644
--- a/newlib/libc/string/memrchr.c
+++ b/newlib/libc/string/memrchr.c
@@ -80,7 +80,7 @@ _DEFUN (memrchr, (src_void, c, length),
#if !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__)
unsigned long *asrc;
unsigned long mask;
- unsigned int i;
+ int i;
while (UNALIGNED (src))
{
diff --git a/newlib/libc/string/memset.c b/newlib/libc/string/memset.c
index b84e155f7..ee91b056e 100644
--- a/newlib/libc/string/memset.c
+++ b/newlib/libc/string/memset.c
@@ -50,7 +50,7 @@ _DEFUN (memset, (m, c, n),
char *s = (char *) m;
#if !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__)
- unsigned int i;
+ int i;
unsigned long buffer;
unsigned long *aligned_addr;
unsigned int d = c & 0xff; /* To avoid sign extension, copy C to an
diff --git a/newlib/libc/string/rawmemchr.c b/newlib/libc/string/rawmemchr.c
index 4b5a4cdeb..a9e2acd85 100644
--- a/newlib/libc/string/rawmemchr.c
+++ b/newlib/libc/string/rawmemchr.c
@@ -77,7 +77,7 @@ _DEFUN (rawmemchr, (src_void, c),
#if !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__)
unsigned long *asrc;
unsigned long mask;
- unsigned int i;
+ int i;
while (UNALIGNED (src))
{
@@ -110,7 +110,7 @@ _DEFUN (rawmemchr, (src_void, c),
src = (unsigned char *) asrc;
-#endif /* !PREFER_SIZE_OVER_SPEED && !__OPTIMIZE_SIZE__ */
+#endif // !PREFER_SIZE_OVER_SPEED && !__OPTIMIZE_SIZE__
while (1)
{
diff --git a/newlib/libc/string/strcasestr.c b/newlib/libc/string/strcasestr.c
index 8fff00b00..1bde1cdbf 100644
--- a/newlib/libc/string/strcasestr.c
+++ b/newlib/libc/string/strcasestr.c
@@ -96,9 +96,8 @@ QUICKREF
* Find the first occurrence of find in s, ignore case.
*/
char *
-_DEFUN (strcasestr, (s, find),
- _CONST char *s _AND
- _CONST char *find)
+strcasestr(s, find)
+ const char *s, *find;
{
#if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__)
diff --git a/newlib/libc/string/strerror.c b/newlib/libc/string/strerror.c
index fcef33e0e..8852c36c7 100644
--- a/newlib/libc/string/strerror.c
+++ b/newlib/libc/string/strerror.c
@@ -45,9 +45,6 @@ Permission denied
o EADDRINUSE
Address already in use
-o EADDRNOTAVAIL
-Address not available
-
o EADV
Advertise error
@@ -69,9 +66,6 @@ Bad message
o EBUSY
Device or resource busy
-o ECANCELED
-Operation canceled
-
o ECHILD
No children
@@ -84,9 +78,6 @@ Software caused connection abort
o ECONNREFUSED
Connection refused
-o ECONNRESET
-Connection reset by peer
-
o EDEADLK
Deadlock
@@ -97,7 +88,7 @@ o EEXIST
File exists
o EDOM
-Mathematics argument out of domain of function
+Math argument
o EFAULT
Bad address
@@ -114,9 +105,6 @@ Host is unreachable
o EIDRM
Identifier removed
-o EILSEQ
-Illegal byte sequence
-
o EINPROGRESS
Connection already in progress
@@ -151,7 +139,7 @@ o ELIBSCN
<<.lib>> section in a.out corrupted
o EMFILE
-File descriptor value too large
+Too many open files
o EMLINK
Too many links
@@ -166,10 +154,7 @@ o ENAMETOOLONG
File or path name too long
o ENETDOWN
-Network interface is not configured
-
-o ENETRESET
-Connection aborted by network
+Network interface not configured
o ENETUNREACH
Network is unreachable
@@ -177,12 +162,6 @@ Network is unreachable
o ENFILE
Too many open files in system
-o ENOBUFS
-No buffer space available
-
-o ENODATA
-No data
-
o ENODEV
No such device
@@ -237,9 +216,6 @@ Not a directory
o ENOTEMPTY
Directory not empty
-o ENOTRECOVERABLE
-State not recoverable
-
o ENOTSOCK
Socket operation on non-socket
@@ -252,15 +228,6 @@ Not a character device
o ENXIO
No such device or address
-o EOPNOTSUPP
-Operation not supported on socket
-
-o EOVERFLOW
-Value too large for defined data type
-
-o EOWNERDEAD
-Previous owner died
-
o EPERM
Not owner
@@ -300,9 +267,6 @@ No such process
o ESRMNT
Srmount error
-o ESTRPIPE
-Strings pipe error
-
o ETIME
Stream ioctl timeout
@@ -312,12 +276,21 @@ Connection timed out
o ETXTBSY
Text file busy
-o EWOULDBLOCK
-Operation would block (usually same as EAGAIN)
-
o EXDEV
Cross-device link
+o ECANCELED
+Operation canceled
+
+o ENOTRECOVERABLE
+State not recoverable
+
+o EOWNERDEAD
+Previous owner died
+
+o ESTRPIPE
+Strings pipe error
+
o-
<<_strerror_r>> is a reentrant version of the above.
@@ -531,11 +504,6 @@ _DEFUN (_strerror_r, (ptr, errnum, internal, errptr),
error = "Network interface is not configured";
break;
#endif
-#ifdef ENETRESET
- case ENETRESET:
- error = "Connection aborted by network";
- break;
-#endif
#ifdef ENFILE
case ENFILE:
error = "Too many open files in system";
@@ -543,7 +511,7 @@ _DEFUN (_strerror_r, (ptr, errnum, internal, errptr),
#endif
#ifdef EMFILE
case EMFILE:
- error = "File descriptor value too large";
+ error = "Too many open files";
break;
#endif
#ifdef ENOTTY
@@ -598,7 +566,7 @@ _DEFUN (_strerror_r, (ptr, errnum, internal, errptr),
#endif
#ifdef EDOM
case EDOM:
- error = "Mathematics argument out of domain of function";
+ error = "Math argument";
break;
#endif
#ifdef ERANGE
@@ -616,11 +584,6 @@ _DEFUN (_strerror_r, (ptr, errnum, internal, errptr),
error = "Identifier removed";
break;
#endif
-#ifdef EILSEQ
- case EILSEQ:
- error = "Illegal byte sequence";
- break;
-#endif
#ifdef EDEADLK
case EDEADLK:
error = "Deadlock";
@@ -761,11 +724,6 @@ _DEFUN (_strerror_r, (ptr, errnum, internal, errptr),
error = "No buffer space available";
break;
#endif
-#ifdef ENODATA
- case ENODATA:
- error = "No data";
- break;
-#endif
#ifdef EAFNOSUPPORT
case EAFNOSUPPORT:
error = "Address family not supported by protocol family";
@@ -796,21 +754,11 @@ _DEFUN (_strerror_r, (ptr, errnum, internal, errptr),
error = "Connection refused";
break;
#endif
-#ifdef ECONNRESET
- case ECONNRESET:
- error = "Connection reset by peer";
- break;
-#endif
#ifdef EADDRINUSE
case EADDRINUSE:
error = "Address already in use";
break;
#endif
-#ifdef EADDRNOTAVAIL
- case EADDRNOTAVAIL:
- error = "Address not available";
- break;
-#endif
#ifdef ECONNABORTED
case ECONNABORTED:
error = "Software caused connection abort";
@@ -861,11 +809,6 @@ _DEFUN (_strerror_r, (ptr, errnum, internal, errptr),
error = "Operation not supported on socket";
break;
#endif
-#ifdef EOVERFLOW
- case EOVERFLOW:
- error = "Value too large for defined data type";
- break;
-#endif
#ifdef EMSGSIZE
case EMSGSIZE:
error = "Message too long";
diff --git a/newlib/libc/string/u_strerr.c b/newlib/libc/string/u_strerr.c
index 2978df0cf..7d902feb7 100644
--- a/newlib/libc/string/u_strerr.c
+++ b/newlib/libc/string/u_strerr.c
@@ -6,10 +6,5 @@ _DEFUN(_user_strerror, (errnum, internal, errptr),
int internal _AND
int *errptr)
{
- /* prevent warning about unused parameters */
- _CAST_VOID errnum;
- _CAST_VOID internal;
- _CAST_VOID errptr;
-
return 0;
}