diff -N -c -r -X exclude_files squid-1.0.beta2/src/ftp.c squid-1.0.beta2.henrik/src/ftp.c *** squid-1.0.beta2/src/ftp.c Tue Apr 23 20:26:47 1996 --- squid-1.0.beta2.henrik/src/ftp.c Tue Apr 23 20:07:49 1996 *************** *** 530,539 **** --- 530,549 ---- FtpData *data; { StoreEntry *entry = data->entry; + #ifdef _SQUID_HPUX_ + static char localhost[]="localhost"; + #endif debug(9, 5, "ftpConnInProgress: FD %d\n", fd); + #ifdef _SQUID_HPUX_ + /* HPUX 9.01s400 has a bug in sscanf, causing sscanf to core dump on + * non writeable strings + */ + if (comm_connect(fd, localhost, CACHE_FTP_PORT) != COMM_OK) + #else if (comm_connect(fd, "localhost", CACHE_FTP_PORT) != COMM_OK) + #endif switch (errno) { case EINPROGRESS: case EALREADY: *************** *** 566,571 **** --- 576,584 ---- { FtpData *data = NULL; int status; + #ifdef _SQUID_HPUX_ + static char localhost[]="localhost"; + #endif debug(9, 3, "FtpStart: FD %d \n", unusedfd, url); *************** *** 596,602 **** --- 609,622 ---- (void *) data); /* Now connect ... */ + #ifdef _SQUID_HPUX_ + /* HPUX 9.01s400 has a bug in sscanf, causing sscanf to core dump on + * non writeable strings + */ + if ((status = comm_connect(data->ftp_fd, localhost, CACHE_FTP_PORT))) { + #else if ((status = comm_connect(data->ftp_fd, "localhost", CACHE_FTP_PORT))) { + #endif if (status != EINPROGRESS) { squid_error_entry(entry, ERR_CONNECT_FAIL, xstrerror()); comm_close(data->ftp_fd);