*** tcsh-6.09.00/Makefile.in.orig	Wed Nov 25 03:17:08 1998
--- tcsh-6.09.00/Makefile.in	Sat May 20 12:33:36 2000
***************
*** 29,35 ****
  #LFLAGS= -Zn10000		# hpux lint
  
  
! CFLAGS = @CFLAGS@		# This is set by autoconf.
  #CFLAGS= -g			# debug
  #CFLAGS= -O			# production
  #CFLAGS= 			# Broken optimizers....
--- 29,35 ----
  #LFLAGS= -Zn10000		# hpux lint
  
  
! CFLAGS = @CFLAGS@ -Din_addr6=in6_addr		# This is set by autoconf.
  #CFLAGS= -g			# debug
  #CFLAGS= -O			# production
  #CFLAGS= 			# Broken optimizers....
***************
*** 464,473 ****
  
  install: tcsh 
  	mkdir -p ${DESTBIN}
! 	-mv -f ${DESTBIN}/tcsh  ${DESTBIN}/tcsh.old
! 	cp tcsh ${DESTBIN}/tcsh
! 	-strip ${DESTBIN}/tcsh
! 	chmod 555 ${DESTBIN}/tcsh
  
  install.man: tcsh.man
  	mkdir -p ${DESTMAN}
--- 464,473 ----
  
  install: tcsh 
  	mkdir -p ${DESTBIN}
! 	-mv -f ${DESTBIN}/tcsh.exe  ${DESTBIN}/tcsh.old.exe
! 	cp tcsh.exe ${DESTBIN}/tcsh.exe
! 	-strip ${DESTBIN}/tcsh.exe
! 	chmod 555 ${DESTBIN}/tcsh.exe
  
  install.man: tcsh.man
  	mkdir -p ${DESTMAN}
*** tcsh-6.09.00/config_f.h.orig	Tue May 11 22:07:42 1999
--- tcsh-6.09.00/config_f.h	Sat May 20 12:29:10 2000
***************
*** 70,76 ****
  /*
   * LOGINFIRST   Source ~/.login before ~/.cshrc
   */
! #undef LOGINFIRST
  
  /*
   * VIDEFAULT    Make the VI mode editor the default
--- 70,77 ----
  /*
   * LOGINFIRST   Source ~/.login before ~/.cshrc
   */
! /* #undef LOGINFIRST */
! #define LOGINFIRST
  
  /*
   * VIDEFAULT    Make the VI mode editor the default
***************
*** 92,110 ****
  /*
   * DOTLAST      put "." last in the default path, for security reasons
   */
! #define DOTLAST
  
  /*
   * NODOT	Don't put "." in the default path, for security reasons
   */
! #undef NODOT
  
  /*
   * AUTOLOGOUT	tries to determine if it should set autologout depending
   *		on the name of the tty, and environment.
   *		Does not make sense in the modern window systems!
   */
! #define AUTOLOGOUT
  
  /*
   * SUSPENDED	Newer shells say 'Suspended' instead of 'Stopped'.
--- 93,114 ----
  /*
   * DOTLAST      put "." last in the default path, for security reasons
   */
! /* #define DOTLAST */
! #undef DOTLAST
  
  /*
   * NODOT	Don't put "." in the default path, for security reasons
   */
! /* #undef NODOT */
! #define NODOT
  
  /*
   * AUTOLOGOUT	tries to determine if it should set autologout depending
   *		on the name of the tty, and environment.
   *		Does not make sense in the modern window systems!
   */
! /* #define AUTOLOGOUT */
! #undef AUTOLOGOUT
  
  /*
   * SUSPENDED	Newer shells say 'Suspended' instead of 'Stopped'.
***************
*** 117,130 ****
   *		be used with SHORT_STRINGS
   *
   */
! #undef KANJI
  
  /*
   * DSPMBYTE	add variable "dspmbyte" and display multi-byte string at
   *		only output, when "dspmbyte" is set. Should be used with
   *		KANJI
   */
! #undef DSPMBYTE
  
  /*
   * MBYTEDEBUG	when "dspmbyte" is changed, set multi-byte checktable to
--- 121,136 ----
   *		be used with SHORT_STRINGS
   *
   */
! /* #undef KANJI */
! #define KANJI
  
  /*
   * DSPMBYTE	add variable "dspmbyte" and display multi-byte string at
   *		only output, when "dspmbyte" is set. Should be used with
   *		KANJI
   */
! /* #undef DSPMBYTE */
! #define DSPMBYTE
  
  /*
   * MBYTEDEBUG	when "dspmbyte" is changed, set multi-byte checktable to
***************
*** 174,180 ****
   * COLORCAT Do you want to colorful message ?
   *
   */
! #undef COLORCAT
  
  /*
   * RCSID	This defines if we want rcs strings in the binary or not
--- 180,187 ----
   * COLORCAT Do you want to colorful message ?
   *
   */
! /* #undef COLORCAT */
! #define COLORCAT
  
  /*
   * RCSID	This defines if we want rcs strings in the binary or not
*** tcsh-6.09.00/ed.chared.c.orig	Sat Aug 14 01:34:58 1999
--- tcsh-6.09.00/ed.chared.c	Sat May 20 12:29:10 2000
***************
*** 3333,3339 ****
  
      USE(cc);
      if (Cursor < LastChar) {
! #ifndef WINNT
  	c = *Cursor;
  #else
  	c = CHAR & *Cursor;
--- 3333,3339 ----
  
      USE(cc);
      if (Cursor < LastChar) {
! #if !defined(WINNT) || defined(__CYGWIN__)
  	c = *Cursor;
  #else
  	c = CHAR & *Cursor;
***************
*** 3407,3413 ****
      int c;
  {			
      USE(c);
! #if defined(_MINIX) || defined(WINNT)
      /* SAK PATCH: erase all of current line, start again */
      ResetInLine(0);		/* reset the input pointers */
      xputchar('\n');
--- 3407,3413 ----
      int c;
  {			
      USE(c);
! #if defined(_MINIX) || (defined(WINNT) && !defined(__CYGWIN__))
      /* SAK PATCH: erase all of current line, start again */
      ResetInLine(0);		/* reset the input pointers */
      xputchar('\n');
***************
*** 3864,3870 ****
  			 F_DOWN_SEARCH_HIST : F_UP_SEARCH_HIST));
  }
  
! #ifndef WINNT
  /* Since ed.defns.h  is generated from ed.defns.c, these empty 
     functions will keep the F_NUM_FNS consistent
   */
--- 3864,3870 ----
  			 F_DOWN_SEARCH_HIST : F_UP_SEARCH_HIST));
  }
  
! #if !defined(WINNT) || defined(__CYGWIN__)
  /* Since ed.defns.h  is generated from ed.defns.c, these empty 
     functions will keep the F_NUM_FNS consistent
   */
*** tcsh-6.09.00/ed.defns.c.orig	Wed Nov 25 03:17:18 1998
--- tcsh-6.09.00/ed.defns.c	Sat May 20 12:29:10 2000
***************
*** 289,295 ****
  #define	F_NUM_FUNCNAMES	(F_NUM_FNS + 2)
  struct KeyFuncs FuncNames[F_NUM_FUNCNAMES];
  
! #ifdef WINNT
  extern KEYCMD CcEmacsMap[];
  extern KEYCMD CcViMap[];
  extern KEYCMD  CcViCmdMap[];
--- 289,295 ----
  #define	F_NUM_FUNCNAMES	(F_NUM_FNS + 2)
  struct KeyFuncs FuncNames[F_NUM_FUNCNAMES];
  
! #if defined(WINNT) && !defined(__CYGWIN__)
  extern KEYCMD CcEmacsMap[];
  extern KEYCMD CcViMap[];
  extern KEYCMD  CcViCmdMap[];
***************
*** 1122,1128 ****
  {
      struct KeyFuncs *f;
  
! #if defined(NLS_CATALOGS) || defined(WINNT)
      int i;
  
      for (i = 0; i < F_NUM_FUNCNAMES; i++)
--- 1122,1128 ----
  {
      struct KeyFuncs *f;
  
! #if defined(NLS_CATALOGS) || (defined(WINNT) && !defined(__CYGWIN__))
      int i;
  
      for (i = 0; i < F_NUM_FUNCNAMES; i++)
*** tcsh-6.09.00/ed.h.orig	Wed Nov 25 03:17:22 1998
--- tcsh-6.09.00/ed.h	Sat May 20 12:29:10 2000
***************
*** 44,50 ****
  #define TABSIZE		8	/* usually 8 spaces/tab */
  #define MAXMACROLEVELS	10	/* max number of nested kbd macros */
  
! #ifndef WINNT
  # define NT_NUM_KEYS	256
  #endif /* WINNT */
  
--- 44,50 ----
  #define TABSIZE		8	/* usually 8 spaces/tab */
  #define MAXMACROLEVELS	10	/* max number of nested kbd macros */
  
! #if !defined(WINNT) || defined(__CYGWIN__)
  # define NT_NUM_KEYS	256
  #endif /* WINNT */
  
***************
*** 190,196 ****
   * Terminal dependend data structures
   */
  typedef struct {
! #ifdef WINNT
      int dummy;
  #else /* !WINNT */
  # if defined(POSIX) || defined(TERMIO)
--- 190,196 ----
   * Terminal dependend data structures
   */
  typedef struct {
! #if defined(WINNT) && !defined(__CYGWIN__)
      int dummy;
  #else /* !WINNT */
  # if defined(POSIX) || defined(TERMIO)
*** tcsh-6.09.00/ed.init.c.orig	Sun Feb  7 00:01:16 1999
--- tcsh-6.09.00/ed.init.c	Sat May 20 12:29:10 2000
***************
*** 176,182 ****
  	return(0);
  
  #if defined(POSIX) && defined(_PC_VDISABLE) && !defined(BSD4_4) && \
!     !defined(WINNT)
      { 
  	long pcret;
  
--- 176,182 ----
  	return(0);
  
  #if defined(POSIX) && defined(_PC_VDISABLE) && !defined(BSD4_4) && \
!     (!defined(WINNT) || defined(__CYGWIN__))
      { 
  	long pcret;
  
***************
*** 208,214 ****
      Hist_num = 0;
      Expand = 0;
  
! #ifndef WINNT
      if (tty_getty(SHTTY, &extty) == -1) {
  # ifdef DEBUG_TTY
  	xprintf("ed_Setup: tty_getty: %s\n", strerror(errno));
--- 208,214 ----
      Hist_num = 0;
      Expand = 0;
  
! #if !defined(WINNT) || !defined(__CYGWIN__)
      if (tty_getty(SHTTY, &extty) == -1) {
  # ifdef DEBUG_TTY
  	xprintf("ed_Setup: tty_getty: %s\n", strerror(errno));
***************
*** 320,326 ****
  	GetTermCaps();		/* does the obvious, but gets term type each
  				 * time */
  
! #ifndef WINNT
  # if defined(TERMIO) || defined(POSIX)
      edtty.d_t.c_iflag &= ~ttylist[ED_IO][M_INPUT].t_clrmask;
      edtty.d_t.c_iflag |=  ttylist[ED_IO][M_INPUT].t_setmask;
--- 320,326 ----
  	GetTermCaps();		/* does the obvious, but gets term type each
  				 * time */
  
! #if !defined(WINNT) || defined(__CYGWIN__)
  # if defined(TERMIO) || defined(POSIX)
      edtty.d_t.c_iflag &= ~ttylist[ED_IO][M_INPUT].t_clrmask;
      edtty.d_t.c_iflag |=  ttylist[ED_IO][M_INPUT].t_setmask;
***************
*** 367,373 ****
      if (Tty_raw_mode)
  	return (0);
  
! #ifdef WINNT
      do_nt_raw_mode();
  #else /* !WINNT */
  # ifdef _IBMR2
--- 367,373 ----
      if (Tty_raw_mode)
  	return (0);
  
! #if defined(WINNT) && !defined(__CYGWIN__)
      do_nt_raw_mode();
  #else /* !WINNT */
  # ifdef _IBMR2
***************
*** 550,556 ****
  int
  Cookedmode()
  {				/* set tty in normal setup */
! #ifdef WINNT
      do_nt_cooked_mode();
  #else
      signalfun_t orig_intr;
--- 550,556 ----
  int
  Cookedmode()
  {				/* set tty in normal setup */
! #if defined(WINNT) && !defined(__CYGWIN__)
      do_nt_cooked_mode();
  #else
      signalfun_t orig_intr;
***************
*** 687,693 ****
      if (MacroLvl >= 0)
  	return;
  
! #ifndef WINNT
      qutty = edtty;
  
  #if defined(TERMIO) || defined(POSIX)
--- 687,693 ----
      if (MacroLvl >= 0)
  	return;
  
! #if !defined(WINNT) || defined(__CYGWIN__)
      qutty = edtty;
  
  #if defined(TERMIO) || defined(POSIX)
*** tcsh-6.09.00/ed.inputl.c.orig	Tue Apr 20 16:48:40 1999
--- tcsh-6.09.00/ed.inputl.c	Sat May 20 12:29:10 2000
***************
*** 733,739 ****
      if (Rawmode() < 0)		/* make sure the tty is set up correctly */
  	return 0;		/* oops: SHIN was closed */
  
! #ifdef WINNT
      __nt_want_vcode = 1;
  #endif /* WINNT */
      while ((num_read = read(SHIN, (char *) &tcp, 1)) == -1) {
--- 733,739 ----
      if (Rawmode() < 0)		/* make sure the tty is set up correctly */
  	return 0;		/* oops: SHIN was closed */
  
! #if defined(WINNT) && !defined(__CYGWIN__)
      __nt_want_vcode = 1;
  #endif /* WINNT */
      while ((num_read = read(SHIN, (char *) &tcp, 1)) == -1) {
***************
*** 747,760 ****
              if (errno != EINTR)
                  stderror(ERR_SYSTEM, progname, strerror(errno));
  #endif  /* convex */
! #ifdef WINNT
  	    __nt_want_vcode = 0;
  #endif /* WINNT */
  	    *cp = '\0';
  	    return -1;
  	}
      }
! #ifdef WINNT
      if (__nt_want_vcode == 2)
  	*cp = __nt_vcode;
      else
--- 747,760 ----
              if (errno != EINTR)
                  stderror(ERR_SYSTEM, progname, strerror(errno));
  #endif  /* convex */
! #if defined(WINNT) && !defined(__CYGWIN__)
  	    __nt_want_vcode = 0;
  #endif /* WINNT */
  	    *cp = '\0';
  	    return -1;
  	}
      }
! #if defined(WINNT) && !defined(__CYGWIN__)
      if (__nt_want_vcode == 2)
  	*cp = __nt_vcode;
      else
***************
*** 806,812 ****
  	mismatch[1] = HISTSUB;
  	if (!Strchr(mismatch, *argptr) &&
  	    (!cmdonly || starting_a_command(argptr, InputBuf))) {
! #ifdef WINNT
  	    /*
  	     * This hack avoids correcting drive letter changes
  	     */
--- 806,812 ----
  	mismatch[1] = HISTSUB;
  	if (!Strchr(mismatch, *argptr) &&
  	    (!cmdonly || starting_a_command(argptr, InputBuf))) {
! #if defined(WINNT) && !defined(__CYGWIN__)
  	    /*
  	     * This hack avoids correcting drive letter changes
  	     */
*** tcsh-6.09.00/ed.refresh.c.orig	Wed Nov 25 03:17:22 1998
--- tcsh-6.09.00/ed.refresh.c	Sat May 20 12:29:10 2000
***************
*** 348,354 ****
      for (cur_line = 0; cur_line <= new_vcv; cur_line++) {
  	/* NOTE THAT update_line MAY CHANGE Display[cur_line] */
  	update_line(Display[cur_line], Vdisplay[cur_line], cur_line);
! #ifdef WINNT
  	flush();
  #endif /* WINNT */
  
--- 348,354 ----
      for (cur_line = 0; cur_line <= new_vcv; cur_line++) {
  	/* NOTE THAT update_line MAY CHANGE Display[cur_line] */
  	update_line(Display[cur_line], Vdisplay[cur_line], cur_line);
! #if defined(WINNT) && !defined(__CYGWIN__)
  	flush();
  #endif /* WINNT */
  
***************
*** 379,385 ****
      dprintf("\r\nCursorH = %d, CursorV = %d, cur_h = %d, cur_v = %d\r\n",
  	    CursorH, CursorV, cur_h, cur_v);
  #endif /* DEBUG_REFRESH */
! #ifdef WINNT
      flush();
  #endif /* WINNT */
      MoveToLine(cur_v);		/* go to where the cursor is */
--- 379,385 ----
      dprintf("\r\nCursorH = %d, CursorV = %d, cur_h = %d, cur_v = %d\r\n",
  	    CursorH, CursorV, cur_h, cur_v);
  #endif /* DEBUG_REFRESH */
! #if defined(WINNT) && !defined(__CYGWIN__)
      flush();
  #endif /* WINNT */
      MoveToLine(cur_v);		/* go to where the cursor is */
***************
*** 915,921 ****
  #ifdef DEBUG_REFRESH
  	    dprintf("cleareol %d\n", (oe - old) - (ne - new));
  #endif  /* DEBUG_UPDATE */
! #ifndef WINNT
  	    ClearEOL((oe - old) - (ne - new));
  #else
  	    /*
--- 915,921 ----
  #ifdef DEBUG_REFRESH
  	    dprintf("cleareol %d\n", (oe - old) - (ne - new));
  #endif  /* DEBUG_UPDATE */
! #if !defined(WINNT) || defined(__CYGWIN__)
  	    ClearEOL((oe - old) - (ne - new));
  #else
  	    /*
***************
*** 978,984 ****
  #ifdef DEBUG_REFRESH
  	    dprintf("cleareol %d\n", olen - (ne - new));
  #endif /* DEBUG_UPDATE */
! #ifndef WINNT
  	    ClearEOL(olen - (ne - new));
  #else
  	    /*
--- 978,984 ----
  #ifdef DEBUG_REFRESH
  	    dprintf("cleareol %d\n", olen - (ne - new));
  #endif /* DEBUG_UPDATE */
! #if !defined(WINNT) || defined(__CYGWIN__)
  	    ClearEOL(olen - (ne - new));
  #else
  	    /*
*** tcsh-6.09.00/ed.screen.c.orig	Sun Feb  7 00:18:56 1999
--- tcsh-6.09.00/ed.screen.c	Sat May 20 12:29:10 2000
***************
*** 1083,1089 ****
  
      del = where - CursorV;
  
! #ifndef WINNT
      if (del > 0) {
  	while (del > 0) {
  	    if ((T_Margin & MARGIN_AUTO) && Display[CursorV][0] != '\0') {
--- 1083,1089 ----
  
      del = where - CursorV;
  
! #if !defined(WINNT) || defined(__CYGWIN__)
      if (del > 0) {
  	while (del > 0) {
  	    if ((T_Margin & MARGIN_AUTO) && Display[CursorV][0] != '\0') {
***************
*** 1125,1131 ****
  MoveToChar(where)		/* move to character position (where) */
      int     where;
  {				/* as efficiently as possible */
! #ifndef WINNT
      int     del;
  
  mc_again:
--- 1125,1131 ----
  MoveToChar(where)		/* move to character position (where) */
      int     where;
  {				/* as efficiently as possible */
! #if !defined(WINNT) || defined(__CYGWIN__)
      int     del;
  
  mc_again:
***************
*** 1147,1153 ****
  	return;
      }
  
! #ifndef WINNT
      del = where - CursorH;
  
      if ((del < -4 || del > 4) && GoodStr(T_ch))
--- 1147,1153 ----
  	return;
      }
  
! #if !defined(WINNT) || defined(__CYGWIN__)
      del = where - CursorH;
  
      if ((del < -4 || del > 4) && GoodStr(T_ch))
***************
*** 1225,1231 ****
  	    xprintf("so: litnum %d, litptr %x\r\n",
  		    *cp & CHAR, litptr[*cp & CHAR]);
  #endif /* DEBUG_LITERAL */
! #if defined(WINNT) && !defined(COLOR_LS_F)
  	    {
  		char buf[256], *ptr = &buf[0];
  		for (d = litptr[*cp++ & CHAR]; *d & LITERAL; d++)
--- 1225,1231 ----
  	    xprintf("so: litnum %d, litptr %x\r\n",
  		    *cp & CHAR, litptr[*cp & CHAR]);
  #endif /* DEBUG_LITERAL */
! #if (defined(WINNT) && !defined(__CYGWIN__)) && !defined(COLOR_LS_F)
  	    {
  		char buf[256], *ptr = &buf[0];
  		for (d = litptr[*cp++ & CHAR]; *d & LITERAL; d++)
***************
*** 1413,1419 ****
  	/* what termcap says we should use */
  	(void) tputs(Str(T_bl), 1, PUTPURE);
      else
! #ifndef WINNT
  	(void) putraw(CTL_ESC('\007'));	/* an ASCII bell; ^G */
  #else /* WINNT */
  	MessageBeep(MB_ICONQUESTION);
--- 1413,1419 ----
  	/* what termcap says we should use */
  	(void) tputs(Str(T_bl), 1, PUTPURE);
      else
! #if !defined(WINNT) || defined(__CYGWIN__)
  	(void) putraw(CTL_ESC('\007'));	/* an ASCII bell; ^G */
  #else /* WINNT */
  	MessageBeep(MB_ICONQUESTION);
***************
*** 1619,1625 ****
      Val(T_co) = (cols < 2) ? 80 : cols;
      Val(T_li) = (lins < 1) ? 24 : lins;
  
! #ifdef WINNT
        nt_set_size(lins,cols);
  #endif /* WINNT */
  #ifdef KNOWsize
--- 1619,1625 ----
      Val(T_co) = (cols < 2) ? 80 : cols;
      Val(T_li) = (lins < 1) ? 24 : lins;
  
! #if defined(WINNT) && !defined(__CYGWIN__)
        nt_set_size(lins,cols);
  #endif /* WINNT */
  #ifdef KNOWsize
*** tcsh-6.09.00/ed.term.c.orig	Thu Aug 12 23:19:24 1999
--- tcsh-6.09.00/ed.term.c	Sat May 20 12:29:10 2000
***************
*** 35,41 ****
   * SUCH DAMAGE.
   */
  #include "sh.h"
! #ifndef WINNT
  
  RCSID("$Id: ed.term.c,v 1.24 1999/08/12 14:19:23 christos Exp $")
  
--- 35,41 ----
   * SUCH DAMAGE.
   */
  #include "sh.h"
! #if !defined(WINNT) || defined(__CYGWIN__)
  
  RCSID("$Id: ed.term.c,v 1.24 1999/08/12 14:19:23 christos Exp $")
  
*** tcsh-6.09.00/ed.xmap.c.orig	Wed Jun  2 05:01:32 1999
--- tcsh-6.09.00/ed.xmap.c	Sat May 20 12:29:12 2000
***************
*** 788,794 ****
  
      b = buf;
      if (sep[0])
! #ifndef WINNT
  	*b++ = sep[0];
  #else /* WINNT */
  	*b++ = CHAR & sep[0];
--- 788,794 ----
  
      b = buf;
      if (sep[0])
! #if !defined(WINNT) || defined(__CYGWIN__)
  	*b++ = sep[0];
  #else /* WINNT */
  	*b++ = CHAR & sep[0];
***************
*** 834,840 ****
  	}
      }
      if (sep[0] && sep[1])
! #ifndef WINNT
  	*b++ = sep[1];
  #else /* WINNT */
  	*b++ = CHAR & sep[1];
--- 834,840 ----
  	}
      }
      if (sep[0] && sep[1])
! #if !defined(WINNT) || defined(__CYGWIN__)
  	*b++ = sep[1];
  #else /* WINNT */
  	*b++ = CHAR & sep[1];
*** tcsh-6.09.00/glob.c.orig	Tue Aug 17 05:06:32 1999
--- tcsh-6.09.00/glob.c	Sat May 20 12:29:12 2000
***************
*** 63,69 ****
  #include <ctype.h>
  typedef void * ptr_t;
  #endif
! #ifdef WINNT
  	#pragma warning(disable:4244)
  #endif /* WINNT */
  
--- 63,69 ----
  #include <ctype.h>
  typedef void * ptr_t;
  #endif
! #if defined(WINNT) && !defined(__CYGWIN__)
  	#pragma warning(disable:4244)
  #endif /* WINNT */
  
*** tcsh-6.09.00/sh.c.orig	Sat Aug 14 01:32:52 1999
--- tcsh-6.09.00/sh.c	Sat May 20 12:29:12 2000
***************
*** 190,196 ****
      sigvec_t osv;
  #endif /* BSDSIGS */
  
! #ifdef WINNT
      nt_init();
  #endif /* WINNT */
  #if defined(NLS_CATALOGS) && defined(LC_MESSAGES)
--- 190,196 ----
      sigvec_t osv;
  #endif /* BSDSIGS */
  
! #if defined(WINNT) && !defined(__CYGWIN__)
      nt_init();
  #endif /* WINNT */
  #if defined(NLS_CATALOGS) && defined(LC_MESSAGES)
***************
*** 248,254 ****
  	char *t;
  
  	t = strrchr(argv[0], '/');
! #ifdef WINNT
  	{
  	    char *s = strrchr(argv[0], '\\');
  	    if (s)
--- 248,254 ----
  	char *t;
  
  	t = strrchr(argv[0], '/');
! #if defined(WINNT) && !defined(__CYGWIN__)
  	{
  	    char *s = strrchr(argv[0], '\\');
  	    if (s)
***************
*** 708,714 ****
  #endif /* COLOR_LS_F */
  
      doldol = putn((int) getpid());	/* For $$ */
! #ifdef WINNT
      {
  	char *strtmp1, strtmp2[MAXPATHLEN];
  	if ((strtmp1 = getenv("TMP")) != NULL)
--- 708,714 ----
  #endif /* COLOR_LS_F */
  
      doldol = putn((int) getpid());	/* For $$ */
! #if defined(WINNT) && !defined(__CYGWIN__)
      {
  	char *strtmp1, strtmp2[MAXPATHLEN];
  	if ((strtmp1 = getenv("TMP")) != NULL)
***************
*** 1289,1295 ****
      if ((tcp = getenv("LANG")) != NULL && !adrof(CHECK_MBYTEVAR)) {
  	autoset_dspmbyte(str2short(tcp));
      }
! #if defined(WINNT)
      else if (!adrof(CHECK_MBYTEVAR))
        nt_autoset_dspmbyte();
  #endif /* WINNT */
--- 1289,1295 ----
      if ((tcp = getenv("LANG")) != NULL && !adrof(CHECK_MBYTEVAR)) {
  	autoset_dspmbyte(str2short(tcp));
      }
! #if defined(WINNT) && !defined(__CYGWIN__)
      else if (!adrof(CHECK_MBYTEVAR))
        nt_autoset_dspmbyte();
  #endif /* WINNT */
***************
*** 1376,1382 ****
  		else
  		    break;
  	    }
! #ifdef WINNT
  	    else if (*dp == '\\')
  		*dp = '/';
  #endif /* WINNT */
--- 1376,1382 ----
  		else
  		    break;
  	    }
! #if defined(WINNT) && !defined(__CYGWIN__)
  	    else if (*dp == '\\')
  		*dp = '/';
  #endif /* WINNT */
***************
*** 1400,1406 ****
  	char   *ptr;
  	int rv;
  
! #ifdef WINNT
  	ep = cp;
  	while(*ep)
  	    ep++;
--- 1400,1406 ----
  	char   *ptr;
  	int rv;
  
! #if defined(WINNT) && !defined(__CYGWIN__)
  	ep = cp;
  	while(*ep)
  	    ep++;
***************
*** 1850,1856 ****
      (void) sigrelse(SIGCHLD);
  #endif
      drainoline();
! #if !defined(_VMS_POSIX) && !defined(WINNT)
      (void) endpwent();
  #endif /* !_VMS_POSIX && !WINNT */
  
--- 1850,1856 ----
      (void) sigrelse(SIGCHLD);
  #endif
      drainoline();
! #if !defined(_VMS_POSIX) && (!defined(WINNT) || defined(__CYGWIN__))
      (void) endpwent();
  #endif /* !_VMS_POSIX && !WINNT */
  
***************
*** 2373,2379 ****
      if (child == 0)
  	(void) catclose(catd);
  #endif /* NLS_CATALOGS */
! #ifdef WINNT
      nt_cleanup();
  #endif /* WINNT */
      _exit(i);
--- 2373,2379 ----
      if (child == 0)
  	(void) catclose(catd);
  #endif /* NLS_CATALOGS */
! #if defined(WINNT) && !defined(__CYGWIN__)
      nt_cleanup();
  #endif /* WINNT */
      _exit(i);
*** tcsh-6.09.00/sh.char.h.orig	Sat Sep 19 01:09:08 1998
--- tcsh-6.09.00/sh.char.h	Sat May 20 12:29:12 2000
***************
*** 150,156 ****
  #endif /* !defined(DSPMBYTE) */
  #  define Ispunct(c) 	(((Char)(c) & QUOTE) ? 0 : NXIsPunct((unsigned) (c)))
  # else /* !NeXT */
! #  ifndef WINNT
  #   define Isspace(c)	(((Char)(c) & QUOTE) ? 0 : isspace((tcshuc) (c)))
  #   define Isdigit(c)	(((Char)(c) & QUOTE) ? 0 : isdigit((tcshuc) (c)))
  #   define Isalpha(c)	(((Char)(c) & QUOTE) ? 0 : isalpha((tcshuc) (c)))
--- 150,156 ----
  #endif /* !defined(DSPMBYTE) */
  #  define Ispunct(c) 	(((Char)(c) & QUOTE) ? 0 : NXIsPunct((unsigned) (c)))
  # else /* !NeXT */
! #  if !defined(WINNT) || defined(__CYGWIN__)
  #   define Isspace(c)	(((Char)(c) & QUOTE) ? 0 : isspace((tcshuc) (c)))
  #   define Isdigit(c)	(((Char)(c) & QUOTE) ? 0 : isdigit((tcshuc) (c)))
  #   define Isalpha(c)	(((Char)(c) & QUOTE) ? 0 : isalpha((tcshuc) (c)))
*** tcsh-6.09.00/sh.dir.c.orig	Mon Oct 26 00:10:04 1998
--- tcsh-6.09.00/sh.dir.c	Sat May 20 12:29:12 2000
***************
*** 513,519 ****
      else
  	dp = cp;
  
! #ifdef WINNT
      cp = SAVE(getcwd(NULL, 0));
  #else /* !WINNT */
      cp = dcanon(cp, dp);
--- 513,519 ----
      else
  	dp = cp;
  
! #if defined(WINNT) && !defined(__CYGWIN__)
      cp = SAVE(getcwd(NULL, 0));
  #else /* !WINNT */
      cp = dcanon(cp, dp);
*** tcsh-6.09.00/sh.dol.c.orig	Mon Oct 26 00:10:06 1998
--- tcsh-6.09.00/sh.dol.c	Sat May 20 12:29:12 2000
***************
*** 1026,1032 ****
      ocnt = BUFSIZE;
      obp = obuf;
      inheredoc = 1;
! #ifdef WINNT
      __dup_stdin = 1;
  #endif /* WINNT */
      for (;;) {
--- 1026,1032 ----
      ocnt = BUFSIZE;
      obp = obuf;
      inheredoc = 1;
! #if defined(WINNT) && !defined(__CYGWIN__)
      __dup_stdin = 1;
  #endif /* WINNT */
      for (;;) {
*** tcsh-6.09.00/sh.exec.c.orig	Tue Apr 20 16:48:44 1999
--- tcsh-6.09.00/sh.exec.c	Sat May 20 12:29:12 2000
***************
*** 40,49 ****
  
  #include "tc.h"
  #include "tw.h"
! #ifdef WINNT
  #include <nt.const.h>
  #endif /*WINNT*/
  
  /*
   * C shell
   */
--- 40,54 ----
  
  #include "tc.h"
  #include "tw.h"
! #if defined(WINNT) && !defined(__CYGWIN__)
  #include <nt.const.h>
  #endif /*WINNT*/
  
+ #ifdef __CYGWIN__
+ #define STRdotEXE ".exe"
+ #define MAX_PATH	(260)
+ #endif
+ 
  /*
   * C shell
   */
***************
*** 431,437 ****
      switch (errno) {
  
      case ENOEXEC:
! #ifdef WINNT
  		nt_feed_to_cmd(f,t);
  #endif /* WINNT */
  	/*
--- 436,442 ----
      switch (errno) {
  
      case ENOEXEC:
! #if defined(WINNT) && !defined(__CYGWIN__)
  		nt_feed_to_cmd(f,t);
  #endif /* WINNT */
  	/*
***************
*** 617,623 ****
  	 * Decrement the shell level
  	 */
  	shlvl(-1);
! #ifdef WINNT
  	__nt_really_exec=1;
  #endif /* WINNT */
  	doexec(kp);
--- 622,628 ----
  	 * Decrement the shell level
  	 */
  	shlvl(-1);
! #if defined(WINNT) && !defined(__CYGWIN__)
  	__nt_really_exec=1;
  #endif /* WINNT */
  	doexec(kp);
***************
*** 673,681 ****
      struct varent *v = adrof(STRpath);
      Char  **pv;
      int hashval;
! #ifdef WINNT
      int is_windir; /* check if it is the windows directory */
      USE(hashval);
  #endif /* WINNT */
  
      USE(c);
--- 678,688 ----
      struct varent *v = adrof(STRpath);
      Char  **pv;
      int hashval;
! #if defined(WINNT)
      int is_windir; /* check if it is the windows directory */
+ #ifndef __CYGWIN__
      USE(hashval);
+ #endif	/* Cygwin */
  #endif /* WINNT */
  
      USE(c);
***************
*** 738,744 ****
  	    continue;
  	}
  #endif
! #ifdef WINNT
  	is_windir = nt_check_if_windir(short2str(*pv));
  #endif /* WINNT */
  	while ((dp = readdir(dirp)) != NULL) {
--- 745,751 ----
  	    continue;
  	}
  #endif
! #if defined(WINNT) && !defined(__CYGWIN__)
  	is_windir = nt_check_if_windir(short2str(*pv));
  #endif /* WINNT */
  	while ((dp = readdir(dirp)) != NULL) {
***************
*** 748,754 ****
  		(dp->d_name[1] == '\0' ||
  		 (dp->d_name[1] == '.' && dp->d_name[2] == '\0')))
  		continue;
! #ifdef WINNT
  	    nt_check_name_and_hash(is_windir, dp->d_name, i);
  #else /* !WINNT */
  #if defined(_UWIN) /* XXX: Add cygwin too */
--- 755,761 ----
  		(dp->d_name[1] == '\0' ||
  		 (dp->d_name[1] == '.' && dp->d_name[2] == '\0')))
  		continue;
! #if defined(WINNT)
  	    nt_check_name_and_hash(is_windir, dp->d_name, i);
  #else /* !WINNT */
  #if defined(_UWIN) /* XXX: Add cygwin too */
***************
*** 947,953 ****
  	    ((dir_ok && S_ISDIR(stbuf.st_mode)) ||
  	     (S_ISREG(stbuf.st_mode) &&
      /* save time by not calling access() in the hopeless case */
! #ifdef WINNT
  	      (GetBinaryType(strname,&nt_exetype) ||
  	      (stbuf.st_mode & (S_IXOTH | S_IXGRP | S_IXUSR)))
  #else /* !WINNT */
--- 954,960 ----
  	    ((dir_ok && S_ISDIR(stbuf.st_mode)) ||
  	     (S_ISREG(stbuf.st_mode) &&
      /* save time by not calling access() in the hopeless case */
! #if defined(WINNT) && !defined(__CYGWIN__)
  	      (GetBinaryType(strname,&nt_exetype) ||
  	      (stbuf.st_mode & (S_IXOTH | S_IXGRP | S_IXUSR)))
  #else /* !WINNT */
***************
*** 1017,1023 ****
  	    return TRUE;
  	}
      }
! #ifdef WINNT
      for (bptr = nt_bfunc; bptr < &nt_bfunc[nt_nbfunc]; bptr++) {
  	if (eq(sp->word, str2short(bptr->bname))) {
  	    if (str == NULL) {
--- 1024,1030 ----
  	    return TRUE;
  	}
      }
! #if defined(WINNT) && !defined(__CYGWIN__)
      for (bptr = nt_bfunc; bptr < &nt_bfunc[nt_nbfunc]; bptr++) {
  	if (eq(sp->word, str2short(bptr->bname))) {
  	    if (str == NULL) {
***************
*** 1148,1154 ****
  		return rval;
  	}
      }
! #ifdef WINNT
      for (bptr = nt_bfunc; bptr < &nt_bfunc[nt_nbfunc]; bptr++) {
  	if (eq(cmd, str2short(bptr->bname))) {
  	    rval = 1;
--- 1155,1161 ----
  		return rval;
  	}
      }
! #if defined(WINNT) && !defined(__CYGWIN__)
      for (bptr = nt_bfunc; bptr < &nt_bfunc[nt_nbfunc]; bptr++) {
  	if (eq(cmd, str2short(bptr->bname))) {
  	    rval = 1;
***************
*** 1201,1207 ****
      return rval;
  }
  
! #ifdef WINNT
  int
  nt_check_if_windir(path)
      char *path;
--- 1208,1215 ----
      return rval;
  }
  
! #if defined(WINNT)
! #if !defined(__CYGWIN__)
  int
  nt_check_if_windir(path)
      char *path;
***************
*** 1213,1218 ****
--- 1221,1227 ----
  
      return (strstr(path, windir) != NULL);
  }
+ #endif /* Cygwin */
  
  void
  nt_check_name_and_hash(is_windir, file, i)
*** tcsh-6.09.00/sh.func.c.orig	Tue Aug 17 05:05:50 1999
--- tcsh-6.09.00/sh.func.c	Sat May 20 12:29:12 2000
***************
*** 41,47 ****
  #include "ed.h"
  #include "tw.h"
  #include "tc.h"
! #ifdef WINNT
  #include "nt.const.h"
  #endif /* WINNT */
  
--- 41,47 ----
  #include "ed.h"
  #include "tw.h"
  #include "tc.h"
! #if defined(WINNT) && !defined(__CYGWIN__)
  #include "nt.const.h"
  #endif /* WINNT */
  
***************
*** 126,132 ****
  	else
  	    bp1 = bp + 1;
      }
! #ifdef WINNT
      return nt_check_additional_builtins(cp);
  #endif /*WINNT*/
      return (0);
--- 126,132 ----
  	else
  	    bp1 = bp + 1;
      }
! #if defined(WINNT) && !defined(__CYGWIN__)
      return nt_check_additional_builtins(cp);
  #endif /*WINNT*/
      return (0);
***************
*** 347,353 ****
      struct command *c;
  {
      USE(c);
! #ifdef WINNT
      USE(v);
  #else /* !WINNT */
      islogin();
--- 347,353 ----
      struct command *c;
  {
      USE(c);
! #if defined(WINNT) && !defined(__CYGWIN__)
      USE(v);
  #else /* !WINNT */
      islogin();
***************
*** 1390,1396 ****
  	xfree((ptr_t) lp);
  	return;
      }
! #ifdef WINNT
      if (eq(vp, STRtcshlang)) {
  	nlsinit();
  	xfree((ptr_t) lp);
--- 1390,1396 ----
  	xfree((ptr_t) lp);
  	return;
      }
! #if defined(WINNT) && !defined(__CYGWIN__)
      if (eq(vp, STRtcshlang)) {
  	nlsinit();
  	xfree((ptr_t) lp);
***************
*** 1571,1577 ****
  			ed_InitNLSMaps();
  
  		}
! #ifdef WINNT
  		else if (eq(name,(STRtcshlang))) {
  		    nls_dll_unload();
  		    nlsinit();
--- 1571,1577 ----
  			ed_InitNLSMaps();
  
  		}
! #if defined(WINNT) && !defined(__CYGWIN__)
  		else if (eq(name,(STRtcshlang))) {
  		    nls_dll_unload();
  		    nlsinit();
***************
*** 1617,1627 ****
      Char   *blk[2];
      Char  **oep = ep;
  
! #ifdef WINNT
  	nt_set_env(name,val);
  #endif /* WINNT */
      for (; *ep; ep++) {
! #ifdef WINNT
  	for (cp = name, dp = *ep; *cp && Tolower(*cp & TRIM) == Tolower(*dp);
  				cp++, dp++)
  #else
--- 1617,1627 ----
      Char   *blk[2];
      Char  **oep = ep;
  
! #if defined(WINNT) && !defined(__CYGWIN__)
  	nt_set_env(name,val);
  #endif /* WINNT */
      for (; *ep; ep++) {
! #if defined(WINNT)
  	for (cp = name, dp = *ep; *cp && Tolower(*cp & TRIM) == Tolower(*dp);
  				cp++, dp++)
  #else
***************
*** 1657,1663 ****
      register Char *cp, *dp;
      Char **oep = ep;
  
! #ifdef WINNT
  	nt_set_env(name,NULL);
  #endif /*WINNT */
      for (; *ep; ep++) {
--- 1657,1663 ----
      register Char *cp, *dp;
      Char **oep = ep;
  
! #if defined(WINNT) && !defined(__CYGWIN__)
  	nt_set_env(name,NULL);
  #endif /*WINNT */
      for (; *ep; ep++) {
***************
*** 2372,2378 ****
  	    xputchar('\n');
  	}
      }
! #ifdef WINNT
      nt_print_builtins(maxwidth);
  #else
      if (Tty_raw_mode)
--- 2372,2378 ----
  	    xputchar('\n');
  	}
      }
! #if defined(WINNT) && !defined(__CYGWIN__)
      nt_print_builtins(maxwidth);
  #else
      if (Tty_raw_mode)
***************
*** 2390,2396 ****
  #ifdef NLS_CATALOGS
      catd = catopen("tcsh", MCLoadBySet);
  #endif
! #ifdef WINNT
      nls_dll_init();
  #endif /* WINNT */
      errinit();		/* init the errorlist in correct locale */
--- 2390,2396 ----
  #ifdef NLS_CATALOGS
      catd = catopen("tcsh", MCLoadBySet);
  #endif
! #if defined(WINNT) && !defined(__CYGWIN__)
      nls_dll_init();
  #endif /* WINNT */
      errinit();		/* init the errorlist in correct locale */
*** tcsh-6.09.00/sh.glob.c.orig	Mon Oct 26 00:10:14 1998
--- tcsh-6.09.00/sh.glob.c	Sat May 20 12:29:12 2000
***************
*** 867,873 ****
  	    c = (*ip++ & TRIM);
  	    if (c == 0)
  		break;
! #ifdef WINNT
  	    if (c == '\r')
  	    	c = ' ';
  #endif /* WINNT */
--- 867,873 ----
  	    c = (*ip++ & TRIM);
  	    if (c == 0)
  		break;
! #if defined(WINNT) && !defined(__CYGWIN__)
  	    if (c == '\r')
  	    	c = ' ';
  #endif /* WINNT */
*** tcsh-6.09.00/sh.h.orig	Mon Oct 26 00:10:16 1998
--- tcsh-6.09.00/sh.h	Sat May 20 12:29:12 2000
***************
*** 55,61 ****
  # define IZERO_STRUCT
  # endif /* IZERO_STRUCT */
  
! #ifndef WINNT
  # define INIT_ZERO
  # define INIT_ZERO_STRUCT
  # define force_read read
--- 55,61 ----
  # define IZERO_STRUCT
  # endif /* IZERO_STRUCT */
  
! #if !defined(WINNT) || defined(__CYGWIN__)
  # define INIT_ZERO
  # define INIT_ZERO_STRUCT
  # define force_read read
***************
*** 182,188 ****
   * Path separator in environment variables
   */
  #ifndef PATHSEP
! # if defined(__EMX__) || defined(WINNT)
  #  define PATHSEP ';'
  # else /* unix */
  #  define PATHSEP ':'
--- 182,188 ----
   * Path separator in environment variables
   */
  #ifndef PATHSEP
! # if defined(__EMX__) || (defined(WINNT) && !defined(__CYGWIN__))
  #  define PATHSEP ';'
  # else /* unix */
  #  define PATHSEP ':'
***************
*** 207,213 ****
  #ifdef _SEQUENT_
  # include <sys/procstats.h>
  #endif /* _SEQUENT_ */
! #if (defined(POSIX) || SYSVREL > 0) && !WINNT
  # include <sys/times.h>
  #endif /* (POSIX || SYSVREL > 0) && !WINNT */
  
--- 207,213 ----
  #ifdef _SEQUENT_
  # include <sys/procstats.h>
  #endif /* _SEQUENT_ */
! #if (defined(POSIX) || SYSVREL > 0) && (!defined(WINNT) || defined(__CYGWIN__))
  # include <sys/times.h>
  #endif /* (POSIX || SYSVREL > 0) && !WINNT */
  
***************
*** 216,222 ****
  #endif /* NLS */
  
  
! #if !defined(_MINIX) && !defined(_VMS_POSIX) && !defined(WINNT)
  # include <sys/param.h>
  #endif /* !_MINIX && !_VMS_POSIX && !WINNT */
  #include <sys/stat.h>
--- 216,222 ----
  #endif /* NLS */
  
  
! #if !defined(_MINIX) && !defined(_VMS_POSIX) && (!defined(WINNT) || defined(__CYGWIN__))
  # include <sys/param.h>
  #endif /* !_MINIX && !_VMS_POSIX && !WINNT */
  #include <sys/stat.h>
***************
*** 236,242 ****
  # endif /* SYSVREL>3 */
  #endif /* BSDTIMES */
  
! #ifndef WINNT
  # ifndef POSIX
  #  ifdef TERMIO
  #   include <termio.h>
--- 236,242 ----
  # endif /* SYSVREL>3 */
  #endif /* BSDTIMES */
  
! #if !defined(WINNT) || defined(__CYGWIN__)
  # ifndef POSIX
  #  ifdef TERMIO
  #   include <termio.h>
***************
*** 310,316 ****
   * versions of DECOSF1 will get TIOCGWINSZ. This might break older versions...
   */
  #if !((defined(SUNOS4) || defined(_MINIX) /* || defined(DECOSF1) */) && defined(TERMIO))
! # if !defined(COHERENT) && !defined(_VMS_POSIX) && !defined(WINNT)
  #  include <sys/ioctl.h>
  # endif
  #endif 
--- 310,316 ----
   * versions of DECOSF1 will get TIOCGWINSZ. This might break older versions...
   */
  #if !((defined(SUNOS4) || defined(_MINIX) /* || defined(DECOSF1) */) && defined(TERMIO))
! # if !defined(COHERENT) && !defined(_VMS_POSIX) && (!defined(WINNT) || defined(__CYGWIN__))
  #  include <sys/ioctl.h>
  # endif
  #endif 
***************
*** 324,330 ****
  # include <sys/filio.h>
  #endif /* (!FIOCLEX && SUNOS4) || (SYSVREL == 4 && !_SEQUENT_ && !SCO && !_SX ) */
  
! #if !defined(_MINIX) && !defined(COHERENT) && !defined(supermax) && !defined(WINNT)
  # include <sys/file.h>
  #endif	/* !_MINIX && !COHERENT && !supermax && !WINNT */
  
--- 324,330 ----
  # include <sys/filio.h>
  #endif /* (!FIOCLEX && SUNOS4) || (SYSVREL == 4 && !_SEQUENT_ && !SCO && !_SX ) */
  
! #if !defined(_MINIX) && !defined(COHERENT) && !defined(supermax) && (!defined(WINNT) || defined(__CYGWIN__))
  # include <sys/file.h>
  #endif	/* !_MINIX && !COHERENT && !supermax && !WINNT */
  
***************
*** 359,365 ****
  #if defined(hpux) || defined(sgi) || defined(OREO) || defined(COHERENT)
  # include <stdio.h>	/* So the fgetpwent() prototypes work */
  #endif /* hpux || sgi || OREO || COHERENT */
! #ifndef WINNT
  #include <pwd.h>
  #include <grp.h>
  #endif /* WINNT */
--- 359,365 ----
  #if defined(hpux) || defined(sgi) || defined(OREO) || defined(COHERENT)
  # include <stdio.h>	/* So the fgetpwent() prototypes work */
  #endif /* hpux || sgi || OREO || COHERENT */
! #if !defined(WINNT) || defined(__CYGWIN__)
  #include <pwd.h>
  #include <grp.h>
  #endif /* WINNT */
***************
*** 442,448 ****
  
  #include "sh.types.h"
  
! #ifndef WINNT
  # ifndef POSIX
  extern pid_t getpgrp __P((int));
  # else /* POSIX */
--- 442,448 ----
  
  #include "sh.types.h"
  
! #if !defined(WINNT) || defined(__CYGWIN__)
  # ifndef POSIX
  extern pid_t getpgrp __P((int));
  # else /* POSIX */
***************
*** 1172,1182 ****
  #  ifdef NEEDstrerror
  extern char *sys_errlist[];
  #  endif
  extern int errno, sys_nerr;
  # endif /* !linux */
  #endif
  
! #ifndef WINNT
  # ifdef NLS_CATALOGS
  #  ifdef linux
  #   include <locale.h>
--- 1172,1187 ----
  #  ifdef NEEDstrerror
  extern char *sys_errlist[];
  #  endif
+ #ifndef __CYGWIN__
  extern int errno, sys_nerr;
+ #else
+ extern int errno;
+ int sys_nerr;
+ #endif	/* Cygwin */
  # endif /* !linux */
  #endif
  
! #if !defined(WINNT) || defined(__CYGWIN__)
  # ifdef NLS_CATALOGS
  #  ifdef linux
  #   include <locale.h>
*** tcsh-6.09.00/sh.lex.c.orig	Wed Apr  8 22:58:54 1998
--- tcsh-6.09.00/sh.lex.c	Sat May 20 12:29:12 2000
***************
*** 1564,1570 ****
  #endif /* BSDJOBS */
  	c = bgetc();
  	if (c < 0) {
! #ifndef WINNT
  # ifndef POSIX
  #  ifdef TERMIO
  	    struct termio tty;
--- 1564,1570 ----
  #endif /* BSDJOBS */
  	c = bgetc();
  	if (c < 0) {
! #if !defined(WINNT) || defined(__CYGWIN__)
  # ifndef POSIX
  #  ifdef TERMIO
  	    struct termio tty;
***************
*** 1578,1584 ****
  	    if (wanteof)
  		return (-1);
  	    /* was isatty but raw with ignoreeof yields problems */
! #ifndef WINNT
  # ifndef POSIX
  #  ifdef TERMIO
  	    if (ioctl(SHIN, TCGETA, (ioctl_t) & tty) == 0 &&
--- 1578,1584 ----
  	    if (wanteof)
  		return (-1);
  	    /* was isatty but raw with ignoreeof yields problems */
! #if !defined(WINNT) || defined(__CYGWIN__)
  # ifndef POSIX
  #  ifdef TERMIO
  	    if (ioctl(SHIN, TCGETA, (ioctl_t) & tty) == 0 &&
***************
*** 1717,1723 ****
  		fbuf[0][i] = (unsigned char) tbuf[i];
  	    feobp += c;
  	}
! #ifndef WINNT
  	c = fbuf[0][fseekp - fbobp];
  	fseekp++;
  #else
--- 1717,1723 ----
  		fbuf[0][i] = (unsigned char) tbuf[i];
  	    feobp += c;
  	}
! #if !defined(WINNT) || defined(__CYGWIN__)
  	c = fbuf[0][fseekp - fbobp];
  	fseekp++;
  #else
***************
*** 1763,1769 ****
  	if (c == 0 || (c < 0 && fixio(SHIN, errno) == -1))
  	    return (-1);
      }
! #ifndef WINNT
      c = fbuf[(int) fseekp / BUFSIZE][(int) fseekp % BUFSIZE];
      fseekp++;
  #else
--- 1763,1769 ----
  	if (c == 0 || (c < 0 && fixio(SHIN, errno) == -1))
  	    return (-1);
      }
! #if !defined(WINNT) || defined(__CYGWIN__)
      c = fbuf[(int) fseekp / BUFSIZE][(int) fseekp % BUFSIZE];
      fseekp++;
  #else
*** tcsh-6.09.00/sh.proc.c.orig	Mon Oct 26 00:10:22 1998
--- tcsh-6.09.00/sh.proc.c	Sat May 20 12:29:12 2000
***************
*** 211,217 ****
      xprintf("Waiting...\n");
      flush();
  #endif /* JOBDEBUG */
! #ifndef WINNT
  # ifdef BSDJOBS
  #  ifdef BSDTIMES
  #   ifdef convex
--- 211,217 ----
      xprintf("Waiting...\n");
      flush();
  #endif /* JOBDEBUG */
! #if !defined(WINNT) || defined(__CYGWIN__)
  # ifdef BSDJOBS
  #  ifdef BSDTIMES
  #   ifdef convex
*** tcsh-6.09.00/sh.sem.c.orig	Wed Nov 25 03:17:38 1998
--- tcsh-6.09.00/sh.sem.c	Sat May 20 12:29:12 2000
***************
*** 41,47 ****
  
  #include "tc.h"
  #include "tw.h"
! #ifdef WINNT
  #include "nt.const.h"
  #endif /*WINNT*/
  
--- 41,47 ----
  
  #include "tc.h"
  #include "tw.h"
! #if defined(WINNT) && !defined(__CYGWIN__)
  #include "nt.const.h"
  #endif /*WINNT*/
  
***************
*** 116,122 ****
      if (t == 0) 
  	return;
  
! #ifdef WINNT
      {
          if ((varval(STRNTslowexec) == STRNULL) &&
              !t->t_dcdr && !t->t_dcar && !t->t_dflg && !didfds &&
--- 116,122 ----
      if (t == 0) 
  	return;
  
! #if defined(WINNT) && !defined(__CYGWIN__)
      {
          if ((varval(STRNTslowexec) == STRNULL) &&
              !t->t_dcdr && !t->t_dcar && !t->t_dflg && !didfds &&
*** tcsh-6.09.00/tc.alloc.c.orig	Tue Apr 20 16:48:50 1999
--- tcsh-6.09.00/tc.alloc.c	Sat May 20 12:29:12 2000
***************
*** 55,61 ****
  # define NO_SBRK
  #endif
  
! #ifdef WINNT
  # define malloc		fmalloc
  # define free		ffree
  # define calloc		fcalloc
--- 55,61 ----
  # define NO_SBRK
  #endif
  
! #if defined(WINNT) && !defined(__CYGWIN__)
  # define malloc		fmalloc
  # define free		ffree
  # define calloc		fcalloc
*** tcsh-6.09.00/tc.bind.c.orig	Wed Nov 25 03:17:40 1998
--- tcsh-6.09.00/tc.bind.c	Sat May 20 12:29:14 2000
***************
*** 304,310 ****
      case 'M':
      case 'X':
      case 'C':
! #ifdef WINNT
      case 'N':
  #endif /* WINNT */
  	if (s[1] != '-' || s[2] == '\0') {
--- 304,310 ----
      case 'M':
      case 'X':
      case 'C':
! #if defined(WINNT) && !defined(__CYGWIN__)
      case 'N':
  #endif /* WINNT */
  	if (s[1] != '-' || s[2] == '\0') {
***************
*** 356,362 ****
  #endif /* DSPMBYTE */
  	    *b = '\0';
  	    break;
! #ifdef WINNT
  	case 'N' : case 'n':	/* NT */
  		{
  			Char bnt;
--- 356,362 ----
  #endif /* DSPMBYTE */
  	    *b = '\0';
  	    break;
! #if defined(WINNT) && !defined(__CYGWIN__)
  	case 'N' : case 'n':	/* NT */
  		{
  			Char bnt;
*** tcsh-6.09.00/tc.decls.h.orig	Sun Feb  7 00:19:00 1999
--- tcsh-6.09.00/tc.decls.h	Sat May 20 12:29:14 2000
***************
*** 41,47 ****
   * tc.alloc.c
   */
  #ifndef SYSMALLOC
! #ifndef WINNT
  extern	void		  free		__P((ptr_t));
  extern	memalign_t	  malloc	__P((size_t));
  extern	memalign_t	  realloc	__P((ptr_t, size_t));
--- 41,47 ----
   * tc.alloc.c
   */
  #ifndef SYSMALLOC
! #if !defined(WINNT) || defined(__CYGWIN__)
  extern	void		  free		__P((ptr_t));
  extern	memalign_t	  malloc	__P((size_t));
  extern	memalign_t	  realloc	__P((ptr_t, size_t));
***************
*** 202,212 ****
--- 202,214 ----
  # define nice(a)	  xnice(a)
  #endif /* NEEDnice */
  
+ #ifndef __CYGWIN__
  #ifdef NEEDstrerror
  extern	char	 	 *xstrerror	__P((int));
  # undef strerror
  # define strerror(a) 	  xstrerror(a)
  #endif /* NEEDstrerror */
+ #endif /* Cygwin */
  
  #ifdef apollo
  extern	void		  doinlib	__P((Char **, struct command *));
***************
*** 272,278 ****
  extern	sigret_t	(*xsignal	__P((int, sigret_t (*)(int)))) ();
  # define signal(a, b)	  xsignal(a, b)
  #endif /* NEEDsignal */
! #if defined(_SEQUENT_) || ((SYSVREL > 3 || defined(_DGUX_SOURCE)) && defined(POSIXSIGS)) || (defined(_AIX) && defined(POSIXSIGS)) || defined(WINNT)
  extern	sigmask_t	  sigsetmask	__P((sigmask_t));
  # if !defined(DGUX) || (defined(DGUX) && defined(__ix86))
  extern	sigmask_t	  sigblock	__P((sigmask_t));
--- 274,280 ----
  extern	sigret_t	(*xsignal	__P((int, sigret_t (*)(int)))) ();
  # define signal(a, b)	  xsignal(a, b)
  #endif /* NEEDsignal */
! #if defined(_SEQUENT_) || ((SYSVREL > 3 || defined(_DGUX_SOURCE)) && defined(POSIXSIGS)) || (defined(_AIX) && defined(POSIXSIGS)) || (defined(WINNT) && !defined(__CYGWIN__))
  extern	sigmask_t	  sigsetmask	__P((sigmask_t));
  # if !defined(DGUX) || (defined(DGUX) && defined(__ix86))
  extern	sigmask_t	  sigblock	__P((sigmask_t));
*** tcsh-6.09.00/tc.func.c.orig	Sun Aug 15 06:24:14 1999
--- tcsh-6.09.00/tc.func.c	Sat May 20 12:29:14 2000
***************
*** 42,48 ****
  #include "ed.defns.h"		/* for the function names */
  #include "tw.h"
  #include "tc.h"
! #ifdef WINNT
  #include "nt.const.h"
  #endif /* WINNT */
  
--- 42,48 ----
  #include "ed.defns.h"		/* for the function names */
  #include "tw.h"
  #include "tc.h"
! #if defined(WINNT) && !defined(__CYGWIN__)
  #include "nt.const.h"
  #endif /* WINNT */
  
*** tcsh-6.09.00/tc.os.c.orig	Mon Oct 26 00:10:36 1998
--- tcsh-6.09.00/tc.os.c	Sat May 20 12:29:14 2000
***************
*** 865,871 ****
  #endif /* NEEDmemmove */
  
  
! #ifndef WINNT
  #ifdef tcgetpgrp
  int
  xtcgetpgrp(fd)
--- 865,871 ----
  #endif /* NEEDmemmove */
  
  
! #if !defined(WINNT) || defined(__CYGWIN__)
  #ifdef tcgetpgrp
  int
  xtcgetpgrp(fd)
***************
*** 985,990 ****
--- 985,991 ----
  #endif /* _SX */
  }
  
+ #ifndef _CYGWIN__
  #ifdef strerror
  char *
  xstrerror(i)
***************
*** 1001,1009 ****
      }
  }
  #endif /* strerror */
      
  #ifdef gethostname
! # if !defined(_MINIX) && !defined(__EMX__) && !defined(WINNT)
  #  include <sys/utsname.h>
  # endif /* !_MINIX && !__EMX__ && !WINNT */
  
--- 1002,1011 ----
      }
  }
  #endif /* strerror */
+ #endif
      
  #ifdef gethostname
! # if !defined(_MINIX) && !defined(__EMX__) && (!defined(WINNT) || defined(__CYGWIN__))
  #  include <sys/utsname.h>
  # endif /* !_MINIX && !__EMX__ && !WINNT */
  
***************
*** 1012,1018 ****
      char   *name;
      int     namlen;
  {
! # if !defined(_MINIX) && !defined(__EMX__) && !defined(WINNT)
      int     i, retval;
      struct utsname uts;
  
--- 1014,1020 ----
      char   *name;
      int     namlen;
  {
! # if !defined(_MINIX) && !defined(__EMX__) && (!defined(WINNT) || defined(__CYGWIN__))
      int     i, retval;
      struct utsname uts;
  
***************
*** 1164,1170 ****
  
  # else /* ! hp9000s500 */
  
! #  if (SYSVREL != 0 && !defined(d_fileno)) || defined(_VMS_POSIX) || defined(WINNT)
  #   define d_fileno d_ino
  #  endif
  
--- 1166,1172 ----
  
  # else /* ! hp9000s500 */
  
! #  if (SYSVREL != 0 && !defined(d_fileno)) || defined(_VMS_POSIX) || (defined(WINNT) && !defined(__CYGWIN__))
  #   define d_fileno d_ino
  #  endif
  
*** tcsh-6.09.00/tc.os.h.orig	Sun Feb  7 00:19:04 1999
--- tcsh-6.09.00/tc.os.h	Sat May 20 12:29:14 2000
***************
*** 37,43 ****
  #ifndef _h_tc_os
  #define _h_tc_os
  
! #ifndef WINNT
  #define NEEDstrerror		/* Too hard to find which systems have it */
  #endif /* WINNT */
  
--- 37,43 ----
  #ifndef _h_tc_os
  #define _h_tc_os
  
! #if !defined(WINNT) || defined(__CYGWIN__)
  #define NEEDstrerror		/* Too hard to find which systems have it */
  #endif /* WINNT */
  
***************
*** 233,239 ****
   *
   * From: scott@craycos.com (Scott Bolte)
   */
! #ifndef WINNT
  # ifdef F_SETFD
  #  define close_on_exec(fd, v) fcntl((fd), F_SETFD, v)
  # else /* !F_SETFD */
--- 233,239 ----
   *
   * From: scott@craycos.com (Scott Bolte)
   */
! #if !defined(WINNT) || defined(__CYGWIN__)
  # ifdef F_SETFD
  #  define close_on_exec(fd, v) fcntl((fd), F_SETFD, v)
  # else /* !F_SETFD */
***************
*** 502,508 ****
  #endif /* POSIX */
  
  
! #if !defined(SOLARIS2) && !defined(sinix) && !defined(BSD4_4) && !defined(WINNT)
  # if (SYSVREL > 0 && !defined(OREO) && !defined(sgi) && !defined(linux) && !defined(sinix) && !defined(_AIX) &&!defined(_UWIN)) || defined(NeXT)
  #  define NEEDgetcwd
  # endif /* (SYSVREL > 0 && !OREO && !sgi && !linux && !sinix && !_AIX && !_UWIN) || NeXT */
--- 502,508 ----
  #endif /* POSIX */
  
  
! #if !defined(SOLARIS2) && !defined(sinix) && !defined(BSD4_4) && (!defined(WINNT) || defined(__CYGWIN__))
  # if (SYSVREL > 0 && !defined(OREO) && !defined(sgi) && !defined(linux) && !defined(sinix) && !defined(_AIX) &&!defined(_UWIN)) || defined(NeXT)
  #  define NEEDgetcwd
  # endif /* (SYSVREL > 0 && !OREO && !sgi && !linux && !sinix && !_AIX && !_UWIN) || NeXT */
***************
*** 553,559 ****
  extern int qsort();
  #  endif /* SYSVREL == 0 && !__lucid */
  # else /* !SUNOS4 */
! #  ifndef WINNT
  #   ifndef hpux
  #    if __GNUC__ != 2
  extern int abort();
--- 553,559 ----
  extern int qsort();
  #  endif /* SYSVREL == 0 && !__lucid */
  # else /* !SUNOS4 */
! #  if !defined(WINNT) || defined(__CYGWIN__)
  #   ifndef hpux
  #    if __GNUC__ != 2
  extern int abort();
*** tcsh-6.09.00/tc.sig.h.orig	Thu Apr  9 02:57:38 1998
--- tcsh-6.09.00/tc.sig.h	Sat May 20 12:29:14 2000
***************
*** 38,44 ****
  #ifndef _h_tc_sig
  #define _h_tc_sig
  
! #if (SYSVREL > 0) || defined(BSD4_4) || defined(_MINIX) || defined(DGUX) || defined(WINNT)
  # include <signal.h>
  # ifndef SIGCHLD
  #  define SIGCHLD SIGCLD
--- 38,44 ----
  #ifndef _h_tc_sig
  #define _h_tc_sig
  
! #if (SYSVREL > 0) || defined(BSD4_4) || defined(_MINIX) || defined(DGUX) || (defined(WINNT) && !defined(__CYGWIN__))
  # include <signal.h>
  # ifndef SIGCHLD
  #  define SIGCHLD SIGCLD
***************
*** 148,154 ****
  # define	sigmask(s)	(1 << ((s)-1))
  # ifdef POSIXSIGS
  #  define 	sigpause(a)	(void) bsd_sigpause(a)
! #  ifdef WINNT
  #   undef signal
  #  endif /* WINNT */
  #  define 	signal(a, b)	bsd_signal(a, b)
--- 148,154 ----
  # define	sigmask(s)	(1 << ((s)-1))
  # ifdef POSIXSIGS
  #  define 	sigpause(a)	(void) bsd_sigpause(a)
! #  if defined(WINNT) && !defined(__CYGWIN__)
  #   undef signal
  #  endif /* WINNT */
  #  define 	signal(a, b)	bsd_signal(a, b)
*** tcsh-6.09.00/tc.wait.h.orig	Tue Oct 28 07:44:40 1997
--- tcsh-6.09.00/tc.wait.h	Sat May 20 12:29:14 2000
***************
*** 68,74 ****
  #  undef NEEDwait
  #  include "mi.wait.h"
  # else
! #  ifndef WINNT
  #   include <sys/wait.h>
  #  endif /* WINNT */
  # endif /* _MINIX */
--- 68,74 ----
  #  undef NEEDwait
  #  include "mi.wait.h"
  # else
! #  if !defined(WINNT) || defined(__CYGWIN__)
  #   include <sys/wait.h>
  #  endif /* WINNT */
  # endif /* _MINIX */
*** tcsh-6.09.00/tc.who.c.orig	Wed Apr  8 22:59:14 1998
--- tcsh-6.09.00/tc.who.c	Sat May 20 12:29:14 2000
***************
*** 59,65 ****
  # define utmp utmpx
  # define ut_time ut_xtime
  #else /* !HAVEUTMPX */
! # ifndef WINNT
  #  include <utmp.h>
  # endif /* WINNT */
  #endif /* HAVEUTMPX */
--- 59,65 ----
  # define utmp utmpx
  # define ut_time ut_xtime
  #else /* !HAVEUTMPX */
! # if !defined(WINNT) || defined(__CYGWIN__)
  #  include <utmp.h>
  # endif /* WINNT */
  #endif /* HAVEUTMPX */
***************
*** 172,178 ****
  #if defined(UTHOST) && defined(_SEQUENT_)
      char   *host, *ut_find_host();
  #endif
! #ifdef WINNT
      static int ncbs_posted = 0;
      USE(utmp);
      USE(utmpfd);
--- 172,178 ----
  #if defined(UTHOST) && defined(_SEQUENT_)
      char   *host, *ut_find_host();
  #endif
! #if defined(WINNT) && !defined(__CYGWIN__)
      static int ncbs_posted = 0;
      USE(utmp);
      USE(utmpfd);
***************
*** 205,211 ****
  	interval = 0;
  	
      (void) time(&t);
! #ifdef WINNT
  	/*
  	 * Since NCB_ASTATs take time, start em async at least 90 secs
  	 * before we are due -amol 6/5/97
--- 205,211 ----
  	interval = 0;
  	
      (void) time(&t);
! #if defined(WINNT) && !defined(__CYGWIN__)
  	/*
  	 * Since NCB_ASTATs take time, start em async at least 90 secs
  	 * before we are due -amol 6/5/97
***************
*** 227,233 ****
  	return;			/* not long enough yet... */
      }
      watch_period = t;
! #ifdef WINNT
      ncbs_posted = 0;
  #else /* !WINNT */
  
--- 227,233 ----
  	return;			/* not long enough yet... */
      }
      watch_period = t;
! #if defined(WINNT) && !defined(__CYGWIN__)
      ncbs_posted = 0;
  #else /* !WINNT */
  
***************
*** 622,628 ****
  }
  # endif /* UTHOST */
  
! #ifdef WINNT
  void add_to_who_list(name, mach_nm)
      char *name;
      char *mach_nm;
--- 622,628 ----
  }
  # endif /* UTHOST */
  
! #if defined(WINNT) && !defined(__CYGWIN__)
  void add_to_who_list(name, mach_nm)
      char *name;
      char *mach_nm;
*** tcsh-6.09.00/tw.init.c.orig	Mon Oct 26 00:10:50 1998
--- tcsh-6.09.00/tw.init.c	Sat May 20 12:29:14 2000
***************
*** 290,296 ****
      for (bptr = bfunc; bptr < &bfunc[nbfunc]; bptr++)
  	if (bptr->bname)
  	    tw_cmd_add(str2short(bptr->bname));
! #ifdef WINNT
      for (bptr = nt_bfunc; bptr < &nt_bfunc[nt_nbfunc]; bptr++)
  	if (bptr->bname)
  	    tw_cmd_add(str2short(bptr->bname));
--- 290,296 ----
      for (bptr = bfunc; bptr < &bfunc[nbfunc]; bptr++)
  	if (bptr->bname)
  	    tw_cmd_add(str2short(bptr->bname));
! #if defined(WINNT) && !defined(__CYGWIN__)
      for (bptr = nt_bfunc; bptr < &nt_bfunc[nt_nbfunc]; bptr++)
  	if (bptr->bname)
  	    tw_cmd_add(str2short(bptr->bname));
***************
*** 634,640 ****
  {
      USE(pat);
      SETDIR(dfd)
! #if !defined(_VMS_POSIX) && !defined(WINNT)
      (void) setpwent();	/* Open passwd file */
  #endif /* !_VMS_POSIX && !WINNT */
  } /* end tw_logname_start */
--- 634,640 ----
  {
      USE(pat);
      SETDIR(dfd)
! #if !defined(_VMS_POSIX) && (!defined(WINNT) || defined(__CYGWIN__))
      (void) setpwent();	/* Open passwd file */
  #endif /* !_VMS_POSIX && !WINNT */
  } /* end tw_logname_start */
***************
*** 660,666 ****
      USE(flags);
      USE(dir);
      TW_HOLD();
! #if !defined(_VMS_POSIX) && !defined(WINNT)
      /* ISC does not declare getpwent()? */
      pw = (struct passwd *) getpwent();
  #else /* _VMS_POSIX || WINNT */
--- 660,666 ----
      USE(flags);
      USE(dir);
      TW_HOLD();
! #if !defined(_VMS_POSIX) && (!defined(WINNT) || defined(__CYGWIN__))
      /* ISC does not declare getpwent()? */
      pw = (struct passwd *) getpwent();
  #else /* _VMS_POSIX || WINNT */
***************
*** 688,694 ****
  #ifdef YPBUGS
      fix_yp_bugs();
  #endif
! #if !defined(_VMS_POSIX) && !defined(WINNT)
     (void) endpwent();
  #endif /* !_VMS_POSIX && !WINNT */
  } /* end tw_logname_end */
--- 688,694 ----
  #ifdef YPBUGS
      fix_yp_bugs();
  #endif
! #if !defined(_VMS_POSIX) && (!defined(WINNT) || defined(__CYGWIN__))
     (void) endpwent();
  #endif /* !_VMS_POSIX && !WINNT */
  } /* end tw_logname_end */
***************
*** 705,711 ****
  {
      USE(pat);
      SETDIR(dfd)
! #if !defined(_VMS_POSIX) && !defined(_OSD_POSIX) && !defined(WINNT)
      (void) setgrent();	/* Open group file */
  #endif /* !_VMS_POSIX && !_OSD_POSIX && !WINNT */
  } /* end tw_grpname_start */
--- 705,711 ----
  {
      USE(pat);
      SETDIR(dfd)
! #if !defined(_VMS_POSIX) && !defined(_OSD_POSIX) && (!defined(WINNT) || defined(__CYGWIN__))
      (void) setgrent();	/* Open group file */
  #endif /* !_VMS_POSIX && !_OSD_POSIX && !WINNT */
  } /* end tw_grpname_start */
***************
*** 731,737 ****
      USE(flags);
      USE(dir);
      TW_HOLD();
! #if !defined(_VMS_POSIX) && !defined(_OSD_POSIX) && !defined(WINNT)
      gr = (struct group *) getgrent();
  #else /* _VMS_POSIX || _OSD_POSIX || WINNT */
      gr = NULL;
--- 731,737 ----
      USE(flags);
      USE(dir);
      TW_HOLD();
! #if !defined(_VMS_POSIX) && !defined(_OSD_POSIX) && (!defined(WINNT) || defined(__CYGWIN__))
      gr = (struct group *) getgrent();
  #else /* _VMS_POSIX || _OSD_POSIX || WINNT */
      gr = NULL;
***************
*** 758,764 ****
  #ifdef YPBUGS
      fix_yp_bugs();
  #endif
! #if !defined(_VMS_POSIX) && !defined(_OSD_POSIX) && !defined(WINNT)
     (void) endgrent();
  #endif /* !_VMS_POSIX && !_OSD_POSIX && !WINNT */
  } /* end tw_grpname_end */
--- 758,764 ----
  #ifdef YPBUGS
      fix_yp_bugs();
  #endif
! #if !defined(_VMS_POSIX) && !defined(_OSD_POSIX) && (!defined(WINNT) || defined(__CYGWIN__))
     (void) endgrent();
  #endif /* !_VMS_POSIX && !_OSD_POSIX && !WINNT */
  } /* end tw_grpname_end */
*** tcsh-6.09.00/tw.parse.c.orig	Mon Oct 26 00:10:52 1998
--- tcsh-6.09.00/tw.parse.c	Sat May 20 12:29:14 2000
***************
*** 45,51 ****
  #include "ed.h"
  #include "tc.h"
  
! #ifdef WINNT
  #include "nt.const.h"
  #endif /* WINNT */
  #define EVEN(x) (((x) & 1) != 1)
--- 45,51 ----
  #include "ed.h"
  #include "tc.h"
  
! #if defined(WINNT) && !defined(__CYGWIN__)
  #include "nt.const.h"
  #endif /* WINNT */
  #define EVEN(x) (((x) & 1) != 1)
***************
*** 801,807 ****
      Char MCH1, MCH2;
      register Char *x, *ent;
      register int len = 0;
! #ifdef WINNT
      struct varent *vp;
      int igncase;
      igncase = (vp = adrof(STRcomplete)) != NULL &&
--- 801,807 ----
      Char MCH1, MCH2;
      register Char *x, *ent;
      register int len = 0;
! #if defined(WINNT) && !defined(__CYGWIN__)
      struct varent *vp;
      int igncase;
      igncase = (vp = adrof(STRcomplete)) != NULL &&
***************
*** 813,819 ****
  	return (0);
      }
      if (!enhanced
! #ifdef WINNT
  	&& !igncase
  #endif /* WINNT */
      ) {
--- 813,819 ----
  	return (0);
      }
      if (!enhanced
! #if defined(WINNT) && !defined(__CYGWIN__)
  	&& !igncase
  #endif /* WINNT */
      ) {
***************
*** 969,975 ****
  	case RECOGNIZE_ALL:
  	case RECOGNIZE_SCROLL:
  
! #ifdef WINNT
   	    igncase = (vp = adrof(STRcomplete)) != NULL && 
  		Strcmp(*(vp->vec), STRigncase) == 0;
  #endif /* WINNT */
--- 969,975 ----
  	case RECOGNIZE_ALL:
  	case RECOGNIZE_SCROLL:
  
! #if defined(WINNT) && !defined(__CYGWIN__)
   	    igncase = (vp = adrof(STRcomplete)) != NULL && 
  		Strcmp(*(vp->vec), STRigncase) == 0;
  #endif /* WINNT */
