Skip to content

Instantly share code, notes, and snippets.

@nyuichi
Created January 11, 2015 01:25
Show Gist options
  • Select an option

  • Save nyuichi/5d465f36b233a9abf249 to your computer and use it in GitHub Desktop.

Select an option

Save nyuichi/5d465f36b233a9abf249 to your computer and use it in GitHub Desktop.
(import (picrin foreign))
(define libm (foreign-library "libm.so.6"))
(define cosh (foreign-function libm "cosh" (list double) double))
(define sinh (foreign-function libm "sinh" (list double) double))
(define libc (foreign-library "libc.so.6"))
(define tm (foreign-struct int 'tm_sec
int 'tm_min
int 'tm_hour
int 'tm_mday
int 'tm_mon
int 'tm_year
int 'tm_wday
int 'tm_yday
int 'tm_isdst))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment