From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chaos Eternal Newsgroups: gmane.lisp.guile.bugs Subject: bug#18592: FFI should have portable access to =?UTF-8?Q?=E2=80=98errno=E2=80=99?= Date: Tue, 5 Jan 2016 10:24:35 +0800 Message-ID: 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1451960723 6568 80.91.229.3 (5 Jan 2016 02:25:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Jan 2016 02:25:23 +0000 (UTC) Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , 18592@debbugs.gnu.org To: Nala Ginrut Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Jan 05 03:25: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 1aGHJ9-0001xr-E4 for guile-bugs@m.gmane.org; Tue, 05 Jan 2016 03:25:11 +0100 Original-Received: from localhost ([::1]:47805 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGHJ8-0002M5-5D for guile-bugs@m.gmane.org; Mon, 04 Jan 2016 21:25:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGHJ4-0002Lp-SC for bug-guile@gnu.org; Mon, 04 Jan 2016 21:25:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aGHJ0-0007Es-Qp for bug-guile@gnu.org; Mon, 04 Jan 2016 21:25:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49778) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGHJ0-0007Eo-NZ for bug-guile@gnu.org; Mon, 04 Jan 2016 21:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aGHJ0-0005eh-Go for bug-guile@gnu.org; Mon, 04 Jan 2016 21:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Chaos Eternal Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 05 Jan 2016 02:25:02 +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.145196068221707 (code B ref 18592); Tue, 05 Jan 2016 02:25:02 +0000 Original-Received: (at 18592) by debbugs.gnu.org; 5 Jan 2016 02:24:42 +0000 Original-Received: from localhost ([127.0.0.1]:37998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aGHIg-0005e3-G7 for submit@debbugs.gnu.org; Mon, 04 Jan 2016 21:24:42 -0500 Original-Received: from mail-io0-f178.google.com ([209.85.223.178]:34351) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aGHIf-0005dq-Fe for 18592@debbugs.gnu.org; Mon, 04 Jan 2016 21:24:41 -0500 Original-Received: by mail-io0-f178.google.com with SMTP id 1so127347481ion.1 for <18592@debbugs.gnu.org>; Mon, 04 Jan 2016 18:24:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shlug-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=obCIXb+9fMzE0xjGLvJ3A+toStcIfcFWi32Raut5OIs=; b=scYOI0cqoq3na/orR8lO0mEERQU72vI5ULFTRk6hd1/RBVuoTS3QbE9RrehWiyxzW9 AZpCXUtlvnu4mezEkkd8dn616bcjjAUKeKvd2xkc9u/cUBULlILzknT9t7rKAhnAWY6p uWJOBmcAPI1JXowJyM+I0QfphZpIQI5KtTr4b+iV9C9+Ax9n6gpXqxBQDkDFGRKhZZk8 AUWveaXc8tTDjtmD+7xLKX3rbwhRYrhhsLkUsWZJjSPNTdbNHbS5ZGD4+VECHUDjaeqi BmXUbx+pIC7NFLDibrYQ0z2TugW0119bpuWPxMCddWaQuxJdM9pOFOC70Jk68sRbF919 hbDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=obCIXb+9fMzE0xjGLvJ3A+toStcIfcFWi32Raut5OIs=; b=RHzTy6xLbNpNr9eplkT6j9RxPmJDjp8QhfsWet8KISTl3N0RionB618z7hQJyKmLZ6 qI1AJ3Iy2uHH5zOPgD3GqQNmJWK7FK13PGBp7hGLDnXQPo92OOhsifEPiPkCS4GjjMQi LC0AQVL5585gDzMUiLk1d1cIlhbyAGWQ6bdMMdKbuB9XjsCnTk/f5g15h38uIleSocbn ZOkT8awSRo1vFjhzYhogjC8T7zS297E3VuSiXUtbdprUDEBm+jWK6c0MqfdMpTfcjr4W OFUnJNxLKs/SOxXiiT2Fx3hjcb6T6Xmtzm/GYtUAVcsrcqNw4NuWSRjSf9AsMKhOe3fz ARog== X-Gm-Message-State: ALoCoQkkSf9bpWFOYXx/1E4ath1TRf3uM4CIgz2wDfVzG9snfKRmbeSJ54zC1WHkeg+GnBDsVfLkMPZnLS4NTu49S6c8Nuqm0w== X-Received: by 10.107.164.145 with SMTP id d17mr71397220ioj.162.1451960675849; Mon, 04 Jan 2016 18:24:35 -0800 (PST) Original-Received: by 10.64.148.72 with HTTP; Mon, 4 Jan 2016 18:24:35 -0800 (PST) In-Reply-To: <1451934872.3594.150.camel@Renee-desktop.suse> 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:7924 Archived-At: On Tue, Jan 5, 2016 at 3:14 AM, Nala Ginrut wrote: > Hi Mark! > Thanks for all the advices. > > Here's the new patch according to your advices. > Include: > 1. Added new procedure pointer->procedure-with-errno with > #:return-errno? > > Question: Should we make #:return-errno? true in default? This would > make the name *-with-errno more reasonable. At present, it's false in > default. > I suggest that if we have this new procedure, we don't need keyword option "#:return-errno?" since the procedure name itself implies it. Also if old behavior is needed, the old procedure pointer->procedure still can be employed. > 2. Used scm_cons2 > > 3. Store errno to a local var after ffi_call immediately. > > 4. Set errno=0 only when #:return-errno? is true. > > 5. Merged all modifications into one patch. > > Comments please. > > Best regards. >