diff --git a/scsh/cygwin32/time_dep1.c b/scsh/cygwin32/time_dep1.c index 77fbbfc..0b52fdb 100644 --- a/scsh/cygwin32/time_dep1.c +++ b/scsh/cygwin32/time_dep1.c @@ -16,9 +16,23 @@ s48_value time_plus_ticks() { struct timeval t; struct timezone tz; - + s48_value sch_tv_sec = S48_UNSPECIFIC; + s48_value sch_tv_usec = S48_UNSPECIFIC; + s48_value sch_listval = S48_UNSPECIFIC; + s48_value sch_retval + S48_DECLARE_GC_PROTECT(3); + if( gettimeofday(&t, &tz) ) s48_raise_os_error (errno); - return s48_cons (s48_enter_integer (t.tv_sec), - s48_cons (s48_enter_integer (t.tv_usec), S48_NULL)); + S48_GC_PROTECT_3(sch_tv_sec, sch_tv_usec, sch_listval); + + sch_tv_sec = s48_enter_integer(t.tv_sec); + sch_tv_usec = s48_enter_integer(t.tv_usec); + sch_listval = s48_cons (sch_tv_usec, S48_NULL); + sch_retval = s48_cons (sch_tv_sec, sch_listval); + + S48_GC_UNPROTECT; + + return sch_retval; + } diff --git a/scsh/generic/time_dep1.c b/scsh/generic/time_dep1.c index 77fbbfc..0b52fdb 100644 --- a/scsh/generic/time_dep1.c +++ b/scsh/generic/time_dep1.c @@ -16,9 +16,23 @@ s48_value time_plus_ticks() { struct timeval t; struct timezone tz; - + s48_value sch_tv_sec = S48_UNSPECIFIC; + s48_value sch_tv_usec = S48_UNSPECIFIC; + s48_value sch_listval = S48_UNSPECIFIC; + s48_value sch_retval + S48_DECLARE_GC_PROTECT(3); + if( gettimeofday(&t, &tz) ) s48_raise_os_error (errno); - return s48_cons (s48_enter_integer (t.tv_sec), - s48_cons (s48_enter_integer (t.tv_usec), S48_NULL)); + S48_GC_PROTECT_3(sch_tv_sec, sch_tv_usec, sch_listval); + + sch_tv_sec = s48_enter_integer(t.tv_sec); + sch_tv_usec = s48_enter_integer(t.tv_usec); + sch_listval = s48_cons (sch_tv_usec, S48_NULL); + sch_retval = s48_cons (sch_tv_sec, sch_listval); + + S48_GC_UNPROTECT; + + return sch_retval; + } diff --git a/scsh/hpux/time_dep1.c b/scsh/hpux/time_dep1.c index 77fbbfc..0b52fdb 100644 --- a/scsh/hpux/time_dep1.c +++ b/scsh/hpux/time_dep1.c @@ -16,9 +16,23 @@ s48_value time_plus_ticks() { struct timeval t; struct timezone tz; - + s48_value sch_tv_sec = S48_UNSPECIFIC; + s48_value sch_tv_usec = S48_UNSPECIFIC; + s48_value sch_listval = S48_UNSPECIFIC; + s48_value sch_retval + S48_DECLARE_GC_PROTECT(3); + if( gettimeofday(&t, &tz) ) s48_raise_os_error (errno); - return s48_cons (s48_enter_integer (t.tv_sec), - s48_cons (s48_enter_integer (t.tv_usec), S48_NULL)); + S48_GC_PROTECT_3(sch_tv_sec, sch_tv_usec, sch_listval); + + sch_tv_sec = s48_enter_integer(t.tv_sec); + sch_tv_usec = s48_enter_integer(t.tv_usec); + sch_listval = s48_cons (sch_tv_usec, S48_NULL); + sch_retval = s48_cons (sch_tv_sec, sch_listval); + + S48_GC_UNPROTECT; + + return sch_retval; + } diff --git a/scsh/irix/time_dep1.c b/scsh/irix/time_dep1.c index 77fbbfc..0b52fdb 100644 --- a/scsh/irix/time_dep1.c +++ b/scsh/irix/time_dep1.c @@ -16,9 +16,23 @@ s48_value time_plus_ticks() { struct timeval t; struct timezone tz; - + s48_value sch_tv_sec = S48_UNSPECIFIC; + s48_value sch_tv_usec = S48_UNSPECIFIC; + s48_value sch_listval = S48_UNSPECIFIC; + s48_value sch_retval + S48_DECLARE_GC_PROTECT(3); + if( gettimeofday(&t, &tz) ) s48_raise_os_error (errno); - return s48_cons (s48_enter_integer (t.tv_sec), - s48_cons (s48_enter_integer (t.tv_usec), S48_NULL)); + S48_GC_PROTECT_3(sch_tv_sec, sch_tv_usec, sch_listval); + + sch_tv_sec = s48_enter_integer(t.tv_sec); + sch_tv_usec = s48_enter_integer(t.tv_usec); + sch_listval = s48_cons (sch_tv_usec, S48_NULL); + sch_retval = s48_cons (sch_tv_sec, sch_listval); + + S48_GC_UNPROTECT; + + return sch_retval; + } diff --git a/scsh/linux/time_dep1.c b/scsh/linux/time_dep1.c index 77fbbfc..0b52fdb 100644 --- a/scsh/linux/time_dep1.c +++ b/scsh/linux/time_dep1.c @@ -16,9 +16,23 @@ s48_value time_plus_ticks() { struct timeval t; struct timezone tz; - + s48_value sch_tv_sec = S48_UNSPECIFIC; + s48_value sch_tv_usec = S48_UNSPECIFIC; + s48_value sch_listval = S48_UNSPECIFIC; + s48_value sch_retval + S48_DECLARE_GC_PROTECT(3); + if( gettimeofday(&t, &tz) ) s48_raise_os_error (errno); - return s48_cons (s48_enter_integer (t.tv_sec), - s48_cons (s48_enter_integer (t.tv_usec), S48_NULL)); + S48_GC_PROTECT_3(sch_tv_sec, sch_tv_usec, sch_listval); + + sch_tv_sec = s48_enter_integer(t.tv_sec); + sch_tv_usec = s48_enter_integer(t.tv_usec); + sch_listval = s48_cons (sch_tv_usec, S48_NULL); + sch_retval = s48_cons (sch_tv_sec, sch_listval); + + S48_GC_UNPROTECT; + + return sch_retval; + } diff --git a/scsh/next/time_dep1.c b/scsh/next/time_dep1.c index 77fbbfc..0b52fdb 100644 --- a/scsh/next/time_dep1.c +++ b/scsh/next/time_dep1.c @@ -16,9 +16,23 @@ s48_value time_plus_ticks() { struct timeval t; struct timezone tz; - + s48_value sch_tv_sec = S48_UNSPECIFIC; + s48_value sch_tv_usec = S48_UNSPECIFIC; + s48_value sch_listval = S48_UNSPECIFIC; + s48_value sch_retval + S48_DECLARE_GC_PROTECT(3); + if( gettimeofday(&t, &tz) ) s48_raise_os_error (errno); - return s48_cons (s48_enter_integer (t.tv_sec), - s48_cons (s48_enter_integer (t.tv_usec), S48_NULL)); + S48_GC_PROTECT_3(sch_tv_sec, sch_tv_usec, sch_listval); + + sch_tv_sec = s48_enter_integer(t.tv_sec); + sch_tv_usec = s48_enter_integer(t.tv_usec); + sch_listval = s48_cons (sch_tv_usec, S48_NULL); + sch_retval = s48_cons (sch_tv_sec, sch_listval); + + S48_GC_UNPROTECT; + + return sch_retval; + } diff --git a/scsh/solaris/time_dep1.c b/scsh/solaris/time_dep1.c index 77fbbfc..0b52fdb 100644 --- a/scsh/solaris/time_dep1.c +++ b/scsh/solaris/time_dep1.c @@ -16,9 +16,23 @@ s48_value time_plus_ticks() { struct timeval t; struct timezone tz; - + s48_value sch_tv_sec = S48_UNSPECIFIC; + s48_value sch_tv_usec = S48_UNSPECIFIC; + s48_value sch_listval = S48_UNSPECIFIC; + s48_value sch_retval + S48_DECLARE_GC_PROTECT(3); + if( gettimeofday(&t, &tz) ) s48_raise_os_error (errno); - return s48_cons (s48_enter_integer (t.tv_sec), - s48_cons (s48_enter_integer (t.tv_usec), S48_NULL)); + S48_GC_PROTECT_3(sch_tv_sec, sch_tv_usec, sch_listval); + + sch_tv_sec = s48_enter_integer(t.tv_sec); + sch_tv_usec = s48_enter_integer(t.tv_usec); + sch_listval = s48_cons (sch_tv_usec, S48_NULL); + sch_retval = s48_cons (sch_tv_sec, sch_listval); + + S48_GC_UNPROTECT; + + return sch_retval; + } diff --git a/scsh/sunos/time_dep1.c b/scsh/sunos/time_dep1.c index 77fbbfc..0b52fdb 100644 --- a/scsh/sunos/time_dep1.c +++ b/scsh/sunos/time_dep1.c @@ -16,9 +16,23 @@ s48_value time_plus_ticks() { struct timeval t; struct timezone tz; - + s48_value sch_tv_sec = S48_UNSPECIFIC; + s48_value sch_tv_usec = S48_UNSPECIFIC; + s48_value sch_listval = S48_UNSPECIFIC; + s48_value sch_retval + S48_DECLARE_GC_PROTECT(3); + if( gettimeofday(&t, &tz) ) s48_raise_os_error (errno); - return s48_cons (s48_enter_integer (t.tv_sec), - s48_cons (s48_enter_integer (t.tv_usec), S48_NULL)); + S48_GC_PROTECT_3(sch_tv_sec, sch_tv_usec, sch_listval); + + sch_tv_sec = s48_enter_integer(t.tv_sec); + sch_tv_usec = s48_enter_integer(t.tv_usec); + sch_listval = s48_cons (sch_tv_usec, S48_NULL); + sch_retval = s48_cons (sch_tv_sec, sch_listval); + + S48_GC_UNPROTECT; + + return sch_retval; + } diff --git a/scsh/ultrix/time_dep1.c b/scsh/ultrix/time_dep1.c index 77fbbfc..0b52fdb 100644 --- a/scsh/ultrix/time_dep1.c +++ b/scsh/ultrix/time_dep1.c @@ -16,9 +16,23 @@ s48_value time_plus_ticks() { struct timeval t; struct timezone tz; - + s48_value sch_tv_sec = S48_UNSPECIFIC; + s48_value sch_tv_usec = S48_UNSPECIFIC; + s48_value sch_listval = S48_UNSPECIFIC; + s48_value sch_retval + S48_DECLARE_GC_PROTECT(3); + if( gettimeofday(&t, &tz) ) s48_raise_os_error (errno); - return s48_cons (s48_enter_integer (t.tv_sec), - s48_cons (s48_enter_integer (t.tv_usec), S48_NULL)); + S48_GC_PROTECT_3(sch_tv_sec, sch_tv_usec, sch_listval); + + sch_tv_sec = s48_enter_integer(t.tv_sec); + sch_tv_usec = s48_enter_integer(t.tv_usec); + sch_listval = s48_cons (sch_tv_usec, S48_NULL); + sch_retval = s48_cons (sch_tv_sec, sch_listval); + + S48_GC_UNPROTECT; + + return sch_retval; + }