``Der Computer hat den Bauernhof erworben'' -- strerror_l implementation for GNU/Hurd

Thomas Schwinge tschwinge@gnu.org
Tue Nov 25 18:30:00 GMT 2008


Hello!

Since its introduction in glibc 2.6 (IIRC) GNU/Hurd has been lacking a
`strerror_l' implementation.  Here is one, to be put into
`sysdeps/mach/', just as `_strerror.c', akin to which it is modelled, the
framework below being a copy of `string/strerror_l', of course.

My tiny testing program -- single-threaded only, but I don't see what
shouldn't work multi-threaded just as well-- is also attached.

    tschwinge@flubber:~ $ LD_PRELOAD=./libc.so ./ld.so ./a.out 10 1073741928 de_DE.utf8
    1073741928 (0x40000068): Computer bought the farm
    1073741928 (0x40000068): Der Computer hat den Bauernhof erworben
    tschwinge@flubber:~ $ LD_PRELOAD=./libc.so ./ld.so ./a.out 10 1000000000 de_DE.utf8
    1000000000 (0x3b9aca00): Error in unknown error system: 3B9ACA00
    1000000000 (0x3b9aca00): Fehler in unbekanntem Fehler-System: 3B9ACA00
    tschwinge@flubber:~ $ LD_PRELOAD=./libc.so ./ld.so ./a.out 10 100 de_DE.utf8
    100 (0x64): Unknown error (os/kern) 100
    100 (0x64): Unbekannter Fehler (os/kern) 100


ChangeLog snippet:

2008-11-25  Thomas Schwinge  <tschwinge@gnu.org>

	* sysdeps/mach/strerror_l.c: New file.


Regards,
 Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: strerror_l.c
Type: text/x-csrc
Size: 2743 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20081125/d299ae42/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tst-strerror_l.c
Type: text/x-csrc
Size: 487 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20081125/d299ae42/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 191 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20081125/d299ae42/attachment.sig>


More information about the Libc-alpha mailing list