Earlier I said:
>Every system call that I'm aware of either has a special return value which
>indicates whether it failed (which is usually -1), or modifies an argument
>appropriately, or has some other kind of indication of failure. Even
>exec(2), which shouldn't return *at all* unless there was a failure, makes
>a point of returning -1. What exceptions do you know of?
Incidentally, while -1 might be a valid non-error return value for time(),
what I said is still true: you can tell if the system call failed because
it will fail to modify its argument (assuming you provided one).
So I think the correct change to make may be:
scheme_value scheme_time(int *hi_secs, int *lo_secs)
time_t tm = 0;
time_t res = time(&tm);
if( res != tm ) return ENTER_FIXNUM(errno);
*hi_secs = hi8(tm);
*lo_secs = lo24(tm);