~ruther/guix-local

334c95306a298803096a0077c892d69473ad0824 — Ludovic Courtès 9 years ago 239c226
syscalls: Adjust 'define-bits' to macro literal semantics of 2.2.

* guix/build/syscalls.scm (define-bits): Do not define NAMES... as
top-level variables since that prevents literal matches in 2.2.
Instead, determine constant values at expansion time.
1 files changed, 4 insertions(+), 4 deletions(-)

M guix/build/syscalls.scm
M guix/build/syscalls.scm => guix/build/syscalls.scm +4 -4
@@ 1346,12 1346,12 @@ given an integer, returns the list of names of the constants that are or'd."
     (begin
       (define-syntax constructor
         (syntax-rules (names ...)
           ((_) 0)
           ((_ names) values) ...
           ((_ several (... ...))
            (logior (constructor several) (... ...)))))
           ((_ first rest (... ...))
            (logior (constructor first) rest (... ...)))))
       (define (bits->symbols bits)
         (bits->symbols-body bits (names ...) (values ...)))
       (define names values) ...))))
         (bits->symbols-body bits (names ...) (values ...)))))))

;; 'local-flags' bits from <bits/termios.h>
(define-bits local-flags