diff options
author | Ludovic Courtès <ludo@gnu.org> | 2010-09-10 11:50:06 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2010-09-10 11:50:06 +0000 |
commit | 7ff37213b777c9185b13918b9b976400f7bc1373 (patch) | |
tree | 6ad54b2114d483cd1cdc864c8f93b99959b336fb /maintainers | |
parent | 6d1f24764610dc4fc5ac72f8a4ec4d51a40641b9 (diff) |
gnupdate: Update to new FFI.
* maintainers/scripts/gnu/gnupdate (pointer->procedure): New procedure. svn path=/nixpkgs/trunk/; revision=23712
Diffstat (limited to 'maintainers')
-rwxr-xr-x | maintainers/scripts/gnu/gnupdate | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/maintainers/scripts/gnu/gnupdate b/maintainers/scripts/gnu/gnupdate index b9f34a2750e39..159e45fce10c6 100755 --- a/maintainers/scripts/gnu/gnupdate +++ b/maintainers/scripts/gnu/gnupdate @@ -619,11 +619,17 @@ exec ${GUILE-guile} -L "$PWD" -l "$0" \ 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>? (let ((strverscmp (let ((sym (or (dynamic-func "strverscmp" (dynamic-link)) (error "could not find `strverscmp' (from GNU libc)")))) - (make-foreign-function int sym (list '* '*))))) + (pointer->procedure int sym (list '* '*))))) (lambda (a b) (> (strverscmp (string->pointer a) (string->pointer b)) 0)))) |