]> sjero.net Git - wget/blobdiff - src/ftp-basic.c
[svn] Move fnmatch() to cmpt.c and don't use it under GNU libc.
[wget] / src / ftp-basic.c
index 6dff629aa4f20f69dfa606c1f6b8536b809b04df..0201b6d78081ec3db376d22daeb9db2406ff5488 100644 (file)
@@ -15,7 +15,17 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with Wget; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+In addition, as a special exception, the Free Software Foundation
+gives permission to link the code of its release of Wget with the
+OpenSSL project's "OpenSSL" library (or with modified versions of it
+that use the same license as the "OpenSSL" library), and distribute
+the linked executables.  You must obey the GNU General Public License
+in all respects for all of the code used other than "OpenSSL".  If you
+modify this file, you may extend this exception to your version of the
+file, but you are not obligated to do so.  If you do not wish to do
+so, delete this exception statement from your version.  */
 
 #include <config.h>
 
@@ -185,12 +195,12 @@ ftp_login (struct rbuf *rbuf, const char *acc, const char *pass)
     };
     int i;
 
-    for (i = 0; i < ARRAY_SIZE (skey_head); i++)
+    for (i = 0; i < countof (skey_head); i++)
       {
         if (strncasecmp (skey_head[i], respline, strlen (skey_head[i])) == 0)
           break;
       }
-    if (i < ARRAY_SIZE (skey_head))
+    if (i < countof (skey_head))
       {
         const char *cp;
         int skey_sequence = 0;
@@ -242,7 +252,7 @@ ftp_login (struct rbuf *rbuf, const char *acc, const char *pass)
   return FTPOK;
 }
 
-#ifdef INET6
+#ifdef ENABLE_IPV6
 uerr_t
 ftp_eprt (struct rbuf *rbuf)
 {
@@ -314,7 +324,7 @@ ftp_port (struct rbuf *rbuf)
 
   int nwritten;
   unsigned short port;
-#ifdef INET6
+#ifdef ENABLE_IPV6
   /*
     Only try the Extented Version if we actually use IPv6
   */
@@ -372,7 +382,7 @@ ftp_port (struct rbuf *rbuf)
   return FTPOK;
 }
 
-#ifdef INET6
+#ifdef ENABLE_IPV6
 uerr_t
 ftp_epsv (struct rbuf *rbuf, ip_address *addr, unsigned short *port, 
          char *typ)
@@ -443,7 +453,7 @@ ftp_pasv (struct rbuf *rbuf, ip_address *addr, unsigned short *port)
   uerr_t err;
   unsigned char addr4[4];
 
-#ifdef INET6
+#ifdef ENABLE_IPV6
   if (ip_default_family == AF_INET6) 
     {
       err = ftp_epsv (rbuf, addr, port, "2");  /* try IPv6 with EPSV */
@@ -758,6 +768,8 @@ ftp_syst (struct rbuf *rbuf, enum stype *server_type)
     *server_type = ST_WINNT;
   else if (!strcasecmp (request, "MACOS"))
     *server_type = ST_MACOS;
+  else if (!strcasecmp (request, "OS/400"))
+    *server_type = ST_OS400;
   else
     *server_type = ST_OTHER;