Index: Src/system.h @@ -286,6 +286,9 @@ # include #endif +#ifdef HAVE_CURSES_H +# include +#endif #ifdef HAVE_TERMIOS_H # ifdef __sco /* termios.h includes sys/termio.h instead of sys/termios.h; * @@ -315,6 +318,15 @@ #else # ifdef HAVE_TERM_H # include +# endif +# ifdef tab +# undef tab +# endif +# ifdef columns +# undef columns +# endif +# ifdef lines +# undef lines # endif #endif Index: Src/Modules/files.c @@ -185,7 +185,7 @@ static int bin_ln(char *nam, char **args, char *ops, int func) { - MoveFunc move; + MoveFunc movefunc; int flags, err = 0; char **a, *ptr, *rp, *buf; struct stat st; @@ -193,18 +193,18 @@ if(func == BIN_MV) { - move = (MoveFunc) rename; + movefunc = (MoveFunc) rename; flags = ops['f'] ? 0 : MV_ASKNW; flags |= MV_ATOMIC; } else { flags = ops['f'] ? MV_FORCE : 0; #ifdef HAVE_LSTAT if(ops['s']) - move = (MoveFunc) symlink; + movefunc = (MoveFunc) symlink; else #endif { - move = (MoveFunc) link; + movefunc = (MoveFunc) link; if(!ops['d']) flags |= MV_NODIRS; } @@ -228,7 +228,7 @@ else args[1] = args[0]; } - return domove(nam, move, args[0], args[1], flags); + return domove(nam, movefunc, args[0], args[1], flags); havedir: buf = ztrdup(*a); *a = NULL; @@ -244,7 +244,7 @@ buf[blen] = 0; buf = appstr(buf, ptr); - err |= domove(nam, move, *args, buf, flags); + err |= domove(nam, movefunc, *args, buf, flags); } zsfree(buf); return err; @@ -252,7 +252,7 @@ /**/ static int -domove(char *nam, MoveFunc move, char *p, char *q, int flags) +domove(char *nam, MoveFunc movefunc, char *p, char *q, int flags) { struct stat st; char *pbuf, *qbuf; @@ -302,7 +302,7 @@ if(doit && !(flags & MV_ATOMIC)) unlink(qbuf); } - if(move(pbuf, qbuf)) { + if(movefunc(pbuf, qbuf)) { zwarnnam(nam, "%s: %e", p, errno); zsfree(pbuf); return 1; Index: Src/Modules/terminfo.c @@ -34,9 +34,6 @@ /**/ #ifdef HAVE_TIGETSTR -# ifdef HAVE_CURSES_H -# include -# endif static Param terminfo_pm; Index: Src/Modules/zftp.c @@ -220,7 +220,7 @@ # ifndef HAVE_GETHOSTBYNAME2 /**/ -static struct hostent * +struct hostent * gethostbyname2(char const *name, int af) { if(af != AF_INET) {