This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: IDN support in getaddrinfo().

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.


- -- 
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â
Version: GnuPG v1.2.3 (GNU/Linux)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]