Fix named pipes to work with new (foreign c) version
This commit is contained in:
parent
83d3957718
commit
572cbe17ad
|
|
@ -74,20 +74,20 @@
|
||||||
O_WRONLY+O_NONBLOCK+O_CREAT
|
O_WRONLY+O_NONBLOCK+O_CREAT
|
||||||
O_WRONLY+O_CREAT))))))
|
O_WRONLY+O_CREAT))))))
|
||||||
|
|
||||||
(define pipe-read-u8-buffer (make-c-bytevector (c-type-size 'uint8)))
|
(define pipe-read-u8-buffer (make-c-bytevector (c-type-size 'u8)))
|
||||||
(define pipe-read-u8
|
(define pipe-read-u8
|
||||||
(lambda (pipe)
|
(lambda (pipe)
|
||||||
(when (not (input-pipe? pipe))
|
(when (not (input-pipe? pipe))
|
||||||
(error "Can only read from input-pipe" pipe))
|
(error "Can only read from input-pipe" pipe))
|
||||||
(let* ((read-count (c-read (input-file-descriptor pipe)
|
(let* ((read-count (c-read (input-file-descriptor pipe)
|
||||||
pipe-read-u8-buffer
|
pipe-read-u8-buffer
|
||||||
(c-type-size 'uint8)))
|
(c-type-size 'u8)))
|
||||||
(byte (if (> read-count 0)
|
(byte (if (> read-count 0)
|
||||||
(c-bytevector-u8-ref pipe-read-u8-buffer 0)
|
(c-bytevector-u8-ref pipe-read-u8-buffer 0)
|
||||||
(eof-object))))
|
(eof-object))))
|
||||||
byte)))
|
byte)))
|
||||||
|
|
||||||
(define pipe-write-u8-buffer (make-c-bytevector (c-type-size 'uint8)))
|
(define pipe-write-u8-buffer (make-c-bytevector (c-type-size 'u8)))
|
||||||
(define pipe-write-u8
|
(define pipe-write-u8
|
||||||
(lambda (byte pipe)
|
(lambda (byte pipe)
|
||||||
(when (not (output-pipe? pipe))
|
(when (not (output-pipe? pipe))
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
1.0.0
|
1.0.1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue