libc: Add __errno_location() for language binding benefits.
authorzrj <rimvydas.jasinskas@gmail.com>
Sat, 5 Oct 2019 10:04:12 +0000 (13:04 +0300)
committerzrj <rimvydas.jasinskas@gmail.com>
Sat, 5 Oct 2019 18:33:08 +0000 (21:33 +0300)
commit60d311380ff2bf02a87700a0f3e6eb53e6034920
tree305e52b19a9fa210d4c19ee7022354b13c7418fe
parent1a67aa78e2451db72fc3b0782d4f2f4f3f3458d3
libc: Add __errno_location() for language binding benefits.

 Some languages have restrictions when it comes to C style TLS handling
 (thread local might be feature-gated) or simply it is inconvenient to
 add various OS specific binding wrappers just to access C errno values.

 The __errno_location() symbol provides externally callable version of
 __error() inline function.

 While there, add __WANT_NO_INLINED___ERROR guard for few python parsers
 in DPorts that are unable to parse inlined __error() code yet.
lib/libc/gen/Makefile.inc
lib/libc/gen/Symbol.map
lib/libc/gen/__errno_location.c [new file with mode: 0644]
sys/sys/errno.h