bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Incomplete getaddrinfo module


From: Simon Josefsson
Subject: Re: Incomplete getaddrinfo module
Date: Thu, 15 Sep 2005 11:43:09 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Yoann Vandoorselaere <address@hidden> writes:

> Hi,
>
> The getaddrinfo module in GnuLib will often result in broken application
> behavior because it is really a simple replacement which fail to handle
> very common getaddrinfo usage pattern.
>
> A common example of why it might fail is:
>
>   if (hints && (hints->ai_flags & ~AI_CANONNAME))
>     /* FIXME: Support more flags. */
>     return EAI_BADFLAGS;
>
> This is not right since it tend to break application that trust the
> GnuLib module to provide a viable getaddrinfo replacement. 

It could be extended to work better.

> What is people opinion concerning an eventual drop of the current module
> to replace it by the GLIBC implementation ?

That would make the implementation complete, but there are some
problems with the glibc code:

- FSF doesn't own the copyright of the code and the license isn't (L)GPL.

- Making it work stand-alone is non-trivial.  The code calls some
  non-standard functions that would have to be re-implemented as well.

I began making it work standalone at some point, but eventually gave
up, but that was mostly because of the license issue.

If you'd like to port it, please do.  But maybe someone could say if
the license would be acceptable for a gnulib module first.  The
license is from libc/sysdeps/posix/getaddrinfo.c below.

Thanks.

/* The Inner Net License, Version 2.00

  The author(s) grant permission for redistribution and use in source and 
binary forms, with or without modification, of the software and documentation
provided that the following conditions are met: 
0. If you receive a version of the software that is specifically labelled    as 
not being for redistribution (check the version message and/or README),
   you are not permitted to redistribute that version of the software in any
   way or form.
1. All terms of the all other applicable copyrights and licenses must be    
followed.
2. Redistributions of source code must retain the authors' copyright    
notice(s), this list of conditions, and the following disclaimer.
3. Redistributions in binary form must reproduce the authors' copyright    
notice(s), this list of conditions, and the following disclaimer in the
   documentation and/or other materials provided with the distribution. 4. [The 
copyright holder has authorized the removal of this clause.]
5. Neither the name(s) of the author(s) nor the names of its contributors    
may be used to endorse or promote products derived from this software
   without specific prior written permission. 
THIS SOFTWARE IS PROVIDED BY ITS AUTHORS AND CONTRIBUTORS ``AS IS'' AND ANY 
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY 
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   If these license terms cause you a real problem, contact the author.  */

/* This software is Copyright 1996 by Craig Metz, All Rights Reserved.  */ 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]