X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests%2Ftime.lisp;h=cccd0b40f80421aa319a6ae294099a470906e0cc;hb=3f02f80ce6909ada82d9791172821756f967a844;hp=24a3af205c0d9483497a687a106db3049d37d3f1;hpb=218088774006bd9df58df318a6b3981065dfc71f;p=uffi.git diff --git a/tests/time.lisp b/tests/time.lisp index 24a3af2..cccd0b4 100644 --- a/tests/time.lisp +++ b/tests/time.lisp @@ -26,7 +26,9 @@ (year :int) (wday :int) (yday :int) - (isdst :int)) + (isdst :int) + ;; gmoffset present on SusE SLES9 + (gmoffset :long)) (uffi:def-function ("time" c-time) ((time (* time-t))) @@ -50,16 +52,16 @@ 7381) (deftest time.2 - (uffi:with-foreign-object (time 'time-t) - (setf (uffi:deref-pointer time :unsigned-long) 7381) - (let ((tm-ptr (the tm-pointer (gmtime time)))) - (values (1+ (uffi:get-slot-value tm-ptr 'tm 'mon)) - (uffi:get-slot-value tm-ptr 'tm 'mday) - (+ 1900 (uffi:get-slot-value tm-ptr 'tm 'year)) - (uffi:get-slot-value tm-ptr 'tm 'hour) - (uffi:get-slot-value tm-ptr 'tm 'min) - (uffi:get-slot-value tm-ptr 'tm 'sec) - ))) + (uffi:with-foreign-object (time 'time-t) + (setf (uffi:deref-pointer time :unsigned-long) 7381) + (let ((tm-ptr (the tm-pointer (gmtime time)))) + (values (1+ (uffi:get-slot-value tm-ptr 'tm 'mon)) + (uffi:get-slot-value tm-ptr 'tm 'mday) + (+ 1900 (uffi:get-slot-value tm-ptr 'tm 'year)) + (uffi:get-slot-value tm-ptr 'tm 'hour) + (uffi:get-slot-value tm-ptr 'tm 'min) + (uffi:get-slot-value tm-ptr 'tm 'sec) + ))) 1 1 1970 2 3 1)