From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.devel Subject: Re: native Win32 guile 1.7.0 Date: Mon, 09 Jun 2003 08:03:33 +1000 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <877k7wgrbe.fsf@zip.com.au> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1055109794 2587 80.91.224.249 (8 Jun 2003 22:03:14 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 8 Jun 2003 22:03:14 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Jun 09 00:03:11 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19P8Fq-0000f8-00 for ; Mon, 09 Jun 2003 00:03:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19P8HU-0007B3-6b for guile-devel@m.gmane.org; Sun, 08 Jun 2003 18:04:52 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19P8H5-00074u-BA for guile-devel@gnu.org; Sun, 08 Jun 2003 18:04:27 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19P8H2-00072O-Ev for guile-devel@gnu.org; Sun, 08 Jun 2003 18:04:26 -0400 Original-Received: from snoopy.pacific.net.au ([61.8.0.36]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19P8H1-0006uy-41 for guile-devel@gnu.org; Sun, 08 Jun 2003 18:04:23 -0400 Original-Received: from sunny.pacific.net.au (sunny.pacific.net.au [203.2.228.40]) h58M4IYd010985; Mon, 9 Jun 2003 08:04:20 +1000 Original-Received: from wisma.pacific.net.au (wisma.pacific.net.au [210.23.129.72]) by sunny.pacific.net.au with ESMTP id h58M4IQg016221; Mon, 9 Jun 2003 08:04:18 +1000 (EST) Original-Received: from localhost (ppp18.dyn228.pacific.net.au [203.143.228.18]) by wisma.pacific.net.au (8.12.9/8.12.9) with ESMTP id h58M4FYZ006458; Mon, 9 Jun 2003 08:04:17 +1000 (EST) Original-Received: from gg by localhost with local (Exim 3.35 #1 (Debian)) id 19P8GD-0000Py-00; Mon, 09 Jun 2003 08:03:33 +1000 Original-To: stefan Mail-Copies-To: never User-Agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.2 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2512 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2512 --=-=-= stefan writes: > > I just added a check for unsetenv() in the configure script and used it in > posix.c appropiately for mingw32 hosts. Which means that a > putenv("name="); would remove the environment variable 'name'. I think there's a small memory leak there, viz (while #t (putenv "FOO")) Perhaps * posix.c (s_scm_putenv): Free temporary ptr in mingw unset. Of course the main putenv bit also leaks, but that's another story :-). --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=posix.c.mingw-putenv.diff --- posix.c.~1.114.~ 2003-05-31 09:42:53.000000000 +1000 +++ posix.c 2003-06-08 17:57:04.000000000 +1000 @@ -1157,7 +1157,7 @@ "The return value is unspecified.") #define FUNC_NAME s_scm_putenv { - int rv; + int rv, e; char *ptr; SCM_VALIDATE_STRING (1, str); @@ -1177,6 +1177,7 @@ ptr[SCM_STRING_LENGTH (str)] = '='; ptr[SCM_STRING_LENGTH (str) + 1] = 0; rv = putenv (ptr); + e = errno; free (ptr); errno = e; if (rv < 0) SCM_SYSERROR; #endif --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel --=-=-=--