chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] [PATCH] proposed bugfix for #706


From: Christian Kellermann
Subject: [Chicken-hackers] [PATCH] proposed bugfix for #706
Date: Wed, 28 Sep 2011 17:46:04 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hi,

attached is a patch as a proposed fix for bug Ã#706.

This will need some discussion as I am not sure what I am doing here :)

First of all it introduces:

1. A new primitive C_file_exists that will use access to check wether we could 
access a file
2. Reroutes the file-exists? procedure to use C_file_exists
3. A new error code for barf() to signal system call errors

Ad 1.:

Thomas Chust suggested this and the code seems a bit easier and we
do not need to allocate all that memory we aren't interested in.
AÃlso we dodge the overflow situation altogether for this small use
case.

We will signal an error if we get anything negative besides ENOENT back.

I am not sure if I did the name mangling right. Also where does
"buffer" come from? Please investigate!

Ad 2:

 trivial

Ad 3:

To signal the error above I wanted to construct a proper condition
(exn i/o) or something but I am unsure how to do this. To base the
discussion upon facts, I have created a new error type for barf so
at lease I get a little more helpful hint at what's going on.

Looking forward hearing your opinions,

Christian


-- 
Who can (make) the muddy water (clear)? Let it be still, and it will
gradually become clear. Who can secure the condition of rest? Let
movement go on, and the condition of rest will gradually arise.
 -- Lao Tse. 

Attachment: 0001-Replace-sys-file-info-with-sys-file-exists.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]