home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / bsd / 9064 < prev    next >
Encoding:
Text File  |  1992-11-18  |  11.3 KB  |  382 lines

  1. Xref: sparky comp.unix.bsd:9064 comp.lang.tcl:1882 alt.sources:2573
  2. Newsgroups: comp.unix.bsd,comp.lang.tcl,alt.sources
  3. Path: sparky!uunet!zaphod.mps.ohio-state.edu!menudo.uh.edu!sugar!karl
  4. From: karl@NeoSoft.com (Karl Lehenbauer)
  5. Subject: Patches to get Tcl 6.4 & Tk 2.3 up under 386BSD 0.1
  6. Organization: NeoSoft Communications Services -- (713) 684-5900
  7. Date: Thu, 19 Nov 1992 04:55:22 GMT
  8. Message-ID: <Bxy5oG.AnI@NeoSoft.com>
  9. Lines: 371
  10.  
  11. Here are the patches to get Tcl 6.4, Extended Tcl 6.4c and the
  12. Tk X-windows scripting environment working on 386BSD.
  13. Go to sprite.berkeley.edu and get tcl6.4.tar.Z and
  14. tclX6.4c.tar.Z.  Also get tk2.3.tar.Z if you have X-windows.
  15. Create a tcl6.4 directory, cd to it, and unpack the two (or three)
  16. tar archives.   You should get tcl6.4 and tclX6.4c (and tk2.3) directories.
  17.  
  18. Save off this patch, then do a "patch -p0 <patchfile".  Then cd to
  19. the tcl6.4 subdirectory and do a "csh config" and a "make", then 
  20. cd to tclX6.4c and do a make.
  21.  
  22. The Tk X-windows toolkit extensions for Tcl compile up without
  23. a peep.  No patches necessary.
  24.  
  25. Unpack tk2.3 in the top-level tcl6.4 directory if you have X, then
  26. cd to tclX6.4c, edit Config.mk to comment in the line that
  27. reads TCL_TK_SHELL, and do a "make".  It should produce "wish", the 
  28. windowing shell, linked in with Tcl and Extended Tcl.
  29.  
  30. "make install" in tclX6.4c will install Extended Tcl.  Copy 
  31. tcl6.4/library and subdirectories into /usr/local/lib/tcl,
  32. and tk2.3/library and subdirectories into /usr/local/lib/tk.
  33. Check out the voluminous docs included the the release.
  34.  
  35. Tcl fails a couple of the standard tests, and quite a few of the
  36. extended tests, so there are definitely problems.  But this is enough
  37. to get you up and running with a great scripting environment for X.
  38.  
  39. *** tcl6.4/tclEnv.c.orig    Wed Nov 18 20:08:13 1992
  40. --- tcl6.4/tclEnv.c    Wed Nov 18 20:16:18 1992
  41. ***************
  42. *** 56,63 ****
  43.                   Tcl_Interp *interp, char *name1, char *name2,
  44.                   int flags));
  45.   static int        FindVariable _ANSI_ARGS_((char *name, int *lengthPtr));
  46. ! void            setenv _ANSI_ARGS_((char *name, char *value));
  47. ! void            unsetenv _ANSI_ARGS_((char *name));
  48.   
  49.   /*
  50.    *----------------------------------------------------------------------
  51. --- 56,62 ----
  52.                   Tcl_Interp *interp, char *name1, char *name2,
  53.                   int flags));
  54.   static int        FindVariable _ANSI_ARGS_((char *name, int *lengthPtr));
  55. ! void            unsetenv _ANSI_ARGS_((const char *name));
  56.   
  57.   /*
  58.    *----------------------------------------------------------------------
  59. ***************
  60. *** 197,207 ****
  61.    *----------------------------------------------------------------------
  62.    */
  63.   
  64. ! void
  65. ! setenv(name, value)
  66. !     char *name;            /* Name of variable whose value is to be
  67. !                  * set. */
  68. !     char *value;        /* New value for variable. */
  69.   {
  70.       int index, length, nameLength;
  71.       char *p;
  72. --- 196,203 ----
  73.    *----------------------------------------------------------------------
  74.    */
  75.   
  76. ! int
  77. ! setenv(const char *name, const char *value, int overwrite)
  78.   {
  79.       int index, length, nameLength;
  80.       char *p;
  81. ***************
  82. *** 217,223 ****
  83.        * the name exists, free its old entry.
  84.        */
  85.   
  86. !     index = FindVariable(name, &length);
  87.       if (index == -1) {
  88.       if ((length+2) > environSize) {
  89.           char **newEnviron;
  90. --- 213,219 ----
  91.        * the name exists, free its old entry.
  92.        */
  93.   
  94. !     index = FindVariable((char *)name, &length);
  95.       if (index == -1) {
  96.       if ((length+2) > environSize) {
  97.           char **newEnviron;
  98. ***************
  99. *** 254,260 ****
  100.        */
  101.   
  102.       for (eiPtr= firstInterpPtr; eiPtr != NULL; eiPtr = eiPtr->nextPtr) {
  103. !     (void) Tcl_SetVar2(eiPtr->interp, "env", name, p+1, TCL_GLOBAL_ONLY);
  104.       }
  105.   }
  106.   
  107. --- 250,256 ----
  108.        */
  109.   
  110.       for (eiPtr= firstInterpPtr; eiPtr != NULL; eiPtr = eiPtr->nextPtr) {
  111. !     (void) Tcl_SetVar2(eiPtr->interp, "env", (char *)name, p+1, TCL_GLOBAL_ONLY);
  112.       }
  113.   }
  114.   
  115. ***************
  116. *** 277,283 ****
  117.   
  118.   void
  119.   unsetenv(name)
  120. !     char *name;            /* Name of variable to remove. */
  121.   {
  122.       int index, dummy;
  123.       char **envPtr;
  124. --- 273,279 ----
  125.   
  126.   void
  127.   unsetenv(name)
  128. !     const char *name;            /* Name of variable to remove. */
  129.   {
  130.       int index, dummy;
  131.       char **envPtr;
  132. ***************
  133. *** 381,387 ****
  134.        */
  135.   
  136.       if (flags & TCL_TRACE_WRITES) {
  137. !     setenv(name2, Tcl_GetVar2(interp, "env", name2, TCL_GLOBAL_ONLY));
  138.       }
  139.   
  140.       if (flags & TCL_TRACE_UNSETS) {
  141. --- 377,383 ----
  142.        */
  143.   
  144.       if (flags & TCL_TRACE_WRITES) {
  145. !     setenv(name2, Tcl_GetVar2(interp, "env", name2, TCL_GLOBAL_ONLY), 1);
  146.       }
  147.   
  148.       if (flags & TCL_TRACE_UNSETS) {
  149. *** tclX6.4c/Config.mk.orig    Wed Nov 18 22:25:39 1992
  150. --- tclX6.4c/Config.mk    Wed Nov 18 20:23:16 1992
  151. ***************
  152. *** 25,31 ****
  153.   # them to us (tcl-project@neosoft.com).  At the end of this file is a
  154.   # description of all the flags that can be set in the config file.
  155.   #
  156. ! TCL_CONFIG_FILE=scoodt2.0
  157.   
  158.   #==============================================================================
  159.   #
  160. --- 25,31 ----
  161.   # them to us (tcl-project@neosoft.com).  At the end of this file is a
  162.   # description of all the flags that can be set in the config file.
  163.   #
  164. ! TCL_CONFIG_FILE=386bsd
  165.   
  166.   #==============================================================================
  167.   #
  168. *** /dev/null    Wed Nov 18 21:20:01 1992
  169. --- tclX6.4c/config/386bsd    Wed Nov 18 22:23:25 1992
  170. ***************
  171. *** 0 ****
  172. --- 1,14 ----
  173. + #------------------------------------------------------------------------------
  174. + # 386BSD
  175. + #------------------------------------------------------------------------------
  176. + #------------------------------------------------------------------------------
  177. + #
  178. + SYS_DEP_FLAGS=-DTCL_HAVE_SETLINEBUF -DTCL_32_BIT_RANDOM -DTCL_POSIX_SIG -DTCL_TM_GMTOFF -DTCL_IEEE_FP_MATH
  179. + LIBS=-lm
  180. + RANLIB_CMD=ranlib
  181. + MCS_CMD=true
  182. + SUPPORT_FLAGS=-DTCL_HAS_TM_ZONE
  183. + TCL_TK_LIBS= -lX11 -lm
  184. + TCL_MAN_SEPARATOR=
  185. *** tclX6.4c/Makefile.orig    Wed Nov 18 20:26:06 1992
  186. --- tclX6.4c/Makefile    Wed Nov 18 20:30:52 1992
  187. ***************
  188. *** 19,26 ****
  189.   #------------------------------------------------------------------------------
  190.   #
  191.   
  192. ! include Config.mk
  193. ! include config/$(TCL_CONFIG_FILE)
  194.   SHELL=/bin/sh
  195.   
  196.   #------------------------------------------------------------------------------
  197. --- 19,26 ----
  198.   #------------------------------------------------------------------------------
  199.   #
  200.   
  201. ! .include "Config.mk"
  202. ! .include "config/$(TCL_CONFIG_FILE)"
  203.   SHELL=/bin/sh
  204.   
  205.   #------------------------------------------------------------------------------
  206. ***************
  207. *** 45,54 ****
  208.   tcl: TCLX_MAKES
  209.   
  210.   TCLX_MAKES: libtcl.a
  211. !     cd ucbsrc;    $(MAKE) -$(MAKEFLAGS) all
  212. !     cd osSupport; $(MAKE) -$(MAKEFLAGS) all
  213. !     cd tclsrc;    $(MAKE) -$(MAKEFLAGS) all
  214. !     cd src;       $(MAKE) -$(MAKEFLAGS) all
  215.   
  216.   
  217.   # Copy the UCB libtcl.a file from where it was built.  Force the other
  218. --- 45,54 ----
  219.   tcl: TCLX_MAKES
  220.   
  221.   TCLX_MAKES: libtcl.a
  222. !     cd ucbsrc;    $(MAKE) $(MAKEFLAGS) all
  223. !     cd osSupport; $(MAKE) $(MAKEFLAGS) all
  224. !     cd tclsrc;    $(MAKE) $(MAKEFLAGS) all
  225. !     cd src;       $(MAKE) $(MAKEFLAGS) all
  226.   
  227.   
  228.   # Copy the UCB libtcl.a file from where it was built.  Force the other
  229. *** tclX6.4c/osSupport/Makefile.orig    Wed Nov 18 20:32:11 1992
  230. --- tclX6.4c/osSupport/Makefile    Wed Nov 18 20:33:24 1992
  231. ***************
  232. *** 16,23 ****
  233.   #------------------------------------------------------------------------------
  234.   #
  235.   
  236. ! include ../Config.mk
  237. ! include ../config/$(TCL_CONFIG_FILE)
  238.   SHELL=/bin/sh
  239.   
  240.   #------------------------------------------------------------------------------
  241. --- 16,23 ----
  242.   #------------------------------------------------------------------------------
  243.   #
  244.   
  245. ! .include "../Config.mk"
  246. ! .include "../config/$(TCL_CONFIG_FILE)"
  247.   SHELL=/bin/sh
  248.   
  249.   #------------------------------------------------------------------------------
  250. ***************
  251. *** 30,36 ****
  252.   all: made.tmp
  253.   
  254.   made.tmp: $(SUPPORT_OBJS)
  255. !     $(AR) cr ../libtcl.a $(SUPPORT_OBJS)
  256.       touch made.tmp
  257.   
  258.   #------------------------------------------------------------------------------
  259. --- 30,36 ----
  260.   all: made.tmp
  261.   
  262.   made.tmp: $(SUPPORT_OBJS)
  263. !     -$(AR) cr ../libtcl.a $(SUPPORT_OBJS)
  264.       touch made.tmp
  265.   
  266.   #------------------------------------------------------------------------------
  267. *** tclX6.4c/src/Makefile.orig    Wed Nov 18 20:34:07 1992
  268. --- tclX6.4c/src/Makefile    Wed Nov 18 20:34:13 1992
  269. ***************
  270. *** 19,26 ****
  271.   #------------------------------------------------------------------------------
  272.   #
  273.   
  274. ! include ../Config.mk
  275. ! include ../config/$(TCL_CONFIG_FILE)
  276.   SHELL=/bin/sh
  277.   
  278.   #------------------------------------------------------------------------------
  279. --- 19,26 ----
  280.   #------------------------------------------------------------------------------
  281.   #
  282.   
  283. ! .include "../Config.mk"
  284. ! .include "../config/$(TCL_CONFIG_FILE)"
  285.   SHELL=/bin/sh
  286.   
  287.   #------------------------------------------------------------------------------
  288. *** tclX6.4c/src/tclXfcntl.c.orig    Wed Nov 18 20:41:39 1992
  289. --- tclX6.4c/src/tclXfcntl.c    Wed Nov 18 20:48:51 1992
  290. ***************
  291. *** 201,207 ****
  292. --- 201,218 ----
  293.        */
  294.   
  295.   #ifdef _IONBF
  296. + #  ifdef __SNBF
  297.       if (otherAttr & ATTR_NOBUF) {
  298. +         interp->result = (filePtr->f->_flags & __SNBF) ? "1" : "0";
  299. +         return TCL_OK;
  300. +     }
  301. +     if (otherAttr & ATTR_LINEBUF) {
  302. +         interp->result = (filePtr->f->_flags & __SLBF) ? "1" : "0";
  303. +         return TCL_OK;
  304. +     }
  305. + #  else
  306. +     if (otherAttr & ATTR_NOBUF) {
  307.           interp->result = (filePtr->f->_flag & _IONBF) ? "1" : "0";
  308.           return TCL_OK;
  309.       }
  310. ***************
  311. *** 209,214 ****
  312. --- 220,226 ----
  313.           interp->result = (filePtr->f->_flag & _IOLBF) ? "1" : "0";
  314.           return TCL_OK;
  315.       }
  316. + #  endif
  317.   #else
  318.       if (otherAttr & ATTR_NOBUF) {
  319.           interp->result = (filePtr->f->_flags & _SNBF) ? "1" : "0";
  320. *** tclX6.4c/src/tclXsignal.c.orig    Wed Nov 18 21:14:25 1992
  321. --- tclX6.4c/src/tclXsignal.c    Wed Nov 18 21:14:34 1992
  322. ***************
  323. *** 298,303 ****
  324. --- 298,306 ----
  325.   {
  326.   #ifdef TCL_POSIX_SIG
  327.       struct sigaction currentState;
  328. + #  ifndef SIG_ERR
  329. + #    define SIG_ERR (void(*)())-1
  330. + #  endif
  331.   
  332.       if (sigaction (signalNum, NULL, ¤tState) < 0)
  333.           return SIG_ERR;
  334. *** tclX6.4c/tclsrc/Makefile.orig    Wed Nov 18 20:34:26 1992
  335. --- tclX6.4c/tclsrc/Makefile    Wed Nov 18 20:34:48 1992
  336. ***************
  337. *** 17,24 ****
  338.   #------------------------------------------------------------------------------
  339.   #
  340.   
  341. ! include ../Config.mk
  342. ! include ../config/$(TCL_CONFIG_FILE)
  343.   SHELL=/bin/sh
  344.   
  345.   #------------------------------------------------------------------------------
  346. --- 17,24 ----
  347.   #------------------------------------------------------------------------------
  348.   #
  349.   
  350. ! .include "../Config.mk"
  351. ! .include "../config/$(TCL_CONFIG_FILE)"
  352.   SHELL=/bin/sh
  353.   
  354.   #------------------------------------------------------------------------------
  355. *** tclX6.4c/ucbsrc/Makefile.orig    Wed Nov 18 20:29:51 1992
  356. --- tclX6.4c/ucbsrc/Makefile    Wed Nov 18 20:30:14 1992
  357. ***************
  358. *** 18,25 ****
  359.   #
  360.   
  361.   
  362. ! include ../Config.mk
  363. ! include ../config/$(TCL_CONFIG_FILE)
  364.   SHELL=/bin/sh
  365.   
  366.   #------------------------------------------------------------------------------
  367. --- 18,25 ----
  368.   #
  369.   
  370.   
  371. ! .include "../Config.mk"
  372. ! .include "../config/$(TCL_CONFIG_FILE)"
  373.   SHELL=/bin/sh
  374.   
  375.   #------------------------------------------------------------------------------
  376. -- 
  377. -- Email info@NeoSoft.com for info on getting interactive Internet access.
  378. "Turn on your hot tub by email now.  Ask me how."
  379.