[Ecls-list] Patch for segfault in time computation

Goffioul Michael goffioul at imec.be
Thu Nov 17 05:29:02 UTC 2005


Index: src/lsp/mislib.lsp
===================================================================
RCS file: /cvsroot/ecls/ecls/src/lsp/mislib.lsp,v
retrieving revision 1.20
diff -u -3 -p -r1.20 mislib.lsp
--- src/lsp/mislib.lsp  15 Nov 2005 19:12:45 -0000      1.20
+++ src/lsp/mislib.lsp  17 Nov 2005 13:26:50 -0000
@@ -189,14 +189,14 @@ Universal Time UT, which defaults to the
                 (+ (if (leap-year-p year)
                        #.(encode-universal-time 0 0 0 1 1 1980 0)
                        #.(encode-universal-time 0 0 0 1 1 1981 0))
-                   (- universal-time (encode-universal-time 0 0 0 1 1 year 0)))))
+                   (- universal-time (encode-universal-time 0 0 0 1 1 year 0) utc-1-1-1970))))
          ((not (fixnump unix-time))
           ;; Same if date is too big: we shift to year 2035/36, like SBCL does.
           (setf unix-time
                 (+ (if (leap-year-p year)
                        #.(encode-universal-time 0 0 0 1 1 2032 0)
                        #.(encode-universal-time 0 0 0 1 1 2033 0))
-                   (- universal-time (encode-universal-time 0 0 0 1 1 year 0))))))
+                   (- universal-time (encode-universal-time 0 0 0 1 1 year 0) utc-1-1-1970)))))
     #-ecl-min
     (ffi::c-inline (unix-time) (:unsigned-long) :bool "
 {

OK to commit?

Michael.




More information about the ecl-devel mailing list