Use s48_enter_integer instead of s48_enter_fixnum for errno to please GNU Hurd.

(Patch from Andreas Voegele)
This commit is contained in:
mainzelm 2003-06-25 08:26:06 +00:00
parent 1f31b70242
commit 3c92196d13
10 changed files with 19 additions and 19 deletions

View File

@ -500,14 +500,14 @@ s48_raise_closed_channel_error() {
void
s48_raise_os_error(int the_errno) {
s48_raise_scheme_exception(S48_EXCEPTION_OS_ERROR, 2,
s48_enter_fixnum(the_errno),
s48_enter_integer(the_errno),
s48_enter_string(strerror(the_errno)));
}
void
s48_raise_os_error_1(int the_errno, s48_value arg1) {
s48_raise_scheme_exception(S48_EXCEPTION_OS_ERROR, 3,
s48_enter_fixnum(the_errno),
s48_enter_integer(the_errno),
s48_enter_string(strerror(the_errno)),
arg1);
}
@ -515,7 +515,7 @@ s48_raise_os_error_1(int the_errno, s48_value arg1) {
void
s48_raise_os_error_2(int the_errno, s48_value arg1, s48_value arg2) {
s48_raise_scheme_exception(S48_EXCEPTION_OS_ERROR, 4,
s48_enter_fixnum(the_errno),
s48_enter_integer(the_errno),
s48_enter_string(strerror(the_errno)),
arg1, arg2);
}
@ -524,7 +524,7 @@ void
s48_raise_os_error_3(int the_errno, s48_value arg1, s48_value arg2,
s48_value arg3) {
s48_raise_scheme_exception(S48_EXCEPTION_OS_ERROR, 5,
s48_enter_fixnum(the_errno),
s48_enter_integer(the_errno),
s48_enter_string(strerror(the_errno)),
arg1, arg2, arg3);
}
@ -533,7 +533,7 @@ void
s48_raise_os_error_4(int the_errno, s48_value arg1, s48_value arg2,
s48_value arg3, s48_value arg4) {
s48_raise_scheme_exception(S48_EXCEPTION_OS_ERROR, 6,
s48_enter_fixnum(the_errno),
s48_enter_integer(the_errno),
s48_enter_string(strerror(the_errno)),
arg1, arg2, arg3, arg4);
}
@ -542,7 +542,7 @@ void
s48_raise_os_error_5(int the_errno, s48_value arg1, s48_value arg2,
s48_value arg3, s48_value arg4, s48_value arg5) {
s48_raise_scheme_exception(S48_EXCEPTION_OS_ERROR, 7,
s48_enter_fixnum(the_errno),
s48_enter_integer(the_errno),
s48_enter_string(strerror(the_errno)),
arg1, arg2, arg3, arg4, arg5);
}
@ -552,7 +552,7 @@ s48_raise_os_error_6(int the_errno, s48_value arg1, s48_value arg2,
s48_value arg3, s48_value arg4, s48_value arg5,
s48_value arg6) {
s48_raise_scheme_exception(S48_EXCEPTION_OS_ERROR, 8,
s48_enter_fixnum(the_errno),
s48_enter_integer(the_errno),
s48_enter_string(strerror(the_errno)),
arg1, arg2, arg3, arg4, arg5, arg6);
}
@ -562,7 +562,7 @@ s48_raise_os_error_7(int the_errno, s48_value arg1, s48_value arg2,
s48_value arg3, s48_value arg4, s48_value arg5,
s48_value arg6, s48_value arg7) {
s48_raise_scheme_exception(S48_EXCEPTION_OS_ERROR, 9,
s48_enter_fixnum(the_errno),
s48_enter_integer(the_errno),
s48_enter_string(strerror(the_errno)),
arg1, arg2, arg3, arg4, arg5, arg6, arg7);
}

View File

@ -12,7 +12,7 @@
extern int errno;
#define errno_or_false(x) (((x) == -1) ? s48_enter_fixnum(errno) : S48_FALSE)
#define errno_or_false(x) (((x) == -1) ? s48_enter_integer(errno) : S48_FALSE)
s48_value df_db_open(s48_value g1, s48_value g2, s48_value g3, s48_value g4, s48_value mv_vec)
{

View File

@ -76,7 +76,7 @@
""
"extern int errno;"
""
"#define errno_or_false(x) (((x) == -1) ? s48_enter_fixnum(errno) : S48_FALSE)"
"#define errno_or_false(x) (((x) == -1) ? s48_enter_integer(errno) : S48_FALSE)"
"" "")
(define-foreign %db-open (db_open (string file)

View File

@ -13,7 +13,7 @@
extern int errno;
#define errno_or_false(x) (((x) == -1) ? s48_enter_fixnum(errno) : S48_FALSE)
#define errno_or_false(x) (((x) == -1) ? s48_enter_integer(errno) : S48_FALSE)
s48_value df_db_check(long nargs, s48_value *args)
{

View File

@ -95,7 +95,7 @@
""
"extern int errno;"
""
"#define errno_or_false(x) (((x) == -1) ? s48_enter_fixnum(errno) : S48_FALSE)"
"#define errno_or_false(x) (((x) == -1) ? s48_enter_integer(errno) : S48_FALSE)"
"" "")
;;; This record will hold the pointer the the dbm structure plus

View File

@ -72,7 +72,7 @@ s48_value read_delim(const char *delims, char *buf,
else if( retval == -1 ) { /* Terminal case: error. */
*nread = cptr - buf - start;
return s48_enter_fixnum(errno);
return s48_enter_integer(errno);
}
else if( delims[c] ) { /* Terminal case: delimiter char. */
@ -115,7 +115,7 @@ s48_value skip_chars(const char *skipchars, int fd, int *nread)
if( retval == -1 ) { /* Terminal case: error. */
*nread = nr;
return s48_enter_fixnum(errno);
return s48_enter_integer(errno);
}
else if( !skipchars[c] ) { /* Terminal case: non-skip char. */

View File

@ -10,7 +10,7 @@
extern int errno;
#define errno_or_false(x) (((x) == -1) ? s48_enter_fixnum(errno) : S48_FALSE)
#define errno_or_false(x) (((x) == -1) ? s48_enter_integer(errno) : S48_FALSE)
/* stub used to return FALSE when scheme checks for Berkeley dbm */
int db_check()

View File

@ -70,7 +70,7 @@
""
"extern int errno;"
""
"#define errno_or_false(x) (((x) == -1) ? s48_enter_fixnum(errno) : S48_FALSE)"
"#define errno_or_false(x) (((x) == -1) ? s48_enter_integer(errno) : S48_FALSE)"
"" "")
(define-foreign %dbm-open (database_open (string file)

View File

@ -140,8 +140,8 @@ s48_value scheme_exec(s48_value prog, s48_value argv, s48_value env)
Free(unix_env);
}
Free(unix_argv);
return s48_enter_fixnum(e); /* Don't raise an exception since
we're maybe just testing the path */
return s48_enter_integer(e); /* Don't raise an exception since
we're maybe just testing the path */
}
s48_value scsh_exit(s48_value status)

View File

@ -252,7 +252,7 @@ s48_value date2time(s48_value sec, s48_value min, s48_value hour,
else if( S48_STRING_P(tz_name) ) { /* Time zone */
char *newenv[2];
char **oldenv = make_newenv(tz_name, newenv);
if( !oldenv ) return s48_enter_fixnum(errno);
if( !oldenv ) return s48_enter_integer(errno);
tzset(); /* NetBSD, SunOS POSIX-noncompliance requires this. */
errno = 0;