mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-24 12:20:20 +02:00
‘seek’ now accepts ‘SEEK_DATA’ and ‘SEEK_HOLE’ where supported.
* libguile/ports.c (scm_seek): Let SEEK_DATA and SEEK_HOLE through. (scm_init_ice_9_ports): Define ‘SEEK_DATA’ and ‘SEEK_HOLE’. * module/ice-9/ports.scm: Export ‘SEEK_DATA’ and ‘SEEK_HOLE’ when defined. * test-suite/tests/ports.test ("size of sparse file") ("SEEK_DATA while on data", "SEEK_DATA while in hole") ("SEEK_HOLE while in hole"): New tests. * NEWS: Update.
This commit is contained in:
parent
4a0c2433d9
commit
696acfc9e5
5 changed files with 119 additions and 10 deletions
|
@ -1,5 +1,5 @@
|
|||
;;; Ports
|
||||
;;; Copyright (C) 2016,2019,2021 Free Software Foundation, Inc.
|
||||
;;; Copyright (C) 2016,2019,2021,2024 Free Software Foundation, Inc.
|
||||
;;;
|
||||
;;; This library is free software: you can redistribute it and/or modify
|
||||
;;; it under the terms of the GNU Lesser General Public License as
|
||||
|
@ -153,6 +153,12 @@
|
|||
(load-extension (string-append "libguile-" (effective-version))
|
||||
"scm_init_ice_9_ioext")
|
||||
|
||||
(eval-when (load eval expand)
|
||||
(when (defined? 'SEEK_DATA)
|
||||
(module-export! (current-module) '(SEEK_DATA)))
|
||||
(when (defined? 'SEEK_HOLE)
|
||||
(module-export! (current-module) '(SEEK_HOLE))))
|
||||
|
||||
|
||||
|
||||
(define (port-encoding port)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue