GNU bug report logs - #18592
FFI should have portable access to ‘errno’

Previous Next

Package: guile;

Reported by: Frank Terbeck <ft <at> bewatermyfriend.org>

Date: Tue, 30 Sep 2014 20:21:01 UTC

Severity: wishlist

Done: Mark H Weaver <mhw <at> netris.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Chaos Eternal <chaoseternal <at> shlug.org>
To: Nala Ginrut <nalaginrut <at> gmail.com>
Cc: Mark H Weaver <mhw <at> netris.org>, Ludovic Courtès <ludo <at> gnu.org>, 18592 <at> debbugs.gnu.org
Subject: bug#18592: FFI should have portable access to ‘errno’
Date: Tue, 5 Jan 2016 10:24:35 +0800
On Tue, Jan 5, 2016 at 3:14 AM, Nala Ginrut <nalaginrut <at> gmail.com> 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.
>




This bug report was last modified 8 years and 338 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.