+2001-03-07 Ken Raeburn <raeburn@mit.edu>
+
+ * configure.in: Check for strerror.
+
2000-11-01 Ezra Peisach <epeisach@mit.edu>
* configure.in: Use AC_CHECK_FUNCS, AC_CHECK_HEADERS, AC_C_CONST
CHECK_UTMP
DECLARE_SYS_ERRLIST
AC_REPLACE_FUNCS(getdtablesize)
-AC_CHECK_FUNCS(getcwd getdtablesize getusershell seteuid setreuid setresuid)
+AC_CHECK_FUNCS(getcwd getdtablesize getusershell seteuid setreuid setresuid strerror)
AC_CHECK_LIB(crypt,crypt) dnl
AC_CHECK_LIB(util,logwtmp) dnl
dnl
+2001-03-07 Ken Raeburn <raeburn@mit.edu>
+
+ * cmds.c (strerror): Only define if not HAVE_STRERROR.
+ * ftp.c (strerror): Likewise.
+ * secure.c (secure_putbuf, secure_getbyte): Use strerror.
+
2000-11-21 Ken Raeburn <raeburn@mit.edu>
* cmds.c (globulize): Use correct address of globbed results when
extern char *home;
extern char *remglob();
extern char *getenv();
+#ifndef HAVE_STRERROR
#define strerror(error) (sys_errlist[error])
#ifdef NEED_SYS_ERRLIST
extern char *sys_errlist[];
#endif
+#endif
extern off_t restart_point;
extern char reply_string[];
off_t restart_point = 0;
jmp_buf ptabort;
+#ifndef HAVE_STRERROR
#define strerror(error) (sys_errlist[error])
#ifdef NEED_SYS_ERRLIST
extern char *sys_errlist[];
#endif
+#endif
extern int connected;
#include <netinet/in.h>
#include <errno.h>
+#ifndef HAVE_STRERROR
+#define strerror(error) (sys_errlist[error])
#ifdef NEED_SYS_ERRLIST
extern char *sys_errlist[];
#endif
+#endif
#if (SIZEOF_SHORT == 4)
typedef unsigned short ftp_uint32;
} else {
bufsize = 0;
secure_error("%s (in malloc of PROT buffer)",
- sys_errlist[errno]);
+ strerror(errno));
return(ERR);
}
}
} else {
bufsize = 0;
secure_error("%s (in malloc of PROT buffer)",
- sys_errlist[errno]);
+ strerror(errno));
return(ERR);
}
}
!= sizeof(length)) {
secure_error("Couldn't read PROT buffer length: %d/%s",
kerror,
- kerror == -1 ? sys_errlist[errno]
+ kerror == -1 ? strerror(errno)
: "premature EOF");
return(ERR);
}
if ((kerror = looping_read(fd, (char *) ucbuf, (int) length)) != length) {
secure_error("Couldn't read %u byte PROT buffer: %s",
length, kerror == -1 ?
- sys_errlist[errno] : "premature EOF");
+ strerror(errno) : "premature EOF");
return(ERR);
}
/* Other auth types go here ... */
+2001-03-07 Ken Raeburn <raeburn@mit.edu>
+
+ * ftpd.c (strerror): Only define if not HAVE_STRERROR.
+
2000-12-06 Ken Raeburn <raeburn@mit.edu>
* ftpd.c (dolog): Cast first argument to pty_make_sane_hostname to
#define L_INCR 1
#endif
+#ifndef HAVE_STRERROR
#define strerror(error) (sys_errlist[error])
#ifdef NEED_SYS_ERRLIST
extern char *sys_errlist[];
#endif
+#endif
extern char *mktemp ();