RFC: IDN support in getaddrinfo().
Ulrich Drepper
drepper@redhat.com
Mon Mar 8 04:18:00 GMT 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Simon Josefsson wrote:
> Here's a patch that implement the dlopen approach for loading libidn.
> Not exactly the way I originally intended, but it seem rather simple.
Believe it or not, an hour before your patch arrived I started working
on this myself.
Well, I took your update code but had to make a number changes:
~ several files were missing. I've added them from the old version.
~ the toutf8 code supports glibc now correctly. Note, the non-glibc
code isn't really right. You cannot use setlocale() if the program
hasn't done it by itself. And I don't think using the CHARSET envvar
is wise either. Just require the application to chose the right
locale. This is what the glibc code now does.
~ various cleanups. So far only warnings. The only other file I looked
at more then briefly is toutf8. Note the changes I've made, e.g., to
prevent memory leaks or handle memory allocation errors. Also, the
memory allocation is more likely to allocate an output buffer which is
large enough.
~ in the libc stub, I've added code to prevent using libcidn from being
used if the entire name is ASCII. This is a valid assumption since
all locale encodings must be ASCII safe.
~ also, libcidn gets loaded only once. There is no reason to unload the
object except when the process terminates and complete cleanup is
requested. Look at the file.
~ since libidn is an add-on the use in getaddrinfo() is conditional.
I've added the appropriate configure magic.
Let's get the CANONIDN stuff implemented so that we're done.
Thanks,
- --
⧠Ulrich Drepper ⧠Red Hat, Inc. ⧠444 Castro St ⧠Mountain View, CA â
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD8DBQFAS/Pv2ijCOnn/RHQRAhMsAKChOla9i945UbrCeW1fGaw6sqKO7ACgyl9X
q681OVCJyeBWmJ1nu3cZGaM=
=JaLL
-----END PGP SIGNATURE-----
More information about the Libc-alpha
mailing list