mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 13:57:10 +03:00
gnupdate: Update to new FFI.
* maintainers/scripts/gnu/gnupdate (pointer->procedure): New procedure. svn path=/nixpkgs/trunk/; revision=23712
This commit is contained in:
parent
6d1f247646
commit
7ff37213b7
@ -619,11 +619,17 @@ exec ${GUILE-guile} -L "$PWD" -l "$0" \
|
|||||||
project message args)
|
project message args)
|
||||||
'())))
|
'())))
|
||||||
|
|
||||||
|
(define pointer->procedure
|
||||||
|
;; Compatibility hack for Guile up to 1.9.12 included.
|
||||||
|
(if (defined? 'pointer->procedure)
|
||||||
|
pointer->procedure
|
||||||
|
make-foreign-function))
|
||||||
|
|
||||||
(define version-string>?
|
(define version-string>?
|
||||||
(let ((strverscmp
|
(let ((strverscmp
|
||||||
(let ((sym (or (dynamic-func "strverscmp" (dynamic-link))
|
(let ((sym (or (dynamic-func "strverscmp" (dynamic-link))
|
||||||
(error "could not find `strverscmp' (from GNU libc)"))))
|
(error "could not find `strverscmp' (from GNU libc)"))))
|
||||||
(make-foreign-function int sym (list '* '*)))))
|
(pointer->procedure int sym (list '* '*)))))
|
||||||
(lambda (a b)
|
(lambda (a b)
|
||||||
(> (strverscmp (string->pointer a) (string->pointer b)) 0))))
|
(> (strverscmp (string->pointer a) (string->pointer b)) 0))))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user