unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Matt Wette <matt.wette@gmail.com>
To: 27782@debbugs.gnu.org, guile-devel@gnu.org
Subject: bug#27782: patch for mmap and friends
Date: Fri, 13 Jan 2023 17:00:54 -0800	[thread overview]
Message-ID: <7a83fb6e-7f9c-b5fd-5b9f-aac81fade548__36356.2972097256$1673658149$gmane$org@gmail.com> (raw)
In-Reply-To: <1ee846ab-e9ce-d616-94dd-0056e4b840f9@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 399 bytes --]

On 1/13/23 4:49 PM, Matt Wette wrote:
> Please consider this patch for adding mmap(), munmap() and msync()
>  to libguile/filesys.c.  Included is update for posix.texi and test 
> file mman.test.
> Once included, feature 'mman should be #t.
>
> Matt
Please add the attached file: test-suite/tests/mman.test.

I thought it was included in the patch.  It's the thought that counts, 
right?

Matt



[-- Attachment #2: mman.test --]
[-- Type: text/plain, Size: 1493 bytes --]

;;;; mman.test --- Tests for mmap API.    -*- scheme -*-
;;;;
;;;; Copyright 2022 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 published by the Free Software Foundation; either
;;;; version 3 of the License, or (at your option) any later version.
;;;;
;;;; This library is distributed in the hope that it will be useful,
;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;;;; Lesser General Public License for more details.
;;;;
;;;; You should have received a copy of the GNU Lesser General Public
;;;; License along with this library; if not, write to the Free Software
;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

(define-module (test-mman)
  #:use-module (test-suite lib)
  #:use-module (test-suite guile-test)
  #:use-module (rnrs bytevectors)
  #:declarative? #f
  )

(define (mmap-test-file)
  (data-file-name "foo.txt"))

(define mmap-test-string "hello, world")

(define (gen-mmap-test-file)
  (with-output-to-file (mmap-test-file)
    (lambda () (display mmap-test-string))))

(when (provided? 'mman)

  (gen-mmap-test-file)

  (with-test-prefix "mman"

    (pass-if "mman 1"
      (let ((bv (mmap 0 #x100)))
        (bytevector-u8-set! bv 0 34)
        (= (bytevector-u8-ref bv 0) 34)))

    ))

;; --- last line ---

       reply	other threads:[~2023-01-14  1:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1ee846ab-e9ce-d616-94dd-0056e4b840f9@gmail.com>
2023-01-14  1:00 ` Matt Wette [this message]
2023-01-14 15:18 ` bug#27782: patch for mmap and friends Maxime Devos
     [not found] ` <445d3567-9bbf-487b-f338-8a16903e9e62@telenet.be>
     [not found]   ` <5fda49f2-6e23-9a53-85d2-c1cc38cf0cce@gmail.com>
     [not found]     ` <c7e20254-6387-00c4-ea15-f3ed64668923@gmail.com>
     [not found]       ` <23890f8a-8891-d888-b289-c0d06304fff1@telenet.be>
2023-01-14 23:46         ` Matt Wette
2017-07-21 13:39 bug#27782: [wishlist] scheme level mmap Matt Wette
2023-01-14  0:49 ` bug#27782: patch for mmap and friends Matt Wette

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='7a83fb6e-7f9c-b5fd-5b9f-aac81fade548__36356.2972097256$1673658149$gmane$org@gmail.com' \
    --to=matt.wette@gmail.com \
    --cc=27782@debbugs.gnu.org \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).