From 240a07af3b70fa388ecd097e5d52147cbc1f59b1 Mon Sep 17 00:00:00 2001 From: mainzelm Date: Wed, 25 Jun 2003 08:44:08 +0000 Subject: [PATCH] Use s48_enter_integer instead of s48_enter_fixnum for errno to please GNU Hurd. (Patch from Andreas Voegele) --- c/external.c | 16 ++++++++-------- scsh/db.c | 2 +- scsh/db.scm | 2 +- scsh/dbm.c | 2 +- scsh/dbm.scm | 2 +- scsh/fdports1.c | 4 ++-- scsh/ndbm.c | 2 +- scsh/ndbm.scm | 2 +- scsh/syscalls1.c | 4 ++-- scsh/time1.c | 2 +- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/c/external.c b/c/external.c index 0e8a5af..f70ab81 100644 --- a/c/external.c +++ b/c/external.c @@ -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); } diff --git a/scsh/db.c b/scsh/db.c index b03bc2a..9a59c26 100644 --- a/scsh/db.c +++ b/scsh/db.c @@ -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) { diff --git a/scsh/db.scm b/scsh/db.scm index ac7820b..edf8766 100644 --- a/scsh/db.scm +++ b/scsh/db.scm @@ -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) diff --git a/scsh/dbm.c b/scsh/dbm.c index 5906c2d..2960fbf 100644 --- a/scsh/dbm.c +++ b/scsh/dbm.c @@ -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) { diff --git a/scsh/dbm.scm b/scsh/dbm.scm index b631856..baf9ec6 100644 --- a/scsh/dbm.scm +++ b/scsh/dbm.scm @@ -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 diff --git a/scsh/fdports1.c b/scsh/fdports1.c index 6540d59..1e8d989 100644 --- a/scsh/fdports1.c +++ b/scsh/fdports1.c @@ -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. */ diff --git a/scsh/ndbm.c b/scsh/ndbm.c index f212f8c..450cfe6 100644 --- a/scsh/ndbm.c +++ b/scsh/ndbm.c @@ -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() diff --git a/scsh/ndbm.scm b/scsh/ndbm.scm index dbf4fb8..0b5fb04 100644 --- a/scsh/ndbm.scm +++ b/scsh/ndbm.scm @@ -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) diff --git a/scsh/syscalls1.c b/scsh/syscalls1.c index 726cb74..c253239 100644 --- a/scsh/syscalls1.c +++ b/scsh/syscalls1.c @@ -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) diff --git a/scsh/time1.c b/scsh/time1.c index c2dbadd..880c85b 100644 --- a/scsh/time1.c +++ b/scsh/time1.c @@ -253,7 +253,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;