chicken-hackers
[Top][All Lists]
Advanced

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

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


From: Felix
Subject: Re: [Chicken-hackers] [PATCH] proposed bugfix for #706
Date: Thu, 29 Sep 2011 06:14:43 -0400 (EDT)

>> > 
>> > I am not quite sure I understand this correctly. Catch the error
>> > and if it is an overflow, redo it with a flonum? I am not sure if
>> > this is even possible since the internal check is against whether
>> > you are a 32-bit application and your off_t datatype is large enough
>> > to hold the size.
> 
> I see. I haven't found a different way of getting a filesize in my
> Stephens yet.
> 

Well, then we can just set the size slot to #f and have to check
on the Scheme side, when the size is accessed (and throw an error
in that case).

>> > For all the other errors we still need to add checks IMHO. This
>> > should also include a sane way to report them (have you seen the
>> > bug #707?).
>> 
>> What other errors do you mean specifically?
> 
> EACCES EBADF EFAULT ELOOP ENAMETOOLONG ENOMEM EOVERFLOW
> 

The easiest would probably be to return something indicating
an error. Better would be to add an additional error code in
barf (a generic "file access error", perhaps?) and call that
in C_file_info_2.

> 
> Not taking care of these, at least signalling them as an error,
> will just lead to future misery. To be honest I have no idea whether
> even these error codes work on all platforms. This really is a big
> mess but just returning #f and hoping noone will notice is the wrong
> thing.

Nobody suggested that.


cheers,
felix



reply via email to

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