guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/03: syscalls: Adjust 'define-bits' to macro literal semantics of 2.2.


From: Ludovic Courtès
Subject: 03/03: syscalls: Adjust 'define-bits' to macro literal semantics of 2.2.
Date: Sun, 12 Mar 2017 12:47:41 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 334c95306a298803096a0077c892d69473ad0824
Author: Ludovic Courtès <address@hidden>
Date:   Sun Mar 12 17:35:32 2017 +0100

    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.
---
 guix/build/syscalls.scm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm
index b68c48a..58c23f2 100644
--- a/guix/build/syscalls.scm
+++ b/guix/build/syscalls.scm
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]