>>>>> On Thu, 23 Feb 2006 00:07:43 +0530, "N. Raghavendra" <[EMAIL PROTECTED]> >>>>> said: > > I hope this is not OT. I am trying to learn to use CFFI. Following > the CFFI manual, I wrote the following functions, which call some > basic C time functions. According to gmtime(3), the function `gmtoff' > below should always return 0. However, I consistently get > > TIMEZONE-FFI> (gmtoff) > 672421260 > > I would appreciate any hints as to where I am erring. In case it is > relevant, the environment is CMUCL 19c on FreeBSD 6.0-STABLE. > > TIA, > Raghavendra. > > --- code follows --- > > (defpackage #:timezone-ffi > (:use #:common-lisp > #:cffi)) > > (in-package #:timezone-ffi) > > (defcstruct tm > (sec :int) > (min :int) > (hour :int) > (mday :int) > (mon :int) > (year :int) > (wday :int) > (yday :int) > (isdst :boolean) > (zone :string) > (gmtoff :long))
I think you have zone and gmtoff in the wrong order (the man pages don't specify the order, so check the header files). __Martin _______________________________________________ cffi-devel mailing list cffi-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel