forked from KolibriOS/kolibrios
newlib: update
git-svn-id: svn://kolibrios.org@6099 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
#include <_ansi.h>
|
||||
#include <../ctype/local.h>
|
||||
|
||||
/* internal function to compute width of wide char. */
|
||||
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 __locale_cjk_lang ();
|
||||
|
||||
/*
|
||||
Taken from glibc:
|
||||
Add the compiler optimization to inhibit loop transformation to library
|
||||
calls. This is used to avoid recursive calls in memset and memmove
|
||||
default implementations.
|
||||
*/
|
||||
#ifdef _HAVE_CC_INHIBIT_LOOP_TO_LIBCALL
|
||||
# define __inhibit_loop_to_libcall \
|
||||
__attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns")))
|
||||
#else
|
||||
# define __inhibit_loop_to_libcall
|
||||
#endif
|
||||
|
||||
|
||||
#include <_ansi.h>
|
||||
#include <../ctype/local.h>
|
||||
|
||||
/* internal function to compute width of wide char. */
|
||||
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));
|
||||
|
||||
/*
|
||||
Taken from glibc:
|
||||
Add the compiler optimization to inhibit loop transformation to library
|
||||
calls. This is used to avoid recursive calls in memset and memmove
|
||||
default implementations.
|
||||
*/
|
||||
#ifdef _HAVE_CC_INHIBIT_LOOP_TO_LIBCALL
|
||||
# define __inhibit_loop_to_libcall \
|
||||
__attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns")))
|
||||
#else
|
||||
# define __inhibit_loop_to_libcall
|
||||
#endif
|
||||
|
||||
|
||||
|
@@ -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;
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
while (UNALIGNED (src))
|
||||
{
|
||||
|
@@ -50,7 +50,7 @@ _DEFUN (memset, (m, c, n),
|
||||
char *s = (char *) m;
|
||||
|
||||
#if !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__)
|
||||
int i;
|
||||
unsigned int i;
|
||||
unsigned long buffer;
|
||||
unsigned long *aligned_addr;
|
||||
unsigned int d = c & 0xff; /* To avoid sign extension, copy C to an
|
||||
|
@@ -336,7 +336,7 @@ two_way_long_needle (const unsigned char *haystack, size_t haystack_len,
|
||||
after the mismatch. */
|
||||
shift = needle_len - period;
|
||||
}
|
||||
memory = 0;
|
||||
memory = 0;
|
||||
j += shift;
|
||||
continue;
|
||||
}
|
||||
|
@@ -96,8 +96,9 @@ QUICKREF
|
||||
* Find the first occurrence of find in s, ignore case.
|
||||
*/
|
||||
char *
|
||||
strcasestr(s, find)
|
||||
const char *s, *find;
|
||||
_DEFUN (strcasestr, (s, find),
|
||||
_CONST char *s _AND
|
||||
_CONST char *find)
|
||||
{
|
||||
#if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__)
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#include <string.h>
|
||||
|
||||
char *
|
||||
_DEFUN (_strdup_r, (reent_ptr, str),
|
||||
_DEFUN (_strdup_r, (reent_ptr, str),
|
||||
struct _reent *reent_ptr _AND
|
||||
_CONST char *str)
|
||||
{
|
||||
|
@@ -45,6 +45,9 @@ Permission denied
|
||||
o EADDRINUSE
|
||||
Address already in use
|
||||
|
||||
o EADDRNOTAVAIL
|
||||
Address not available
|
||||
|
||||
o EADV
|
||||
Advertise error
|
||||
|
||||
@@ -66,6 +69,9 @@ Bad message
|
||||
o EBUSY
|
||||
Device or resource busy
|
||||
|
||||
o ECANCELED
|
||||
Operation canceled
|
||||
|
||||
o ECHILD
|
||||
No children
|
||||
|
||||
@@ -78,6 +84,9 @@ Software caused connection abort
|
||||
o ECONNREFUSED
|
||||
Connection refused
|
||||
|
||||
o ECONNRESET
|
||||
Connection reset by peer
|
||||
|
||||
o EDEADLK
|
||||
Deadlock
|
||||
|
||||
@@ -88,7 +97,7 @@ o EEXIST
|
||||
File exists
|
||||
|
||||
o EDOM
|
||||
Math argument
|
||||
Mathematics argument out of domain of function
|
||||
|
||||
o EFAULT
|
||||
Bad address
|
||||
@@ -105,6 +114,9 @@ Host is unreachable
|
||||
o EIDRM
|
||||
Identifier removed
|
||||
|
||||
o EILSEQ
|
||||
Illegal byte sequence
|
||||
|
||||
o EINPROGRESS
|
||||
Connection already in progress
|
||||
|
||||
@@ -139,7 +151,7 @@ o ELIBSCN
|
||||
<<.lib>> section in a.out corrupted
|
||||
|
||||
o EMFILE
|
||||
Too many open files
|
||||
File descriptor value too large
|
||||
|
||||
o EMLINK
|
||||
Too many links
|
||||
@@ -154,7 +166,10 @@ o ENAMETOOLONG
|
||||
File or path name too long
|
||||
|
||||
o ENETDOWN
|
||||
Network interface not configured
|
||||
Network interface is not configured
|
||||
|
||||
o ENETRESET
|
||||
Connection aborted by network
|
||||
|
||||
o ENETUNREACH
|
||||
Network is unreachable
|
||||
@@ -162,6 +177,12 @@ 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
|
||||
|
||||
@@ -216,6 +237,9 @@ Not a directory
|
||||
o ENOTEMPTY
|
||||
Directory not empty
|
||||
|
||||
o ENOTRECOVERABLE
|
||||
State not recoverable
|
||||
|
||||
o ENOTSOCK
|
||||
Socket operation on non-socket
|
||||
|
||||
@@ -228,6 +252,15 @@ 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
|
||||
|
||||
@@ -267,6 +300,9 @@ No such process
|
||||
o ESRMNT
|
||||
Srmount error
|
||||
|
||||
o ESTRPIPE
|
||||
Strings pipe error
|
||||
|
||||
o ETIME
|
||||
Stream ioctl timeout
|
||||
|
||||
@@ -276,21 +312,12 @@ 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.
|
||||
@@ -504,6 +531,11 @@ _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";
|
||||
@@ -511,7 +543,7 @@ _DEFUN (_strerror_r, (ptr, errnum, internal, errptr),
|
||||
#endif
|
||||
#ifdef EMFILE
|
||||
case EMFILE:
|
||||
error = "Too many open files";
|
||||
error = "File descriptor value too large";
|
||||
break;
|
||||
#endif
|
||||
#ifdef ENOTTY
|
||||
@@ -566,7 +598,7 @@ _DEFUN (_strerror_r, (ptr, errnum, internal, errptr),
|
||||
#endif
|
||||
#ifdef EDOM
|
||||
case EDOM:
|
||||
error = "Math argument";
|
||||
error = "Mathematics argument out of domain of function";
|
||||
break;
|
||||
#endif
|
||||
#ifdef ERANGE
|
||||
@@ -584,6 +616,11 @@ _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";
|
||||
@@ -724,6 +761,11 @@ _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";
|
||||
@@ -754,11 +796,21 @@ _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";
|
||||
@@ -809,6 +861,11 @@ _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";
|
||||
@@ -823,7 +880,7 @@ _DEFUN (_strerror_r, (ptr, errnum, internal, errptr),
|
||||
if (!errptr)
|
||||
errptr = &ptr->_errno;
|
||||
if ((error = _user_strerror (errnum, internal, errptr)) == 0)
|
||||
error = "";
|
||||
error = "";
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -14,24 +14,24 @@ INDEX
|
||||
ANSI_SYNOPSIS
|
||||
#include <string.h>
|
||||
char *strtok(char *restrict <[source]>,
|
||||
const char *restrict <[delimiters]>)
|
||||
const char *restrict <[delimiters]>);
|
||||
char *strtok_r(char *restrict <[source]>,
|
||||
const char *restrict <[delimiters]>,
|
||||
char **<[lasts]>)
|
||||
char *strsep(char **<[source_ptr]>, const char *<[delimiters]>)
|
||||
char **<[lasts]>);
|
||||
char *strsep(char **<[source_ptr]>, const char *<[delimiters]>);
|
||||
|
||||
TRAD_SYNOPSIS
|
||||
#include <string.h>
|
||||
char *strtok(<[source]>, <[delimiters]>)
|
||||
char *strtok(<[source]>, <[delimiters]>);
|
||||
char *<[source]>;
|
||||
char *<[delimiters]>;
|
||||
|
||||
char *strtok_r(<[source]>, <[delimiters]>, <[lasts]>)
|
||||
char *strtok_r(<[source]>, <[delimiters]>, <[lasts]>);
|
||||
char *<[source]>;
|
||||
char *<[delimiters]>;
|
||||
char **<[lasts]>;
|
||||
|
||||
char *strsep(<[source_ptr]>, <[delimiters]>)
|
||||
char *strsep(<[source_ptr]>, <[delimiters]>);
|
||||
char **<[source_ptr]>;
|
||||
char *<[delimiters]>;
|
||||
|
||||
|
@@ -6,5 +6,10 @@ _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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user