Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zftp.c doesn't compile on IRIX6.5
- X-seq: zsh-workers 11623
 
- From: jarausch@xxxxxxxxxxxxxxxxxxx
 
- To: pws@xxxxxxxxxxxxxxxxxxxxxxxx
 
- Subject: Re: zftp.c doesn't compile on IRIX6.5
 
- Date: Mon, 29 May 2000 09:42:00 +0200
 
- Cc: zsh-workers@xxxxxxxxxxxxxx, schaefer@xxxxxxxxxxxxxxxxxxxxxxx
 
- In-reply-to: <E12wA0m-000319-00.2000-05-28-21-50-16@xxxxxxxxxxxxxxxxxxxxx>
 
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
 
- Reply-to: jarausch@xxxxxxxxxxxxxxxxxxx
 
On 28 May, Peter Stephenson wrote:
> jarausch@xxxxxxxxxxxxxxxxxxx wrote:
>> The cvs version from today doesn't compile on IRIX 6.5
>> 
>> It seems there is a bug on IRIX.
>> It uses a type 'n_long' within <netinet/ip.h>
>> but fails to include <netinet/in_systm.h>
>> where this is defined.
>> 
>> I had to apply the following (ugly) workaround
>> 
>> *** zftp.c.orig Sun May 28 17:34:38 2000
>> --- zftp.c      Sun May 28 17:34:39 2000
>> ***************
>> *** 64,69 ****
>> --- 64,72 ----
>>   #ifdef HAVE_NETINET_IN_SYSTM_H
>>   # include <netinet/in_systm.h>
>>   #endif
>> + #ifdef __sgi
>> +   #include <netinet/in_systm.h>
>> + #endif
>>   #include <netinet/in.h>
>>   #include <netinet/ip.h>
>>   #include <arpa/inet.h>
> 
> There's something extremely screwy here.  If <netinet/in_systm.h> exists,
> why does configure not detect it?  I looked, and whether for the same
> reason or not the test fails on linux, where gcc is outputting a warning
> message:
> 
> In file included from /usr/include/sys/cdefs.h:24,
>                  from /usr/include/netinet/in_systm.h:23,
>                  from configure:2634:
> /usr/include/features.h:254: warning: `__USE_LARGEFILE' redefined
> /usr/include/features.h:198: warning: this is the location of the previous defin
> ition
> 
> which is enough to make the test fail.
> 
> This is hard to fix, since it's not our problem.  For now we can just not
> include the file where we know it's missing, and cygwin is the only case I
> know, since no-one else every complained.
> 
> It would be splendid if this could be tested as soon as possible.
> 
> Index: Src/Modules/zftp.c
> ===================================================================
> RCS file: /cvsroot/zsh/zsh/Src/Modules/zftp.c,v
> retrieving revision 1.5
> diff -u -r1.5 zftp.c
> --- Src/Modules/zftp.c	2000/05/26 09:47:28	1.5
> +++ Src/Modules/zftp.c	2000/05/28 20:48:01
> @@ -61,7 +61,16 @@
>  #include <sys/types.h>
>  #include <sys/socket.h>
>  #include <netdb.h>
> -#ifdef HAVE_NETINET_IN_SYSTM_H
> +/*
> + * For some reason, configure doesn't always detect netinet/in_systm.h.
> + * On some systems, including linux, this seems to be because gcc is
> + * throwing up a warning message about the redefinition of
> + * __USE_LARGEFILE.  This means the problem is somewhere in the
> + * header files where we can't get at it.  For now, revert to
> + * not including this file only on systems where we know it's missing.
> + * Currently this is just cygwin.
> + */
> +#ifndef __CYGWIN__
>  # include <netinet/in_systm.h>
>  #endif
>  #include <netinet/in.h>
> 
This works fine on IRIX with GCC.
-- 
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
Institute of Technology, RWTH Aachen
D 52056 Aachen, Germany
Messages sorted by:
Reverse Date,
Date,
Thread,
Author