From 1438d6e87c61af53e798554b0e4de2b2baa9f523 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Sat, 16 Feb 2019 12:31:20 -0700 Subject: [PATCH] mcrypt/make.scm: Use (runtime crypto)'s mcrypt-link!. This eliminates a redundant list of symbols and ensures consistency with (runtime crypto)'s bindings. Improved both mcrypt's and x11's forward compatibility by making the backward compatibility links conditional. --- src/mcrypt/make.scm | 25 ++----------------------- src/x11/make.scm | 4 +++- 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/src/mcrypt/make.scm b/src/mcrypt/make.scm index c164cb9a9..d7c0250c4 100644 --- a/src/mcrypt/make.scm +++ b/src/mcrypt/make.scm @@ -8,26 +8,5 @@ (add-subsystem-identification! "mcrypt" '(1 0 2)) -;; "Export" these to the (runtime crypto) package bindings. -(let ((crypto (->environment '(runtime crypto))) - (mcrypt (->environment '(mcrypt)))) - (for-each - (lambda (name) - (environment-assign! crypto name (environment-lookup mcrypt name))) - '(mcrypt-algorithm-name - mcrypt-algorithm-names - mcrypt-block-algorithm-mode? - mcrypt-block-algorithm? - mcrypt-block-mode? - mcrypt-context? - mcrypt-encrypt - mcrypt-encrypt-port - mcrypt-end - mcrypt-init - mcrypt-init-vector-size - mcrypt-key-size - mcrypt-mode-name - mcrypt-mode-names - mcrypt-open-module - mcrypt-self-test - mcrypt-supported-key-sizes))) \ No newline at end of file +(if (name->package '(runtime crypto)) + ((access mcrypt-link! (->environment '(runtime crypto))))) \ No newline at end of file diff --git a/src/x11/make.scm b/src/x11/make.scm index c8b6ce278..278bd0e92 100644 --- a/src/x11/make.scm +++ b/src/x11/make.scm @@ -5,6 +5,8 @@ Load the X11 option. |# (with-loader-base-uri (system-library-uri "x11/") (lambda () (load-package-set "x11"))) + (add-subsystem-identification! "X11" '(1 3 1)) -((access link! (->environment '(runtime x-graphics)))) \ No newline at end of file +(if (name->package '(runtime x-graphics)) + ((access link! (->environment '(runtime x-graphics))))) \ No newline at end of file -- 2.25.1