*** 	Wed Dec 31 14:00:00 1969
*** djgpp/Makefile	Wed Dec 31 14:00:00 1969
--- djgpp/Makefile	Mon Feb 11 20:14:23 2002
***************
*** 0 ****
--- 1,121 ----
+ CC			= gcc
+ 
+ TMP_DIR			= ./build
+ 
+ TCPIP_LIB		= /watts32-2.1r5/lib/libwatt.a
+ TCL_LIBRARY		= ../library
+ 
+ TOP_DIR			= ..
+ GENERIC_DIR		= $(TOP_DIR)/generic
+ COMPAT_DIR		= $(TOP_DIR)/compat
+ TOOL_DIR		= $(TOP_DIR)/tools
+ UNIX_DIR		= $(TOP_DIR)/unix
+ TCL_LIB_FILE		= libtcl.a
+ 
+ CFLAGS		= -DHAVE_UNISTD_H -DHAVE_TM_ZONE -DNO_FSTATFS -DNO_FD_SET -DNO_UNION_WAIT \
+ 		  -DTCL_DEFAULT_ENCODING=\"cp437\" -DTCL_LIBRARY=\"$(TCL_LIBRARY)\" \
+ 		  -DNO_REALPATH -DTCL_PACKAGE_PATH=\"\" -I $(GENERIC_DIR) -I $(UNIX_DIR)
+ 
+ 
+ GENERIC_OBJs = \
+ 	$(TMP_DIR)/regcomp.o \
+ 	$(TMP_DIR)/regexec.o \
+ 	$(TMP_DIR)/regfree.o \
+ 	$(TMP_DIR)/regerror.o \
+ 	$(TMP_DIR)/tclAlloc.o \
+ 	$(TMP_DIR)/tclAsync.o \
+ 	$(TMP_DIR)/tclBasic.o \
+ 	$(TMP_DIR)/tclBinary.o \
+ 	$(TMP_DIR)/tclCkalloc.o \
+ 	$(TMP_DIR)/tclClock.o \
+ 	$(TMP_DIR)/tclCmdAH.o \
+ 	$(TMP_DIR)/tclCmdIL.o \
+ 	$(TMP_DIR)/tclCmdMZ.o \
+ 	$(TMP_DIR)/tclCompCmds.o \
+ 	$(TMP_DIR)/tclCompExpr.o \
+ 	$(TMP_DIR)/tclCompile.o \
+ 	$(TMP_DIR)/tclDate.o \
+ 	$(TMP_DIR)/tclEncoding.o \
+ 	$(TMP_DIR)/tclEnv.o \
+ 	$(TMP_DIR)/tclEvent.o \
+ 	$(TMP_DIR)/tclExecute.o \
+ 	$(TMP_DIR)/tclFCmd.o \
+ 	$(TMP_DIR)/tclFileName.o \
+ 	$(TMP_DIR)/tclGet.o \
+ 	$(TMP_DIR)/tclHash.o \
+ 	$(TMP_DIR)/tclHistory.o \
+ 	$(TMP_DIR)/tclIndexObj.o \
+ 	$(TMP_DIR)/tclInterp.o \
+ 	$(TMP_DIR)/tclIO.o \
+ 	$(TMP_DIR)/tclIOCmd.o \
+ 	$(TMP_DIR)/tclIOGT.o \
+ 	$(TMP_DIR)/tclIOSock.o \
+ 	$(TMP_DIR)/tclIOUtil.o \
+ 	$(TMP_DIR)/tclLink.o \
+ 	$(TMP_DIR)/tclListObj.o \
+ 	$(TMP_DIR)/tclLiteral.o \
+ 	$(TMP_DIR)/tclLoad.o \
+ 	$(TMP_DIR)/tclLoadNone.o \
+ 	$(TMP_DIR)/tclMain.o \
+ 	$(TMP_DIR)/tclNamesp.o \
+ 	$(TMP_DIR)/tclNotify.o \
+ 	$(TMP_DIR)/tclObj.o \
+         $(TMP_DIR)/tclPanic.o \
+         $(TMP_DIR)/tclParse.o \
+         $(TMP_DIR)/tclParseExpr.o \
+ 	$(TMP_DIR)/tclPipe.o \
+ 	$(TMP_DIR)/tclPkg.o \
+ 	$(TMP_DIR)/tclPosixStr.o \
+ 	$(TMP_DIR)/tclPreserve.o \
+ 	$(TMP_DIR)/tclProc.o \
+ 	$(TMP_DIR)/tclRegexp.o \
+ 	$(TMP_DIR)/tclResolve.o \
+ 	$(TMP_DIR)/tclResult.o \
+ 	$(TMP_DIR)/tclScan.o \
+ 	$(TMP_DIR)/tclStubInit.o \
+ 	$(TMP_DIR)/tclStubLib.o \
+ 	$(TMP_DIR)/tclStringObj.o \
+ 	$(TMP_DIR)/tclTest.o \
+ 	$(TMP_DIR)/tclTestObj.o \
+ 	$(TMP_DIR)/tclTestProcBodyObj.o \
+ 	$(TMP_DIR)/tclThread.o \
+ 	$(TMP_DIR)/tclThreadJoin.o \
+ 	$(TMP_DIR)/tclTimer.o \
+ 	$(TMP_DIR)/tclUtf.o \
+ 	$(TMP_DIR)/tclUtil.o \
+ 	$(TMP_DIR)/tclUniData.o \
+ 	$(TMP_DIR)/tclVar.o
+ 
+ UNIX_OBJs = \
+ 	$(TMP_DIR)/tclAppInit.o \
+ 	$(TMP_DIR)/tclMtherr.o \
+ 	$(TMP_DIR)/tclUnixChan.o \
+ 	$(TMP_DIR)/tclUnixEvent.o \
+ 	$(TMP_DIR)/tclUnixFCmd.o \
+ 	$(TMP_DIR)/tclUnixFile.o \
+ 	$(TMP_DIR)/tclUnixNotfy.o \
+ 	$(TMP_DIR)/tclUnixPipe.o \
+ 	$(TMP_DIR)/tclUnixSock.o \
+ 	$(TMP_DIR)/tclUnixTest.o \
+ 	$(TMP_DIR)/tclUnixThrd.o \
+ 	$(TMP_DIR)/tclUnixTime.o \
+ 	$(TMP_DIR)/tclUnixInit.o
+ 
+ 
+ $(TMP_DIR)/%.o : $(GENERIC_DIR)/%.c
+ 	$(CC) -c $(CFLAGS) $< -o $@
+ 
+ $(TMP_DIR)/%.o : $(UNIX_DIR)/%.c
+ 	$(CC) -c $(CFLAGS) $< -o $@
+ 
+ all: binaries
+ 
+ binaries: ${TCL_LIB_FILE} tclsh.exe
+ 
+ $(TCL_LIB_FILE) : $(GENERIC_OBJs) $(UNIX_OBJs)
+ 	ar rvs $@ $^
+ 
+ tclsh.exe : $(TCL_LIB_FILE) 
+ 	gcc $^ $(TCPIP_LIB) -o $@
+ 
+ 

*** unix/tclMtherr.c	23 Nov 2001 01:40:13 -0000	1.4
--- unix/tclMtherr.c	12 Feb 2002 05:58:24 -0000
***************
*** 35,43 ****
--- 35,45 ----
   */
  
  #ifndef NEED_MATHERR
+ #ifndef DJGPP
  struct exception {
      int type;
  };
+ #endif
  #define DOMAIN 0
  #define SING 0
  #endif

*** unix/tclUnixFCmd.c	25 Jan 2002 20:40:56 -0000	1.15
--- unix/tclUnixFCmd.c	12 Feb 2002 05:58:29 -0000
***************
*** 349,354 ****
--- 349,355 ----
      }
  
      switch ((int) (srcStatBuf.st_mode & S_IFMT)) {
+ #ifndef DJGPP
          case S_IFLNK: {
  	    char link[MAXPATHLEN];
  	    int length;
***************
*** 363,368 ****
--- 364,370 ----
  	    }
  	    break;
  	}
+ #endif
          case S_IFBLK:
          case S_IFCHR: {
  	    if (mknod(dst, srcStatBuf.st_mode,		/* INTL: Native. */

*** unix/tclUnixFile.c	8 Feb 2002 02:52:54 -0000	1.16
--- unix/tclUnixFile.c	12 Feb 2002 05:58:32 -0000
***************
*** 645,650 ****
--- 645,651 ----
      Tcl_DString *linkPtr;	/* Uninitialized or free DString filled
  				 * with contents of link (UTF-8). */
  {
+ #ifndef DJGPP
      char link[MAXPATHLEN];
      int length;
      CONST char *native;
***************
*** 660,665 ****
--- 661,669 ----
  
      Tcl_ExternalToUtfDString(NULL, link, length, linkPtr);
      return Tcl_DStringValue(linkPtr);
+ #else
+ 	return NULL;
+ #endif
  }
  
  /*

*** unix/tclUnixInit.c	8 Feb 2002 02:52:54 -0000	1.30
--- unix/tclUnixInit.c	12 Feb 2002 05:58:35 -0000
***************
*** 682,688 ****
--- 682,692 ----
  
      Tcl_SetVar(interp, "tclDefaultLibrary", defaultLibraryDir, TCL_GLOBAL_ONLY);
      Tcl_SetVar(interp, "tcl_pkgPath", pkgPath, TCL_GLOBAL_ONLY);
+ #ifdef DJGPP
+     Tcl_SetVar2(interp, "tcl_platform", "platform", "dos", TCL_GLOBAL_ONLY);
+ #else
      Tcl_SetVar2(interp, "tcl_platform", "platform", "unix", TCL_GLOBAL_ONLY);
+ #endif
      unameOK = 0;
  #ifndef NO_UNAME
      if (uname(&name) >= 0) {

*** unix/tclUnixPort.h	8 Feb 2002 09:33:03 -0000	1.19
--- unix/tclUnixPort.h	12 Feb 2002 05:58:38 -0000
***************
*** 456,462 ****
--- 456,466 ----
   * The default platform eol translation on Unix is TCL_TRANSLATE_LF.
   */
  
+ #ifdef DJGPP
+ #define	TCL_PLATFORM_TRANSLATION	TCL_TRANSLATE_CRLF
+ #else
  #define	TCL_PLATFORM_TRANSLATION	TCL_TRANSLATE_LF
+ #endif
  
  /*
   * The following macros have trivial definitions, allowing generic code to 

