From f8aa3d32a9427efc79dafa129a44f0d4064686ef Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Fri, 19 Jan 1996 00:00:42 +0000 Subject: [PATCH] Portability fixes: don't declare errno ever and don't declare sys_errlist unless you need to. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7336 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/gssftp/ftp/ChangeLog | 8 ++++++++ src/appl/gssftp/ftp/cmds.c | 4 +++- src/appl/gssftp/ftp/configure.in | 1 + src/appl/gssftp/ftp/ftp.c | 3 +++ src/appl/gssftp/ftp/secure.c | 4 +++- 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/appl/gssftp/ftp/ChangeLog b/src/appl/gssftp/ftp/ChangeLog index 115610437..ce190ef31 100644 --- a/src/appl/gssftp/ftp/ChangeLog +++ b/src/appl/gssftp/ftp/ChangeLog @@ -1,3 +1,11 @@ +Thu Jan 18 18:33:18 1996 Sam Hartman + + * cmds.c: Handle sys_errlist and remove declaration of errno. + + * configure.in: Check to see if we need to declare sys_errlist. + + * ftp.c secure.c: Only define sys_errlist if needed + Thu Jan 18 11:55:50 1996 Sam Hartman * configure.in: Check for sys/select.h diff --git a/src/appl/gssftp/ftp/cmds.c b/src/appl/gssftp/ftp/cmds.c index de7e4b117..3687ceae0 100644 --- a/src/appl/gssftp/ftp/cmds.c +++ b/src/appl/gssftp/ftp/cmds.c @@ -71,8 +71,10 @@ extern char *home; extern char *remglob(); extern char *getenv(); #define strerror(error) (sys_errlist[error]) +#ifdef NEED_SYS_ERRLIST extern char *sys_errlist[]; -extern int errno; +#endif + extern off_t restart_point; extern char reply_string[]; diff --git a/src/appl/gssftp/ftp/configure.in b/src/appl/gssftp/ftp/configure.in index d50f5ab9a..33090755d 100644 --- a/src/appl/gssftp/ftp/configure.in +++ b/src/appl/gssftp/ftp/configure.in @@ -5,6 +5,7 @@ AC_PROG_INSTALL KRB5_SIGTYPE CHECK_SIGPROCMASK CHECK_WAIT_TYPE +DECLARE_SYS_ERRLIST AC_FUNC_VFORK AC_HAVE_FUNCS(getcwd getdtablesize) AC_CHECK_HEADERS(sys/select.h) diff --git a/src/appl/gssftp/ftp/ftp.c b/src/appl/gssftp/ftp/ftp.c index 0e8a1a9f8..3c701d4f9 100644 --- a/src/appl/gssftp/ftp/ftp.c +++ b/src/appl/gssftp/ftp/ftp.c @@ -121,7 +121,10 @@ sig_t lostpeer(); off_t restart_point = 0; #define strerror(error) (sys_errlist[error]) +#ifdef NEED_SYS_ERRLIST extern char *sys_errlist[]; +#endif + extern int connected, errno; #define herror() printf("unknown host\n") diff --git a/src/appl/gssftp/ftp/secure.c b/src/appl/gssftp/ftp/secure.c index 445133975..07598dabf 100644 --- a/src/appl/gssftp/ftp/secure.c +++ b/src/appl/gssftp/ftp/secure.c @@ -27,8 +27,10 @@ extern gss_ctx_id_t gcontext; #include #include #include -extern int errno; + +#ifdef NEED_SYS_ERRLIST extern char *sys_errlist[]; +#endif extern struct sockaddr_in hisaddr; extern struct sockaddr_in myaddr; -- 2.26.2