From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20286 invoked from network); 9 May 2001 19:55:35 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 9 May 2001 19:55:35 -0000 Received: (qmail 23197 invoked by alias); 9 May 2001 19:55:20 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3871 Received: (qmail 23185 invoked from network); 9 May 2001 19:55:19 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer goliath.siemens.de) Date: Wed, 9 May 2001 23:55:15 +0400 (MSD) From: Andrej Borsenkow X-X-Sender: To: Paul Ackersviller cc: Subject: PATCH: Re: inet_{a,p}ton prototypes in Src/Modules/zftp.pro In-Reply-To: <20010506104546.A13094@flora01.SLAC.Stanford.EDU> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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