bug-gnulib
[Top][All Lists]
Advanced

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

Re: provide inet_?to? declarations in arpa_inet.h


From: Simon Josefsson
Subject: Re: provide inet_?to? declarations in arpa_inet.h
Date: Wed, 30 Apr 2008 00:37:13 +0200
User-agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.2 (gnu/linux)

Bruno Haible <address@hidden> writes:

> Simon Josefsson wrote:
>> I've tested it better now
>
> It was still apparently tested only on few systems. As you can see
> from doc/posix-functions/inet*.texi, the functions inet_ntop and inet_pton
> need to be declared also on HP-UX 11, OSF/1 4.0, Solaris 2.5.1. So the
> gnulib <arpa/inet.h> must be used in these cases as well (at least). And
> it must include the system's <arpa/inet.h>, which the present mingw-only
> replacement didn't do.

> Also, in the GNULIB_POSIXCHECK-conditionalized warnings, it is misleading
> to say "inet_pton doesn't exist on mingw" when in fact it does not exist
> on a couple of Unix systems either. (See doc/posix-functions/inet*.texi for
> reference.) mingw is one of gnulib's target platforms, but not its primary 
> one.
>
> I committed this.

Thanks!

Btw, a solaris system I have access to declares the function as follows
(in system arpa/inet.h):

#if !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__)
extern int inet_pton(int, const char *_RESTRICT_KYWD, void *_RESTRICT_KYWD);
extern const char *inet_ntop(int, const void *_RESTRICT_KYWD,
                        char *_RESTRICT_KYWD, socklen_t);
#endif /* !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) */

Would setting any of those defines, to get the system's prototypes, be
the right thing?

/Simon




reply via email to

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