From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.bugs Subject: bug#18592: FFI should have portable access to =?UTF-8?Q?=E2=80=98errno=E2=80=99?= Date: Thu, 03 Mar 2016 12:36:15 -0500 Message-ID: <87si07sbu8.fsf@netris.org> References: <87fvf8oocf.fsf@ft.bewatermyfriend.org> <87h9vmy0zw.fsf@gnu.org> <87twzgeh3c.fsf@yeeloong.lan> <87r3uko4c9.fsf@gnu.org> <1451565229.3594.59.camel@Renee-desktop.suse> <1451909046.3594.135.camel@Renee-desktop.suse> <8760z9gw7o.fsf@netris.org> <1451934872.3594.150.camel@Renee-desktop.suse> <20160105074924.GA23165@tuxteam.de> <1451983123.3594.156.camel@Renee-desktop.suse> <87vb78jc86.fsf@netris.org> <1452021701.3594.160.camel@Renee-desktop.suse> <1455783943.3838.16.camel@Renee-desktop.suse> <871t8af8no.fsf@netris.org> <1455858156.3838.21.camel@Renee-desktop.suse> <1456485534.7330.63.camel@Renee-desktop.suse> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1457026643 10412 80.91.229.3 (3 Mar 2016 17:37:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Mar 2016 17:37:23 +0000 (UTC) Cc: 18592@debbugs.gnu.org To: Nala Ginrut Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Mar 03 18:37:12 2016 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1abXBX-0004MB-Ly for guile-bugs@m.gmane.org; Thu, 03 Mar 2016 18:37:11 +0100 Original-Received: from localhost ([::1]:36564 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abXBW-0007zW-UD for guile-bugs@m.gmane.org; Thu, 03 Mar 2016 12:37:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abXBT-0007yh-Ha for bug-guile@gnu.org; Thu, 03 Mar 2016 12:37:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1abXBO-0003zi-EB for bug-guile@gnu.org; Thu, 03 Mar 2016 12:37:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35054) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abXBO-0003ze-AT for bug-guile@gnu.org; Thu, 03 Mar 2016 12:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1abXBO-0005Lz-0f for bug-guile@gnu.org; Thu, 03 Mar 2016 12:37:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 03 Mar 2016 17:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18592 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 18592-submit@debbugs.gnu.org id=B18592.145702659820550 (code B ref 18592); Thu, 03 Mar 2016 17:37:01 +0000 Original-Received: (at 18592) by debbugs.gnu.org; 3 Mar 2016 17:36:38 +0000 Original-Received: from localhost ([127.0.0.1]:60414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abXB0-0005LO-Cj for submit@debbugs.gnu.org; Thu, 03 Mar 2016 12:36:38 -0500 Original-Received: from world.peace.net ([50.252.239.5]:38189 ident=hope5) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abXAz-0005LG-Ac for 18592@debbugs.gnu.org; Thu, 03 Mar 2016 12:36:37 -0500 Original-Received: from pool-71-174-32-69.bstnma.east.verizon.net ([71.174.32.69] helo=jojen) by world.peace.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1abXAp-0005E1-OZ; Thu, 03 Mar 2016 12:36:27 -0500 In-Reply-To: <1456485534.7330.63.camel@Renee-desktop.suse> (Nala Ginrut's message of "Fri, 26 Feb 2016 19:18:54 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.91 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7972 Archived-At: Nala Ginrut writes: > Is there still problem? I'm fine with the patch, and I'm expecting to > merge it ASAP. Anyway, please don't hesitate to tell me if there's still > any problem, I'm glad to help to do it better. I really need it. Sorry for the delay, but I'm having second thoughts about whether this is the right approach. Perhaps we should instead make a set of commitments that certain basic operations like scheme evaluation, heap allocation, and basic scheme procedures will leave 'errno' unchanged. At the API level, the idea would be that if you write Scheme code that makes a reasonable effort to avoid non-trivial operations between the FFI call and the call to (errno) or (set-errno! ), this would be sufficient. At an implementation level, it would require us to save and restore 'errno' around C library calls that are made by Guile's runtime system without the user's knowledge, most notably when running GC (during allocation) or when running asyncs and things like that. What do you think? Mark