Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: Re: inet_{a,p}ton prototypes in Src/Modules/zftp.pro



On Sun, 6 May 2001, Paul Ackersviller wrote:

> I just tried building zsh on Solaris 7 from the latest source off of CVS.
> Sun's compiler doesn't like inet_aton and inet_pton being declared as static.
> Here are the errors:
>
> "./zftp.pro", line 4: identifier redeclared: inet_aton
>         current : static function(pointer to const char, pointer to struct in_addr {union {..} S_un}) returning int
>         previous: function(pointer to const char, pointer to struct in_addr {union {..} S_un}) returning int : "/usr/include/arpa/inet.h", line 52
> "./zftp.pro", line 6: identifier redeclared: inet_pton
>         current : static function(int, pointer to const char, pointer to void) returning int
>         previous: function(int, pointer to const char, pointer to void) returning int : "/usr/include/arpa/inet.h", line 54
>

O.K. here is patch for zftp.c. After reviewing old thread I decided to not
mess up with configure and took Zefram's advice - internally use zsh_*
functions that are either #defined or declared. It works on my system that
lacks everything except gethostbyname() and on Mandrake 8 with glibc-2.2
that has everything except getipnodebyname() (I believe, it even has IPv6
but not checked) so it should work on most systems.

Note, that blanks *are* significant here (there were spaces after /**/ in
some places).

The patch is against current CVS; I'll commit if nobody complaints that it
broke something again.

-andrej



Messages sorted by: Reverse Date, Date, Thread, Author