History log of /haiku/src/system/libroot/posix/string/strerror.c
Revision Date Author Comments
# d338200e 30-May-2022 Trung Nguyen <trungnt282910@gmail.com>

libs/posix: Implemented new locale functions

Implemented the missing POSIX functions in <locale.h>:
newlocale, duplocale, uselocale, and freelocale, and also
provided missing type definitions for <locale.h>.

Implemented missing POSIX locale-based function variants.

Modified LocaleBackend so that it could support thread-local
locales.

Some glibc-like locale-related variables supporting
ctype and printf family of functions have also been updated
to reflect the thread-local variables present in the latest
glibc sources.

As there have been some modifications to global symbols
in libroot, libroot_stubs.c has been regenerated.

Bug: #17168
Change-Id: Ibf296c58c47d42d1d1dfb2ce64042442f2679431
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5351
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# eb1d596f 19-Oct-2021 Augustin Cavalier <waddlesplash@gmail.com>

Remove B_FILE_NOT_FOUND from public headers.

Now that it is not used anywhere in the source tree following
previous commits.

Change-Id: Id2fc417a0658d09148e99587c613a928f1fbe4c2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4611
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 52b4ed60 14-Oct-2021 Jérôme Duval <jerome.duval@gmail.com>

Errors.h: add ENOTRECOVERABLE and EOWNERDEAD from POSIX

https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html
Change-Id: I3c0a08d447c897b3caba8d365f8e5dbab7869f18
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4573
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# 98f35f3a 29-Jul-2014 François Revol <revol@free.fr>

Add EHOSTDOWN to strerror()


# 65b2278e 29-Jul-2014 François Revol <revol@free.fr>

How come we missed the case B_DONT_DO_THAT in strerror() ???


# 917634bc 29-Jul-2014 François Revol <revol@free.fr>

Add missing strings to strerror() for hrev46649


# dec78bb2 20-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Add new error codes B_PARTIAL_{READ,WRITE}


# f916b680 27-Sep-2012 François Revol <revol@free.fr>

B_POSIX_ENOMEM is obviously an error...

* was wrongly reported as "No error"


# e09d819b 28-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Since the Media/Translation Kit errors are now in Errors.h as well, we don't
need to include those two anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32781 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2fb48fb4 25-Aug-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Added missing ENOATTR text.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32681 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 39d58e2f 22-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Experimental approach to tackle the problem with Be's negative error codes and
ported software:
* If the macro B_USE_POSITIVE_POSIX_ERRORS is defined the POSIX error code
constants (ENOMEM, EINTR,...) will have positive values.
* Introduced the macros B_TO_{POSITIVE,NEGATIVE}_ERROR() which do convert a
given error code to a positive/negative value.
* Added static library libposix_error_mapper.a that overrides all POSIX
functions (save the ones I forgot to add :-)) directly meddling with error
codes (having them as parameter or returning them) dealing with the
positive<->negative error code conversions. The functions have hidden
visibility, so they affect only the shared object they are linked into.
* So ideally all one has to do is to build a ported software with
-DB_USE_POSITIVE_POSIX_ERRORS and -lposix_error_mapper and be good with
respect to error code problems.
* Potential issues:
- When mixing ported and Haiku native code, i.e. using Haiku native code in
a ported software or using a ported library in a Haiku native application
care must be taken to convert error codes where the two interface. That's
what the B_TO_{POSITIVE,NEGATIVE}_ERROR() macros are supposed to be used
for.
- A ported static library can obviously not be linked directly against
-lposix_error_mapper. The shared object linking a against the ported static
library has to do that. The previous point applies when that causes mixing
with Haiku native code.
- When dependent ported libraries are used probably all of them should use
the error mapping.

Comments welcome.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29653 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 99fe8fb0 11-Jan-2009 Axel Dörfler <axeld@pinc-software.de>

* "" is not really a good error description.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28879 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c0acc2a5 09-May-2006 Jérôme Duval <korli@users.berlios.de>

fixed typo


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17403 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bba1e5c8 08-May-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

Added media kit error descriptions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17369 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a406236d 03-Jul-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

New error codes:
- B_SHUTDOWN_CANCELLED: The shutdown process was cancelled (most likely by
the user).
- B_SHUTTING_DOWN: An operation cannot be performed, since the system is
shutting down (e.g. BApplication creation).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13413 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1b22c05a 29-May-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed warning I introduced before.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12887 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2e95dad4 29-May-2005 Axel Dörfler <axeld@pinc-software.de>

strerror() no longer reports "Unknown Application Error" for positive values,
instead it now says "No Error".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12885 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5af32e75 13-Apr-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed src/kernel to src/system.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12359 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 98f35f3a9239034b6e8e7a3fdf0ddce4efab39d3 29-Jul-2014 François Revol <revol@free.fr>

Add EHOSTDOWN to strerror()


# 65b2278e9a350ad2760cfbea6650db8bf245e5cd 29-Jul-2014 François Revol <revol@free.fr>

How come we missed the case B_DONT_DO_THAT in strerror() ???


# 917634bc8aa80a727aee940fc2e3b8b7eed9458e 29-Jul-2014 François Revol <revol@free.fr>

Add missing strings to strerror() for hrev46649


# dec78bb27cbfef8274399c82bfd8ce65f587f6f2 20-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Add new error codes B_PARTIAL_{READ,WRITE}


# f916b680799e1b795a068de62dced124ca282864 27-Sep-2012 François Revol <revol@free.fr>

B_POSIX_ENOMEM is obviously an error...

* was wrongly reported as "No error"


# e09d819b6cf8260e174e0d076d1f05d34c5733ed 28-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Since the Media/Translation Kit errors are now in Errors.h as well, we don't
need to include those two anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32781 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2fb48fb46bbf1dda2d9660175291a8f873a4828f 25-Aug-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Added missing ENOATTR text.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32681 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 39d58e2f49f4b073ded3dbf639fd55730fa520a0 22-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Experimental approach to tackle the problem with Be's negative error codes and
ported software:
* If the macro B_USE_POSITIVE_POSIX_ERRORS is defined the POSIX error code
constants (ENOMEM, EINTR,...) will have positive values.
* Introduced the macros B_TO_{POSITIVE,NEGATIVE}_ERROR() which do convert a
given error code to a positive/negative value.
* Added static library libposix_error_mapper.a that overrides all POSIX
functions (save the ones I forgot to add :-)) directly meddling with error
codes (having them as parameter or returning them) dealing with the
positive<->negative error code conversions. The functions have hidden
visibility, so they affect only the shared object they are linked into.
* So ideally all one has to do is to build a ported software with
-DB_USE_POSITIVE_POSIX_ERRORS and -lposix_error_mapper and be good with
respect to error code problems.
* Potential issues:
- When mixing ported and Haiku native code, i.e. using Haiku native code in
a ported software or using a ported library in a Haiku native application
care must be taken to convert error codes where the two interface. That's
what the B_TO_{POSITIVE,NEGATIVE}_ERROR() macros are supposed to be used
for.
- A ported static library can obviously not be linked directly against
-lposix_error_mapper. The shared object linking a against the ported static
library has to do that. The previous point applies when that causes mixing
with Haiku native code.
- When dependent ported libraries are used probably all of them should use
the error mapping.

Comments welcome.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29653 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 99fe8fb0f6e77eeb81372c10376b527d97d24c55 11-Jan-2009 Axel Dörfler <axeld@pinc-software.de>

* "" is not really a good error description.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28879 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c0acc2a55e142afff0733ab90a601d94bf8f5982 09-May-2006 Jérôme Duval <korli@users.berlios.de>

fixed typo


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17403 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bba1e5c831c8e6fb5412e094943ac5db429cdbdf 08-May-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

Added media kit error descriptions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17369 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a406236dc2b1ed616ef35436e0671aaa2ae373b3 03-Jul-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

New error codes:
- B_SHUTDOWN_CANCELLED: The shutdown process was cancelled (most likely by
the user).
- B_SHUTTING_DOWN: An operation cannot be performed, since the system is
shutting down (e.g. BApplication creation).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13413 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1b22c05ae886ead7e4ae2e1621e3d53355bf2059 29-May-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed warning I introduced before.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12887 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2e95dad4b9abeb51cb10b80084c584828c20c185 29-May-2005 Axel Dörfler <axeld@pinc-software.de>

strerror() no longer reports "Unknown Application Error" for positive values,
instead it now says "No Error".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12885 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5af32e752606778be5dd7379f319fe43cb3f6b8c 13-Apr-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed src/kernel to src/system.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12359 a95241bf-73f2-0310-859d-f6bbb57e9c96