weird problem with git gui

Andriy Gapon avg at FreeBSD.org
Mon Jul 15 16:25:09 UTC 2013


on 15/07/2013 18:35 Andriy Gapon said the following:
[snip]
> I do not have any conclusions or solution, but i have some further observations.
> It seems that in my environment tcl wants to manipulate 'environ' global
> variable directly instead of using putenv/setenv/tec.  I am not sure why this is
> preferred, but unix/tclUnixPort.h defines USE_PUTENV only for __CYGWIN__ or APPLE.
[snip]
> 
> ... and now I also know why I have this problem on this particular machine!
> I have a patched version of libfreetype (print/freetype2 with custom
> 'infinality' patch).  So apparently the unmodified version does not call setenv
> and so tcl has full control.  On the other hand with my version setenv confuses tcl.
> 
> I think that in general we should allow setenv to be called from beyond tcl
> control even while under tcl interpreter.  So I consider this to be an exotic
> bug in tcl.  Not sure how to proceed from here though.
> 

This patch seems to help me:

--- unix/tclUnixPort.h.orig	2012-06-26 22:29:18.000000000 +0300
+++ unix/tclUnixPort.h	2013-07-15 19:19:59.609561609 +0300
@@ -115,6 +115,10 @@
 #   define TclOSstat		stat
 #   define TclOSlstat		lstat
 #endif
+#ifdef __FreeBSD__
+#   define USE_PUTENV 1
+#   define USE_PUTENV_FOR_UNSET 1
+#endif
 

 /*
  *---------------------------------------------------------------------------
--- generic/tclEnv.c.orig	2012-06-26 22:29:18.000000000 +0300
+++ generic/tclEnv.c	2013-07-15 19:20:15.441564839 +0300
@@ -395,7 +395,7 @@
      * that no = should be included, and Windows requires it.
      */

-#if defined(__WIN32__) || defined(__CYGWIN__)
+#if defined(__WIN32__) || defined(__CYGWIN__) || defined(__FreeBSD__)
     string = ckalloc(length + 2);
     memcpy(string, name, (size_t) length);
     string[length] = '=';


-- 
Andriy Gapon


More information about the freebsd-tcltk mailing list