*** src/autoconfig.dist	Sun Jan  8 08:52:08 1995
--- src/autoconfig	Sun Mar  5 13:35:52 1995
***************
*** 132,143 ****
  
  # Don't allow installation in the build tree (people have actually tried this).
  # The cd;pwd is needed to normalize the directory name in case of links, and
! # the csh is needed to expand '~'.
! DIR1=`csh -f -c "echo $EXE"     | sed 's;/[^/]*$;;'`
  DIR1=`cd $DIR1; pwd`
! DIR2=`csh -f -c "echo $LIBDIR"  | sed 's;/[^/]*$;;'`
  DIR2=`cd $DIR2; pwd`
! DIR3=`csh -f -c "echo $SYMLINK" | sed 's;/[^/]*$;;'`
  DIR3=`cd $DIR3; pwd`
  BUILDTREE=`cd ..; pwd`
  if echo "${DIR1}/" | egrep "^${BUILDTREE}/" >/dev/null 2>&1 ||
--- 132,143 ----
  
  # Don't allow installation in the build tree (people have actually tried this).
  # The cd;pwd is needed to normalize the directory name in case of links, and
! # bash is needed to expand '~'.
! DIR1=`bash -f -c "echo $EXE"     | sed 's;/[^/]*$;;'`
  DIR1=`cd $DIR1; pwd`
! DIR2=`bash -f -c "echo $LIBDIR"  | sed 's;/[^/]*$;;'`
  DIR2=`cd $DIR2; pwd`
! DIR3=`bash -f -c "echo $SYMLINK" | sed 's;/[^/]*$;;'`
  DIR3=`cd $DIR3; pwd`
  BUILDTREE=`cd ..; pwd`
  if echo "${DIR1}/" | egrep "^${BUILDTREE}/" >/dev/null 2>&1 ||
***************
*** 209,220 ****
  echo "#define LIBDIR     \"${LIBDIR}\"" >&4
  echo "#define MAILDIR    \"${MAILDIR}\"" >&4
  
! echo "MAKE       = `csh -f -c \"echo ${MAKE}\"`" >&5
! echo "EXE        = `csh -f -c \"echo ${EXE}\"`" >&5
! echo "SYMLINK    = `csh -f -c \"echo ${SYMLINK}\"`" >&5
! echo "LIBDIR     = `csh -f -c \"echo ${LIBDIR}\"`" >&5
! echo "MAILDIR    = `csh -f -c \"echo ${MAILDIR}\"`" >&5
! echo "MANPAGE    = `csh -f -c \"echo ${MANPAGE}\"`" >&5
  echo "MANTYPE    = ${MANTYPE}" >&5
  echo "MODE       = ${MODE}" >&5
  
--- 209,220 ----
  echo "#define LIBDIR     \"${LIBDIR}\"" >&4
  echo "#define MAILDIR    \"${MAILDIR}\"" >&4
  
! echo "MAKE       = `bash -f -c \"echo ${MAKE}\"`" >&5
! echo "EXE        = `bash -f -c \"echo ${EXE}\"`" >&5
! echo "SYMLINK    = `bash -f -c \"echo ${SYMLINK}\"`" >&5
! echo "LIBDIR     = `bash -f -c \"echo ${LIBDIR}\"`" >&5
! echo "MAILDIR    = `bash -f -c \"echo ${MAILDIR}\"`" >&5
! echo "MANPAGE    = `bash -f -c \"echo ${MANPAGE}\"`" >&5
  echo "MANTYPE    = ${MANTYPE}" >&5
  echo "MODE       = ${MODE}" >&5
  
*** src/socket.c.dist	Sun Jan  8 08:52:10 1995
--- src/socket.c	Sun Mar  5 23:47:38 1995
***************
*** 695,705 ****
          }
  #endif /* EINPROGRESS */
  
-     } else if (errno == EAGAIN
  #ifdef EWOULDBLOCK
!                                || errno == EWOULDBLOCK
! #endif
!                                                       ) {
          /* A bug in SVR4.2 causes nonblocking connect() to (sometimes?)
           * incorrectly fail with EAGAIN.  The only thing we can do about
           * it is to try a blocking connect().
--- 695,702 ----
          }
  #endif /* EINPROGRESS */
  
  #ifdef EWOULDBLOCK
!     } else if (errno == EWOULDBLOCK) {
          /* A bug in SVR4.2 causes nonblocking connect() to (sometimes?)
           * incorrectly fail with EAGAIN.  The only thing we can do about
           * it is to try a blocking connect().
***************
*** 707,712 ****
--- 704,710 ----
          close(xsock->fd);
          can_nonblock = FALSE;
          goto retry; /* try again */
+ #endif
  
      } else {
          /* The connection failed.  Give up. */
***************
*** 984,996 ****
      while (numtowrite) {
          numwritten = send(xsock->fd, str, numtowrite, 0);
          if (numwritten < 0) {
-             if (errno == EAGAIN
  #ifdef EWOULDBLOCK
!                                 || errno == EWOULDBLOCK
! #endif
!                                                        ) {
                  numwritten = 0;
                  sleep(1);
              } else {
                  killsock(xsock);
                  do_hook(H_DISCONNECT,
--- 982,992 ----
      while (numtowrite) {
          numwritten = send(xsock->fd, str, numtowrite, 0);
          if (numwritten < 0) {
  #ifdef EWOULDBLOCK
!             if (errno == EWOULDBLOCK) {
                  numwritten = 0;
                  sleep(1);
+ #endif
              } else {
                  killsock(xsock);
                  do_hook(H_DISCONNECT,
*** src/tfio.c.dist	Sun Jan  8 08:52:10 1995
--- src/tfio.c	Mon Mar  6 00:02:12 1995
***************
*** 131,137 ****
      if ((fp = fopen(name, mode)) && fstat(fileno(fp), &buf) == 0) {
          if (buf.st_mode & S_IFDIR) {
              fclose(fp);
!             errno = EISDIR;  /* must be after fclose() */
              return NULL;
          }
          newname = STRDUP(name);
--- 131,137 ----
      if ((fp = fopen(name, mode)) && fstat(fileno(fp), &buf) == 0) {
          if (buf.st_mode & S_IFDIR) {
              fclose(fp);
!             errno = ENOENT;  /* must be after fclose() */
              return NULL;
          }
          newname = STRDUP(name);
