*BSD News Article 18472


Return to BSD News archive

Xref: sserve comp.lang.tcl:4991 comp.os.386bsd.apps:284
Newsgroups: comp.lang.tcl,comp.os.386bsd.apps
Path: sserve!newshost.anu.edu.au!munnari.oz.au!constellation!osuunx.ucc.okstate.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!howland.reston.ans.net!noc.near.net!uunet!magrana1!rob
From: rob@magrana1.uucp (Rob Duncan)
Subject: 386bsd patches for tcl7.0b1 and tk3.3b1
Message-ID: <CA7rut.352@magrana1.uucp>
Organization: Pomegranate Technology, Inc.
X-Newsreader: Tin 1.1 PL4
Date: Thu, 15 Jul 1993 16:16:05 GMT
Lines: 98

i have successfuly built both tcl7.0b1 and tk3.3b1 on a 386bsd 0.1
machine using gcc 2.4.5 and XFree86  1.3.  there were a small number of
trivial changes to the source files, and a little bit of customization
of the makefiles:

1) 386bsd has a conflicting definition of putenv() as well as setenv(),
so the same macro trickery is needed in tclEnv.c to make it work;

2) tkConfig.h needs to be modified to add a defined(__386BSD__) to the
list of architectures that require SELECT_MASK to be defined;

3) NULL is used instead of None in a couple of places in tkWm.c  this
is not a 386bsd specific problem.

4) i changed the makefiles to specify the c compiler, and also to add a
library search path for my x setup.  perhaps the macro for configuring
for openwindows could be generalized to configure any x related paths.

when i run the tests i find errors with some floating point operations
and some raise operations.  i'm still looking into these.

here are the patches:

*** tclEnv.c.dist	Wed Jul 14 15:30:02 1993
--- tclEnv.c	Wed Jul 14 15:31:03 1993
***************
*** 36,44 ****
--- 36,50 ----
   */
  
  #define putenv ignore_putenv
+ #ifdef __386BSD__
+ #define setenv ignore_setenv
+ #endif
  #include "tclInt.h"
  #include "tclUnix.h"
  #undef putenv
+ #ifdef __386BSD__
+ #undef setenv
+ #endif
  
  /*
   * The structure below is used to keep track of all of the interpereters
*** tkConfig.h.dist	Wed Jul 14 17:46:33 1993
--- tkConfig.h	Wed Jul 14 17:47:16 1993
***************
*** 96,102 ****
   * select:
   */
  
! #if (defined(sun) && !defined(sprite)) || defined(linux) || defined(SVR4)
  #   define SELECT_MASK fd_set
  #else
  #   if defined(_IBMR2)
--- 96,102 ----
   * select:
   */
  
! #if (defined(sun) && !defined(sprite)) || defined(linux) || defined(SVR4) || defined(__386BSD__)
  #   define SELECT_MASK fd_set
  #else
  #   if defined(_IBMR2)
*** tkWm.c.dist	Wed Jul 14 17:37:12 1993
--- tkWm.c	Wed Jul 14 17:37:50 1993
***************
*** 3161,3173 ****
      if (winPtr->window == None) {
  	Tk_MakeWindowExist((Tk_Window) winPtr);
      }
!     window = (winPtr->wmInfoPtr->reparent != NULL)
  	    ? winPtr->wmInfoPtr->reparent : winPtr->window;
      if (otherPtr != NULL) {
  	if (otherPtr->window == None) {
  	    Tk_MakeWindowExist((Tk_Window) otherPtr);
  	}
! 	changes.sibling = (otherPtr->wmInfoPtr->reparent != NULL)
  		? otherPtr->wmInfoPtr->reparent : otherPtr->window;
  	mask = CWStackMode|CWSibling;
      }
--- 3161,3173 ----
      if (winPtr->window == None) {
  	Tk_MakeWindowExist((Tk_Window) winPtr);
      }
!     window = (winPtr->wmInfoPtr->reparent != None)
  	    ? winPtr->wmInfoPtr->reparent : winPtr->window;
      if (otherPtr != NULL) {
  	if (otherPtr->window == None) {
  	    Tk_MakeWindowExist((Tk_Window) otherPtr);
  	}
! 	changes.sibling = (otherPtr->wmInfoPtr->reparent != None)
  		? otherPtr->wmInfoPtr->reparent : otherPtr->window;
  	mask = CWStackMode|CWSibling;
      }
-- 
Rob Duncan                                       Talk: +1-415-325-8780
Pomegranate Technology, Inc.                      Fax: +1-415-321-1334
235 Embarcadero Road                 UUCP: ...!uunet!magrana1!r.duncan
Palo Alto, CA 94301                 Internet: r.duncan@pomegranate.com