mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-18 17:01:51 -05:00
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.
This commit is contained in:
parent
239c22663a
commit
334c95306a
1 changed files with 4 additions and 4 deletions
|
@ -1346,12 +1346,12 @@ (define-syntax define-bits
|
||||||
(begin
|
(begin
|
||||||
(define-syntax constructor
|
(define-syntax constructor
|
||||||
(syntax-rules (names ...)
|
(syntax-rules (names ...)
|
||||||
|
((_) 0)
|
||||||
((_ names) values) ...
|
((_ names) values) ...
|
||||||
((_ several (... ...))
|
((_ first rest (... ...))
|
||||||
(logior (constructor several) (... ...)))))
|
(logior (constructor first) rest (... ...)))))
|
||||||
(define (bits->symbols bits)
|
(define (bits->symbols bits)
|
||||||
(bits->symbols-body bits (names ...) (values ...)))
|
(bits->symbols-body bits (names ...) (values ...)))))))
|
||||||
(define names values) ...))))
|
|
||||||
|
|
||||||
;; 'local-flags' bits from <bits/termios.h>
|
;; 'local-flags' bits from <bits/termios.h>
|
||||||
(define-bits local-flags
|
(define-bits local-flags
|
||||||
|
|
Loading…
Reference in a new issue