about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2001-06-08 03:05:50 +0000
committerBart Schaefer <barts@users.sourceforge.net>2001-06-08 03:05:50 +0000
commit6663b86f923d8ac86a1bcb627201b1c6cc0c8a6e (patch)
tree4cbe709563ef395d22ec6adad0ad2a267886530a
parenta0add631841c8be218e251d52cb52bd8fe690e98 (diff)
downloadzsh-6663b86f923d8ac86a1bcb627201b1c6cc0c8a6e.tar.gz
zsh-6663b86f923d8ac86a1bcb627201b1c6cc0c8a6e.tar.xz
zsh-6663b86f923d8ac86a1bcb627201b1c6cc0c8a6e.zip
Fix #includes for gcc 2.95 compilation.
-rw-r--r--Src/Modules/tcp.h23
-rw-r--r--Src/Modules/zftp.c27
2 files changed, 23 insertions, 27 deletions
diff --git a/Src/Modules/tcp.h b/Src/Modules/tcp.h
index edb2119ad..53e96761f 100644
--- a/Src/Modules/tcp.h
+++ b/Src/Modules/tcp.h
@@ -27,11 +27,34 @@
  *
  */
 
+/*
+ * We need to include the zsh headers later to avoid clashes with
+ * the definitions on some systems, however we need the configuration
+ * file to decide whether we can include netinet/in_systm.h, which
+ * doesn't exist on cygwin.
+ */
 #include "../../config.h"
+
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netdb.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>
+#include <netinet/ip.h>
+#include <arpa/inet.h>
+
 /* Is IPv6 supported by the library? */
 
 #if defined(AF_INET6) && defined(IN6ADDR_LOOPBACK_INIT) \
diff --git a/Src/Modules/zftp.c b/Src/Modules/zftp.c
index 46f30da74..66bf1e662 100644
--- a/Src/Modules/zftp.c
+++ b/Src/Modules/zftp.c
@@ -49,33 +49,6 @@ struct sockaddr_in6;
 struct zftp_session;
 typedef struct zftp_session *Zftp_session;
 
-/*
- * We need to include the zsh headers later to avoid clashes with
- * the definitions on some systems, however we need the configuration
- * file to decide whether we can include netinet/in_systm.h, which
- * doesn't exist on cygwin.
- */
-#include "../../config.h"
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netdb.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>
-#include <netinet/ip.h>
-#include <arpa/inet.h>
-
 #include "tcp.h"
 #include "zftp.mdh"
 #include "zftp.pro"