zsh-workers
 help / color / mirror / code / Atom feed
* Cygwin 1.3.12/zsh 4.0.6/zftp.c compilation problem
@ 2002-10-09 11:53 Hannu Koivisto
  2002-10-14  8:52 ` Borzenkov Andrey
  0 siblings, 1 reply; 2+ messages in thread
From: Hannu Koivisto @ 2002-10-09 11:53 UTC (permalink / raw)
  To: zsh-workers

Greetings,

zsh 4.0.6 fails to compile under the latest Cygwin (1.3.12) because
zftp.c includes netinet/ip.h but not netinet/in_systm.h:

#ifndef __CYGWIN__
# include <netinet/in_systm.h>
#endif
#include <netinet/in.h>
#include <netinet/ip.h>

netinet/ip.h refers to at least n_long which is defined in
netinet/in_systm.h (or more precicely, in cygwin/in_systm.h that
netinet/in_systm.h includes) so netinet/in_systm.h is needed.  If I
comment out the first and the third lines in the above code, zsh
compiles and seems to work.

-- 
Hannu


^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: Cygwin 1.3.12/zsh 4.0.6/zftp.c compilation problem
  2002-10-09 11:53 Cygwin 1.3.12/zsh 4.0.6/zftp.c compilation problem Hannu Koivisto
@ 2002-10-14  8:52 ` Borzenkov Andrey
  0 siblings, 0 replies; 2+ messages in thread
From: Borzenkov Andrey @ 2002-10-14  8:52 UTC (permalink / raw)
  To: 'Hannu Koivisto', zsh-workers



> Greetings,
> 
> zsh 4.0.6 fails to compile under the latest Cygwin (1.3.12) because
> zftp.c includes netinet/ip.h but not netinet/in_systm.h:
> 
> #ifndef __CYGWIN__
> # include <netinet/in_systm.h>
> #endif
> #include <netinet/in.h>
> #include <netinet/ip.h>
> 
> netinet/ip.h refers to at least n_long which is defined in
> netinet/in_systm.h (or more precicely, in cygwin/in_systm.h that
> netinet/in_systm.h includes) so netinet/in_systm.h is needed.  If I
> comment out the first and the third lines in the above code, zsh
> compiles and seems to work.
> 

You sure have heard about "compatibility"? :-)

Does the following patch works?

-andrey

===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/zftp.c,v
retrieving revision 1.12.4.2
diff -u -r1.12.4.2 zftp.c
--- Src/Modules/zftp.c  25 Apr 2002 14:48:21 -0000      1.12.4.2
+++ Src/Modules/zftp.c  14 Oct 2002 08:51:50 -0000
@@ -68,9 +68,9 @@
  * __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.
+ * Currently this is just older versions of cygwin.
  */
-#ifndef __CYGWIN__
+#if HAVE_NETINET_IN_SYSTM_H || !defined( __CYGWIN__)
 # include <netinet/in_systm.h>
 #endif
 #include <netinet/in.h>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-10-14  8:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-09 11:53 Cygwin 1.3.12/zsh 4.0.6/zftp.c compilation problem Hannu Koivisto
2002-10-14  8:52 ` Borzenkov Andrey

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).