mirror of
https://github.com/adtools/clib2.git
synced 2026-05-04 03:05:11 +00:00
Copied the changes which introduced ENOTSUP to <errno.h> and the related strerror_r() function.
This commit is contained in:
@@ -166,6 +166,8 @@ extern int errno;
|
|||||||
|
|
||||||
#define EILSEQ 85 /* Encoding error detected */
|
#define EILSEQ 85 /* Encoding error detected */
|
||||||
|
|
||||||
|
#define ENOTSUP 86 /* Not supported */
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
static const char * error_table[EILSEQ - EPERM + 1] =
|
static const char * error_table[ENOTSUP - EPERM + 1] =
|
||||||
{
|
{
|
||||||
"Operation not permitted",
|
"Operation not permitted",
|
||||||
"No such file or directory",
|
"No such file or directory",
|
||||||
@@ -127,7 +127,8 @@ static const char * error_table[EILSEQ - EPERM + 1] =
|
|||||||
"Identifier removed",
|
"Identifier removed",
|
||||||
"No message of the desired type.",
|
"No message of the desired type.",
|
||||||
"Value too large to be stored in data type.",
|
"Value too large to be stored in data type.",
|
||||||
"Encoding error detected"
|
"Encoding error detected",
|
||||||
|
"Not supported"
|
||||||
};
|
};
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
@@ -139,7 +140,7 @@ strerror_r(int number,char * buffer,size_t buffer_size)
|
|||||||
const char * str;
|
const char * str;
|
||||||
size_t len;
|
size_t len;
|
||||||
|
|
||||||
if(number < EPERM || number > EILSEQ)
|
if(number < EPERM || number > ENOTSUP)
|
||||||
{
|
{
|
||||||
__set_errno(EINVAL);
|
__set_errno(EINVAL);
|
||||||
goto out;
|
goto out;
|
||||||
|
|||||||
Reference in New Issue
Block a user