~ chicken-core (chicken-5) a5bd817ac2dff19a94af6a4cc6b483a46f882a57
commit a5bd817ac2dff19a94af6a4cc6b483a46f882a57
Author: Peter Bex <peter@more-magic.net>
AuthorDate: Sat Feb 7 15:45:45 2015 +0100
Commit: Peter Bex <peter@more-magic.net>
CommitDate: Sun May 31 14:20:16 2015 +0200
Change procedures that deal with UNIX timestamps so they return exact integers
diff --git a/chicken.h b/chicken.h
index a4b0e811..a48a418e 100644
--- a/chicken.h
+++ b/chicken.h
@@ -1166,7 +1166,6 @@ extern double trunc(double);
#define C_bignum_mutate_size(b,s) (C_block_header(b) = (C_BIGNUM_TYPE | C_wordstobytes((s)+1)))
#define C_fitsinfixnump(n) (((n) & C_INT_SIGN_BIT) == (((n) & C_INT_TOP_BIT) << 1))
#define C_ufitsinfixnump(n) (((n) & (C_INT_SIGN_BIT | (C_INT_SIGN_BIT >> 1))) == 0)
-#define C_quickflonumtruncate(n) (C_fix((C_word)C_flonum_magnitude(n)))
#define C_and(x, y) (C_truep(x) ? (y) : C_SCHEME_FALSE)
#define C_c_bytevector(x) ((unsigned char *)C_data_pointer(x))
#define C_c_bytevector_or_null(x) ((unsigned char *)C_data_pointer_or_null(x))
@@ -1735,7 +1734,7 @@ extern double trunc(double);
#define C_u_i_flonum_infinitep(x) C_mk_bool(C_isinf(C_flonum_magnitude(x)))
#define C_u_i_flonum_finitep(x) C_mk_bool(C_isfinite(C_flonum_magnitude(x)))
-#define C_a_i_current_milliseconds(ptr, c, dummy) C_flonum(ptr, C_milliseconds())
+#define C_a_i_current_milliseconds(ptr, c, dummy) C_uint64_to_num(ptr, C_milliseconds())
#define C_i_noop1(dummy) ((dummy), C_SCHEME_UNDEFINED)
#define C_i_noop2(dummy1, dummy2) ((dummy1), (dummy2), C_SCHEME_UNDEFINED)
@@ -2157,8 +2156,8 @@ C_fctexport C_word C_fcall C_a_i_flonum_gcd(C_word **p, C_word n, C_word x, C_wo
C_fctexport C_word C_fcall C_i_getprop(C_word sym, C_word prop, C_word def) C_regparm;
C_fctexport C_word C_fcall C_putprop(C_word **a, C_word sym, C_word prop, C_word val) C_regparm;
C_fctexport C_word C_fcall C_i_get_keyword(C_word key, C_word args, C_word def) C_regparm;
-C_fctexport double C_fcall C_milliseconds(void) C_regparm;
-C_fctexport double C_fcall C_cpu_milliseconds(void) C_regparm;
+C_fctexport C_u64 C_fcall C_milliseconds(void) C_regparm;
+C_fctexport C_u64 C_fcall C_cpu_milliseconds(void) C_regparm;
C_fctexport double C_fcall C_bignum_to_double(C_word bignum) C_regparm;
diff --git a/extras.scm b/extras.scm
index dec70d23..1b209398 100644
--- a/extras.scm
+++ b/extras.scm
@@ -57,7 +57,7 @@
(define (randomize . n)
(let ((nn (if (null? n)
- (##sys#flo2fix (fp/ (current-seconds) 1000.0)) ; wall clock time
+ (quotient (current-seconds) 1000) ; wall clock time
(car n))))
(##sys#check-fixnum nn 'randomize)
(##core#inline "C_randomize" nn) ) )
diff --git a/library.scm b/library.scm
index 5e7b9c55..4218aa2c 100644
--- a/library.scm
+++ b/library.scm
@@ -64,7 +64,7 @@
#define C_direct_continuation(dummy) t1
-#define C_a_get_current_seconds(ptr, c, dummy) C_flonum(ptr, time(NULL))
+#define C_a_get_current_seconds(ptr, c, dummy) C_int64_to_num(ptr, time(NULL))
#define C_peek_c_string_at(ptr, i) ((C_char *)(((C_char **)ptr)[ i ]))
static C_word
@@ -217,7 +217,6 @@ EOF
(define ##sys#void void)
(define ##sys#undefined-value (##core#undefined))
(define (##sys#halt msg) (##core#inline "C_halt" msg))
-(define (##sys#flo2fix n) (##core#inline "C_quickflonumtruncate" n))
(define ##sys#become! (##core#primitive "C_become"))
(define (##sys#block-ref x i) (##core#inline "C_i_block_ref" x i))
(define ##sys#apply-values (##core#primitive "C_apply_values"))
diff --git a/posix-common.scm b/posix-common.scm
index 245f6e21..65e77b92 100644
--- a/posix-common.scm
+++ b/posix-common.scm
@@ -81,7 +81,7 @@ static char C_time_string [TIME_STRING_MAXLENGTH + 1];
#define C_strftime(v, f, tm) \
(strftime(C_time_string, sizeof(C_time_string), C_c_string(f), C_tm_set((v), (tm))) ? C_time_string : NULL)
-#define C_a_mktime(ptr, c, v, tm) C_flonum(ptr, mktime(C_tm_set((v), C_data_pointer(tm))))
+#define C_a_mktime(ptr, c, v, tm) C_int64_to_num(ptr, mktime(C_tm_set((v), C_data_pointer(tm))))
#define C_asctime(v, tm) (asctime(C_tm_set((v), (tm))))
#define C_fdopen(a, n, fd, m) C_mpointer(a, fdopen(C_unfix(fd), C_c_string(m)))
@@ -97,9 +97,9 @@ static char C_time_string [TIME_STRING_MAXLENGTH + 1];
#define C_foundfile(e,b,l) (C_strlcpy(C_c_string(b), ((struct dirent *) C_block_item(e, 0))->d_name, l), C_fix(strlen(((struct dirent *) C_block_item(e, 0))->d_name)))
/* It is assumed that 'int' is-a 'long' */
-#define C_ftell(p) C_fix(ftell(C_port_file(p)))
-#define C_fseek(p, n, w) C_mk_nbool(fseek(C_port_file(p), C_num_to_int(n), C_unfix(w)))
-#define C_lseek(fd, o, w) C_fix(lseek(C_unfix(fd), C_unfix(o), C_unfix(w)))
+#define C_ftell(a, n, p) C_int64_to_num(a, ftell(C_port_file(p)))
+#define C_fseek(p, n, w) C_mk_nbool(fseek(C_port_file(p), C_num_to_int64(n), C_unfix(w)))
+#define C_lseek(fd, o, w) C_fix(lseek(C_unfix(fd), C_num_to_int64(o), C_unfix(w)))
#ifdef HAVE_SETENV
# define C_unsetenv(s) (unsetenv((char *)C_data_pointer(s)), C_SCHEME_TRUE)
@@ -192,9 +192,9 @@ EOF
(define-foreign-variable _stat_st_nlink unsigned-int "C_statbuf.st_nlink")
(define-foreign-variable _stat_st_gid unsigned-int "C_statbuf.st_gid")
(define-foreign-variable _stat_st_size integer64 "C_statbuf.st_size")
-(define-foreign-variable _stat_st_mtime double "C_statbuf.st_mtime")
-(define-foreign-variable _stat_st_atime double "C_statbuf.st_atime")
-(define-foreign-variable _stat_st_ctime double "C_statbuf.st_ctime")
+(define-foreign-variable _stat_st_mtime integer64 "C_statbuf.st_mtime")
+(define-foreign-variable _stat_st_atime integer64 "C_statbuf.st_atime")
+(define-foreign-variable _stat_st_ctime integer64 "C_statbuf.st_ctime")
(define-foreign-variable _stat_st_uid unsigned-int "C_statbuf.st_uid")
(define-foreign-variable _stat_st_mode unsigned-int "C_statbuf.st_mode")
(define-foreign-variable _stat_st_dev unsigned-int "C_statbuf.st_dev")
@@ -251,7 +251,7 @@ EOF
(lambda (f)
(##sys#stat f #f #t 'file-modification-time) _stat_st_mtime)
(lambda (f t)
- (##sys#check-number t 'set-file-modification-time)
+ (##sys#check-exact-integer t 'set-file-modification-time)
(let ((r ((foreign-lambda int "set_file_mtime" c-string scheme-object)
f t)))
(when (fx< r 0)
@@ -329,7 +329,7 @@ EOF
(lambda (port)
(let ((pos (cond ((port? port)
(if (eq? (##sys#slot port 7) 'stream)
- (##core#inline "C_ftell" port)
+ (##core#inline_allocate ("C_ftell" 4) port)
-1) )
((fixnum? port)
(##core#inline "C_lseek" port 0 _seek_cur) )
@@ -559,17 +559,17 @@ EOF
(##sys#error loc "time vector too short" tm) ) )
(define (seconds->local-time #!optional (secs (current-seconds)))
- (##sys#check-number secs 'seconds->local-time)
+ (##sys#check-exact-integer secs 'seconds->local-time)
(##sys#decode-seconds secs #f) )
(define (seconds->utc-time #!optional (secs (current-seconds)))
- (##sys#check-number secs 'seconds->utc-time)
+ (##sys#check-exact-integer secs 'seconds->utc-time)
(##sys#decode-seconds secs #t) )
(define seconds->string
(let ([ctime (foreign-lambda c-string "C_ctime" integer)])
(lambda (#!optional (secs (current-seconds)))
- (##sys#check-number secs 'seconds->string)
+ (##sys#check-exact-integer secs 'seconds->string)
(let ([str (ctime secs)])
(if str
(##sys#substring str 0 (fx- (##sys#size str) 1))
diff --git a/posixunix.scm b/posixunix.scm
index b7784646..fa65e1a1 100644
--- a/posixunix.scm
+++ b/posixunix.scm
@@ -302,7 +302,7 @@ static time_t C_timegm(struct tm *t)
#define C_timegm timegm
#endif
-#define C_a_timegm(ptr, c, v, tm) C_flonum(ptr, C_timegm(C_tm_set((v), C_data_pointer(tm))))
+#define C_a_timegm(ptr, c, v, tm) C_int64_to_num(ptr, C_timegm(C_tm_set((v), C_data_pointer(tm))))
#ifdef __linux__
extern char *strptime(const char *s, const char *format, struct tm *tm);
@@ -569,7 +569,7 @@ EOF
(nfds (fx+ nfdsr nfdsw))
(fds-blob (##sys#make-blob
(fx* nfds (foreign-value "sizeof(struct pollfd)" int)))))
- (when tm (##sys#check-number tm))
+ (when tm (##sys#check-exact-integer tm))
(do ((i 0 (fx+ i 1))
(fdsrl fdsrl (cdr fdsrl)))
((null? fdsrl))
@@ -583,7 +583,7 @@ EOF
"struct pollfd *fds = p;"
"fds[i].fd = fd; fds[i].events = POLLOUT;") i (car fdswl) fds-blob))
(let ((n ((foreign-lambda int "poll" scheme-pointer int int)
- fds-blob nfds (if tm (inexact->exact (* (max 0 tm) 1000)) -1))))
+ fds-blob nfds (if tm (* (max 0 tm) 1000) -1))))
(cond ((fx< n 0)
(posix-error #:file-error 'file-select "failed" fdsr fdsw) )
((fx= n 0) (values (if (pair? fdsr) '() #f) (if (pair? fdsw) '() #f)))
@@ -1351,7 +1351,7 @@ EOF
(define file-truncate
(lambda (fname off)
- (##sys#check-number off 'file-truncate)
+ (##sys#check-exact-integer off 'file-truncate)
(when (fx< (cond [(string? fname) (##core#inline "C_truncate" (##sys#make-c-string fname 'file-truncate) off)]
[(fixnum? fname) (##core#inline "C_ftruncate" fname off)]
[else (##sys#error 'file-truncate "invalid file" fname)] )
@@ -1370,10 +1370,10 @@ EOF
(let-optionals* args ([start 0]
[len #t] )
(##sys#check-port port loc)
- (##sys#check-number start loc)
+ (##sys#check-exact-integer start loc)
(if (eq? #t len)
(set! len 0)
- (##sys#check-number len loc) )
+ (##sys#check-exact-integer len loc) )
(##core#inline "C_flock_setup" (if (##sys#slot port 1) _f_rdlck _f_wrlck) start len)
(##sys#make-structure 'lock port start len) ) )
(define (err msg lock loc)
diff --git a/profiler.scm b/profiler.scm
index 6e3c084b..2cbb56f6 100644
--- a/profiler.scm
+++ b/profiler.scm
@@ -75,7 +75,8 @@
;;; Entry and exit into/out of profiled lambda:
-(define cpu-ms (foreign-lambda double "C_cpu_milliseconds"))
+;; XXX TODO: Should be changed to unsigned-integer64 after bootstrapping
+(define cpu-ms (foreign-lambda unsigned-integer "C_cpu_milliseconds"))
(define ##sys#profile-entry
(let ((maxfix most-positive-fixnum))
@@ -106,8 +107,8 @@
(let ((t (##sys#slot vec it)))
(##sys#setslot
vec it
- (fp+ (if (eq? t 0) 0.0 t)
- (fp- (cpu-ms) (##sys#slot vec it0))))))))
+ (+ (if (eq? t 0) 0 t)
+ (- (cpu-ms) (##sys#slot vec it0))))))))
;;; Generate profile:
diff --git a/runtime.c b/runtime.c
index b46a5608..bc8b66f0 100644
--- a/runtime.c
+++ b/runtime.c
@@ -1932,17 +1932,16 @@ C_word C_dbg_hook(C_word dummy)
/* Timing routines: */
-C_regparm double C_fcall C_milliseconds(void)
+C_regparm C_u64 C_fcall C_milliseconds(void)
{
#ifdef C_NONUNIX
if(CLOCKS_PER_SEC == 1000) return clock();
- else return C_floor(((double)clock() / (double)CLOCKS_PER_SEC) * 1000);
+ else return (C_u64)clock() / (C_u64)CLOCKS_PER_SEC * 1000;
#else
struct timeval tv;
if(C_gettimeofday(&tv, NULL) == -1) return 0;
- else return
- C_floor(((double)tv.tv_sec - C_startup_time_seconds) * 1000.0 + tv.tv_usec / 1000);
+ else return (tv.tv_sec - C_startup_time_seconds) * 1000 + tv.tv_usec / 1000;
#endif
}
@@ -1970,18 +1969,17 @@ C_regparm time_t C_fcall C_seconds(C_long *ms)
}
-C_regparm double C_fcall C_cpu_milliseconds(void)
+C_regparm C_u64 C_fcall C_cpu_milliseconds(void)
{
#if defined(C_NONUNIX) || defined(__CYGWIN__)
if(CLOCKS_PER_SEC == 1000) return clock();
- else return C_floor(((double)clock() / (double)CLOCKS_PER_SEC) * 1000);
+ else return ((C_u64)clock() / CLOCKS_PER_SEC) * 1000;
#else
struct rusage ru;
if(C_getrusage(RUSAGE_SELF, &ru) == -1) return 0;
- else return
- C_floor(((double)ru.ru_utime.tv_sec + ru.ru_stime.tv_sec) * 1000
- + ((double)ru.ru_utime.tv_usec + ru.ru_stime.tv_usec) / 1000);
+ else return (((C_u64)ru.ru_utime.tv_sec + ru.ru_stime.tv_sec) * 1000
+ + ((C_u64)ru.ru_utime.tv_usec + ru.ru_stime.tv_usec) / 1000);
#endif
}
@@ -10421,7 +10419,7 @@ void C_ccall C_decode_seconds(C_word c, C_word closure, C_word k, C_word secs, C
C_word ab[ C_SIZEOF_VECTOR(10) ], *a = ab,
info;
- tsecs = (time_t)((secs & C_FIXNUM_BIT) != 0 ? C_unfix(secs) : C_flonum_magnitude(secs));
+ tsecs = (time_t)C_num_to_int64(secs);
if(mode == C_SCHEME_FALSE) tmt = C_localtime(&tsecs);
else tmt = C_gmtime(&tsecs);
@@ -10800,14 +10798,14 @@ C_a_i_cpu_time(C_word **a, int c, C_word buf)
#if defined(C_NONUNIX) || defined(__CYGWIN__)
if(CLOCKS_PER_SEC == 1000) u = clock();
- else u = C_number(a, C_floor(((double)clock() / (double)CLOCKS_PER_SEC) * 1000));
+ else u = C_uint64_to_num(a, ((C_u64)clock() / CLOCKS_PER_SEC) * 1000);
#else
struct rusage ru;
if(C_getrusage(RUSAGE_SELF, &ru) == -1) u = 0;
else {
- u = C_number(a, C_floor((double)ru.ru_utime.tv_sec * 1000 + ru.ru_utime.tv_usec / 1000));
- s = C_number(a, C_floor((double)ru.ru_stime.tv_sec * 1000 + ru.ru_stime.tv_usec / 1000));
+ u = C_uint64_to_num(a, (C_u64)ru.ru_utime.tv_sec * 1000 + ru.ru_utime.tv_usec / 1000);
+ s = C_uint64_to_num(a, (C_u64)ru.ru_stime.tv_sec * 1000 + ru.ru_stime.tv_usec / 1000);
}
#endif
diff --git a/scheduler.scm b/scheduler.scm
index d20a08eb..1dc78821 100644
--- a/scheduler.scm
+++ b/scheduler.scm
@@ -74,7 +74,7 @@ static fd_set C_fdset_input, C_fdset_output;
#define C_fd_input_ready(fd,pos) C_mk_bool(FD_ISSET(C_unfix(fd), &C_fdset_input))
#define C_fd_output_ready(fd,pos) C_mk_bool(FD_ISSET(C_unfix(fd), &C_fdset_output))
-C_inline int C_ready_fds_timeout(int to, double tm) {
+C_inline int C_ready_fds_timeout(int to, unsigned int tm) {
struct timeval timeout;
timeout.tv_sec = tm / 1000;
timeout.tv_usec = fmod(tm, 1000) * 1000;
@@ -107,8 +107,8 @@ C_inline int C_fd_ready(int fd, int pos, int what) {
#define C_fd_input_ready(fd,pos) C_mk_bool(C_fd_ready(C_unfix(fd), C_unfix(pos),POLLIN|POLLERR|POLLHUP|POLLNVAL))
#define C_fd_output_ready(fd,pos) C_mk_bool(C_fd_ready(C_unfix(fd), C_unfix(pos),POLLOUT|POLLERR|POLLHUP|POLLNVAL))
-C_inline int C_ready_fds_timeout(int to, double tm) {
- return poll(C_fdset_set, C_fdset_nfds, to ? (int)tm : -1);
+C_inline int C_ready_fds_timeout(int to, unsigned int tm) {
+ return poll(C_fdset_set, C_fdset_nfds, to ? tm : -1);
}
C_inline void C_prepare_fdset(int length) {
@@ -185,7 +185,7 @@ EOF
[tmo2 (##sys#slot tto 4)] ) ; timeout value stored in thread
(dbg "timeout: " tto " -> " tmo2 " (now: " now ")")
(if (equal? tmo1 tmo2) ;XXX why do we check this?
- (if (fp>= now tmo1) ; timeout reached?
+ (if (>= now tmo1) ; timeout reached?
(begin
(##sys#setislot tto 13 #t) ; mark as being unblocked by timeout
(##sys#clear-i/o-state-for-thread! tto)
@@ -203,9 +203,7 @@ EOF
(set! eintr
(and (not (##core#inline
"C_msleep"
- (fxmax
- 0
- (##core#inline "C_quickflonumtruncate" (fp- tmo1 now)))))
+ (max 0 (- tmo1 now))))
(foreign-value
"C_signal_interrupted_p" bool) ) ) ) ) ) )
(loop (cdr lst)) ) ) ) ) ) )
@@ -293,13 +291,10 @@ EOF
(define (##sys#thread-block-for-timeout! t tm)
(dbg t " blocks for timeout " tm)
- (unless (flonum? tm) ; to catch old code that uses fixnum timeouts
- (panic
- (sprintf "##sys#thread-block-for-timeout!: invalid timeout: ~S" tm)))
- (when (fp> tm 0.0)
+ (when (> tm 0)
;; This should really use a balanced tree:
(let loop ([tl ##sys#timeout-list] [prev #f])
- (if (or (null? tl) (fp< tm (caar tl)))
+ (if (or (null? tl) (< tm (caar tl)))
(if prev
(set-cdr! prev (cons (cons tm t) tl))
(set! ##sys#timeout-list (cons (cons tm t) tl)) )
@@ -446,10 +441,10 @@ EOF
(tmo (if (and to? (not rq?)) ; no thread was unblocked by timeout, so wait
(let* ((tmo1 (caar ##sys#timeout-list))
(now (##core#inline_allocate ("C_a_i_current_milliseconds" 4) #f)))
- (fpmax 0.0 (fp- tmo1 now)) )
+ (max 0 (- tmo1 now)) )
0.0) ) ) ; otherwise immediate timeout.
(dbg "waiting for I/O with timeout " tmo)
- (let ((n ((foreign-lambda int "C_ready_fds_timeout" bool double)
+ (let ((n ((foreign-lambda int "C_ready_fds_timeout" bool unsigned-integer)
(or rq? to?) tmo)))
(dbg n " fds ready")
(cond [(eq? -1 n)
diff --git a/types.db b/types.db
index 7dd4c69f..6df46c43 100644
--- a/types.db
+++ b/types.db
@@ -932,13 +932,13 @@
#(tmp1))))
(() ##sys#current-exception-handler))
-(current-gc-milliseconds (#(procedure #:clean) current-gc-milliseconds () fixnum))
-(current-milliseconds (#(procedure #:clean) current-milliseconds () float))
+(current-gc-milliseconds (#(procedure #:clean) current-gc-milliseconds () integer))
+(current-milliseconds (#(procedure #:clean) current-milliseconds () integer))
(current-read-table
(#(procedure #:clean) current-read-table (#!optional (struct read-table)) (struct read-table)))
-(current-seconds (#(procedure #:clean) current-seconds () float))
+(current-seconds (#(procedure #:clean) current-seconds () integer))
(define-reader-ctor (#(procedure #:clean #:enforce) define-reader-ctor (symbol procedure) undefined))
(delete-file (#(procedure #:clean #:enforce) delete-file (string) string))
(enable-warnings (#(procedure #:clean) enable-warnings (#!optional *) *))
@@ -1852,28 +1852,28 @@
(fcntl/getfl fixnum)
(fcntl/setfd fixnum)
(fcntl/setfl fixnum)
-(file-access-time (#(procedure #:clean #:enforce) file-access-time ((or string fixnum)) number))
-(file-change-time (#(procedure #:clean #:enforce) file-change-time ((or string fixnum)) number))
+(file-access-time (#(procedure #:clean #:enforce) file-access-time ((or string fixnum)) integer))
+(file-change-time (#(procedure #:clean #:enforce) file-change-time ((or string fixnum)) integer))
(file-close (#(procedure #:clean #:enforce) file-close (fixnum) undefined))
(file-control (#(procedure #:clean #:enforce) file-control (fixnum fixnum #!optional fixnum) fixnum))
(file-creation-mode (#(procedure #:clean #:enforce) file-creation-mode (#!optional fixnum) fixnum))
(file-execute-access? (#(procedure #:clean #:enforce) file-execute-access? (string) boolean))
(file-link (#(procedure #:clean #:enforce) file-link (string string) undefined))
-(file-lock (#(procedure #:clean #:enforce) file-lock (port #!optional fixnum *) (struct lock)))
-(file-lock/blocking (#(procedure #:clean #:enforce) file-lock/blocking (port #!optional fixnum *) (struct lock)))
+(file-lock (#(procedure #:clean #:enforce) file-lock (port #!optional fixnum integer) (struct lock)))
+(file-lock/blocking (#(procedure #:clean #:enforce) file-lock/blocking (port #!optional fixnum integer) (struct lock)))
(file-mkstemp (#(procedure #:clean #:enforce) file-mkstemp (string) fixnum string))
-(file-modification-time (#(procedure #:clean #:enforce) file-modification-time ((or string fixnum)) number))
+(file-modification-time (#(procedure #:clean #:enforce) file-modification-time ((or string fixnum)) integer))
(file-open (#(procedure #:clean #:enforce) file-open (string fixnum #!optional fixnum) fixnum))
(file-owner (#(procedure #:clean #:enforce) file-owner ((or string fixnum)) fixnum))
(file-permissions (#(procedure #:clean #:enforce) file-permissions ((or string fixnum)) fixnum))
-(file-position (#(procedure #:clean #:enforce) file-position ((or port fixnum)) fixnum))
+(file-position (#(procedure #:clean #:enforce) file-position ((or port fixnum)) integer))
(file-read (#(procedure #:clean #:enforce) file-read (fixnum fixnum #!optional *) list))
(file-read-access? (#(procedure #:clean #:enforce) file-read-access? (string) boolean))
(file-select (#(procedure #:clean #:enforce) file-select ((or (list-of fixnum) fixnum false) (or (list-of fixnum) fixnum false) #!optional fixnum) * *))
-(file-size (#(procedure #:clean #:enforce) file-size ((or string fixnum)) number))
-(file-stat (#(procedure #:clean #:enforce) file-stat ((or string fixnum) #!optional *) (vector-of number)))
+(file-size (#(procedure #:clean #:enforce) file-size ((or string fixnum)) integer))
+(file-stat (#(procedure #:clean #:enforce) file-stat ((or string fixnum) #!optional *) (vector-of integer)))
(file-test-lock (#(procedure #:clean #:enforce) file-test-lock (port #!optional fixnum *) boolean))
-(file-truncate (#(procedure #:clean #:enforce) file-truncate ((or string fixnum) fixnum) undefined))
+(file-truncate (#(procedure #:clean #:enforce) file-truncate ((or string fixnum) integer) undefined))
(file-type (#(procedure #:clean #:enforce) ((or string fixnum) #!optional * *) symbol))
(file-unlock (#(procedure #:clean #:enforce) file-unlock ((struct lock)) undefined))
(file-write (#(procedure #:clean #:enforce) file-write (fixnum * #!optional fixnum) fixnum))
@@ -1887,7 +1887,7 @@
(glob (#(procedure #:clean #:enforce) glob (#!rest string) list))
(group-information (#(procedure #:clean #:enforce) group-information (fixnum #!optional *) *))
(initialize-groups (#(procedure #:clean #:enforce) initialize-groups (string fixnum) undefined))
-(local-time->seconds (#(procedure #:clean #:enforce) local-time->seconds ((vector fixnum fixnum fixnum fixnum fixnum fixnum fixnum fixnum boolean fixnum)) number))
+(local-time->seconds (#(procedure #:clean #:enforce) local-time->seconds ((vector fixnum fixnum fixnum fixnum fixnum fixnum fixnum fixnum boolean fixnum)) integer))
(local-timezone-abbreviation (#(procedure #:clean) local-timezone-abbreviation () string))
(open-input-file* (#(procedure #:clean #:enforce) open-input-file* (fixnum #!optional symbol) input-port))
(open-input-pipe (#(procedure #:clean #:enforce) open-input-pipe (string #!optional symbol) input-port))
@@ -1940,15 +1940,15 @@
(process-wait (#(procedure #:clean #:enforce) process-wait (#!optional fixnum *) fixnum fixnum fixnum))
(read-symbolic-link (#(procedure #:clean #:enforce) read-symbolic-link (string #!optional boolean) string))
(regular-file? (#(procedure #:clean #:enforce) regular-file? ((or string fixnum)) boolean))
-(seconds->local-time (#(procedure #:clean #:enforce) seconds->local-time (#!optional number) (vector fixnum fixnum fixnum fixnum fixnum fixnum fixnum fixnum boolean fixnum)))
-(seconds->string (#(procedure #:clean #:enforce) seconds->string (#!optional number) string))
-(seconds->utc-time (#(procedure #:clean #:enforce) seconds->utc-time (#!optional number) (vector fixnum fixnum fixnum fixnum fixnum fixnum fixnum fixnum boolean fixnum)))
+(seconds->local-time (#(procedure #:clean #:enforce) seconds->local-time (#!optional integer) (vector fixnum fixnum fixnum fixnum fixnum fixnum fixnum fixnum boolean fixnum)))
+(seconds->string (#(procedure #:clean #:enforce) seconds->string (#!optional integer) string))
+(seconds->utc-time (#(procedure #:clean #:enforce) seconds->utc-time (#!optional integer) (vector fixnum fixnum fixnum fixnum fixnum fixnum fixnum fixnum boolean fixnum)))
(seek/cur fixnum)
(seek/end fixnum)
(seek/set fixnum)
-(set-alarm! (#(procedure #:clean #:enforce) set-alarm! (number) number))
+(set-alarm! (#(procedure #:clean #:enforce) set-alarm! (integer) integer))
(set-buffering-mode! (#(procedure #:clean #:enforce) set-buffering-mode! (port symbol #!optional fixnum) undefined))
-(set-file-position! (#(procedure #:clean #:enforce) set-file-position! ((or port fixnum) fixnum #!optional fixnum) undefined))
+(set-file-position! (#(procedure #:clean #:enforce) set-file-position! ((or port fixnum) integer #!optional fixnum) undefined))
(set-groups! (#(procedure #:clean #:enforce) set-groups! ((list-of fixnum)) undefined))
(set-root-directory! (#(procedure #:clean #:enforce) set-root-directory! (string) undefined))
(set-signal-handler! (#(procedure #:clean #:enforce) set-signal-handler! (fixnum (or false (procedure (fixnum) . *))) undefined))
@@ -2001,7 +2001,7 @@
(unmap-file-from-memory (#(procedure #:clean #:enforce) unmap-file-from-memory ((struct mmap) #!optional fixnum) undefined))
(unsetenv (#(procedure #:clean #:enforce) unsetenv (string) undefined))
(user-information (#(procedure #:clean #:enforce) user-information ((or string fixnum) #!optional *) *))
-(utc-time->seconds (#(procedure #:clean #:enforce) utc-time->seconds ((vector fixnum fixnum fixnum fixnum fixnum fixnum fixnum fixnum boolean fixnum)) number))
+(utc-time->seconds (#(procedure #:clean #:enforce) utc-time->seconds ((vector fixnum fixnum fixnum fixnum fixnum fixnum fixnum fixnum boolean fixnum)) integer))
(with-input-from-pipe (#(procedure #:enforce) with-input-from-pipe (string (procedure () . *) #!optional symbol) . *))
(with-output-to-pipe (#(procedure #:enforce) with-output-to-pipe (string (procedure () . *) #!optional symbol) . *))
@@ -2184,12 +2184,12 @@
(tcp-abandon-port (#(procedure #:clean #:enforce) tcp-abandon-port (port) undefined))
(tcp-accept (#(procedure #:clean #:enforce) tcp-accept ((struct tcp-listener)) input-port output-port))
(tcp-accept-ready? (#(procedure #:clean #:enforce) tcp-accept-ready? ((struct tcp-listener)) boolean))
-(tcp-accept-timeout (#(procedure #:clean #:enforce) tcp-accept-timeout (#!optional (or false number)) (or false number)))
+(tcp-accept-timeout (#(procedure #:clean #:enforce) tcp-accept-timeout (#!optional (or false integer)) (or false integer)))
(tcp-addresses (#(procedure #:clean #:enforce) tcp-addresses (port) string string))
(tcp-buffer-size (#(procedure #:clean #:enforce) tcp-buffer-size (#!optional fixnum) fixnum))
(tcp-close (#(procedure #:clean #:enforce) tcp-close ((struct tcp-listener)) undefined))
(tcp-connect (#(procedure #:clean #:enforce) tcp-connect (string #!optional fixnum) input-port output-port))
-(tcp-connect-timeout (#(procedure #:clean #:enforce) tcp-connect-timeout (#!optional (or false number)) (or false number)))
+(tcp-connect-timeout (#(procedure #:clean #:enforce) tcp-connect-timeout (#!optional (or false integer)) (or false integer)))
(tcp-listen (#(procedure #:clean #:enforce) tcp-listen (fixnum #!optional fixnum *) (struct tcp-listener)))
(tcp-listener-fileno (#(procedure #:clean #:enforce) tcp-listener-fileno ((struct tcp-listener)) fixnum)
@@ -2200,8 +2200,8 @@
(tcp-listener? (#(procedure #:clean #:predicate (struct tcp-listener)) tcp-listener? (*) boolean))
(tcp-port-numbers (#(procedure #:clean #:enforce) tcp-port-numbers (port) fixnum fixnum))
-(tcp-read-timeout (#(procedure #:clean #:enforce) tcp-read-timeout (#!optional (or false number)) (or false number)))
-(tcp-write-timeout (#(procedure #:clean #:enforce) tcp-write-timeout (#!optional (or false number)) (or false number)))
+(tcp-read-timeout (#(procedure #:clean #:enforce) tcp-read-timeout (#!optional (or false integer)) (or false integer)))
+(tcp-write-timeout (#(procedure #:clean #:enforce) tcp-write-timeout (#!optional (or false integer)) (or false integer)))
;; utils
Trap