guile-devel
[Top][All Lists]
Advanced

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

[PATCH PR guile/21104] Fix GDB build failure with Guile 2.2


From: Doug Evans
Subject: [PATCH PR guile/21104] Fix GDB build failure with Guile 2.2
Date: Tue, 6 Feb 2018 10:58:07 -0800

Guile folk. Any comments?

This patch gets gdb building again with guile 2.2.
Regression tested with guile 2.0.{13,14} and 2.2.3 on amd64-linux.

In time I think we could delete Guile 2.0 support and that would
simplify the code, but no rush.
[And if someone wants to redo the 2.0 support to further reduced diffs
that may be a possibility.]

2018-02-06  Doug Evans  <address@hidden>

        PR guile/21104
        * NEWS: Mention guile 2.2 is supported again.
        * configure.ac: Add guile-2.2 back.
        * configure: Regenerate.
        * guile/scm-ports.c (PORTS_V22): New macro.
        (ioscm_memory_port) [!PORTS_V22]: Make read_buf_size,write_buf_size
        !PORTS_V22 only.
        (port_type_t): New type.
        (stdio_port_type): Renamed from stdio_port_desc.
        (stdio_port_type_name): Renamed from stdio_port_desc_name.
        (memory_port_type): Renamed from memory_port_desc.
        (memmory_port_type_name): Renamed from memory_port_desc_name.
        (natural_buf_size) [PORTS_V22]: New variable.
        (ioscm_open_port): New argument stream. All callers updated.
        (ioscm_read, ioscm_write) [PORTS_V22]: New functions.
        (ioscm_init_gdb_stdio_port) [PORTS_V22]: Adapt for use in Guile >= 2.2.
        (gdbscm_is_stdio_port): New function.
        (gdbscm_stdio_port_p): Call it.
        (gdbscm_get_natural_buffer_sizes, gdbscm_memory_port_seek)
        (gdbscm_memory_port_read, gdbscm_memory_port_write) [PORTS_V22]: New
        functions.
        (gdbscm_memory_port_print): Adapt for use in Guile >= 2.2.
        (ioscm_init_memory_port_type): Ditto.
        (ioscm_init_memory_stream): Replaces ioscm_init_memory_port.
        (ioscm_init_memory_port_buffers): New function.
        (gdbscm_open_memory): Update.
        (gdbscm_is_memory_port): Adapt for use in Guile >= 2.2.
        (port_functions) [!PORTS_V22]: Only define Guile functions
        memory-port-read-buffer-size, set-memory-port-read-buffer-size!,
        memory-port-write-buffer-size, set-memory-port-write-buffer-size!
        for Guile < 2.2.
        (gdbscm_initialize_ports): Only initialize out_of_range_buf_size if
        !PORTS_V22.

        doc/
        * guile.texi (Memory Ports in Guile): Mention that these functions
        are only supported in Guile 2.0: memory-port-read-buffer-size,
        set-memory-port-read-buffer-size!, memory-port-write-buffer-size,
        set-memory-port-read-buffer-size!.

Attachment: guile22.patch
Description: Text Data


reply via email to

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