mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-16 08:40:19 +02:00
Add scm_t_off' type so that
scm_t_port' has a fixed layout.
* libguile/gen-scmconfig.c (main): Produce a definition for `scm_t_off'. * libguile/ports.h (scm_t_port)[read_buf_size, saved_read_buf_size, write_buf_size, seek, truncate]: Use `scm_t_off' instead of `off_t' so that the layout and size of the structure does not depend on the application's `_FILE_OFFSET_BITS' value. Reported by Bill Schottstaedt, see http://lists.gnu.org/archive/html/bug-guile/2009-06/msg00018.html. (scm_set_port_seek, scm_set_port_truncate): Update. * libguile/ports.c (scm_set_port_seek, scm_set_port_truncate): Use `scm_t_off' and `off_t_or_off64_t'. * libguile/fports.c (fport_seek, fport_truncate): Use `scm_t_off' instead of `off_t'. * libguile/r6rs-ports.c (bip_seek, cbp_seek, bop_seek): Use `scm_t_off' instead of `off_t'. * libguile/rw.c (scm_write_string_partial): Likewise. * libguile/strports.c (st_resize_port, st_seek, st_truncate): Likewise. * doc/ref/api-io.texi (Port Implementation): Update prototype of `scm_set_port_seek ()' and `scm_set_port_truncate ()'. * NEWS: Update.
This commit is contained in:
parent
376b6bd7a2
commit
f1ce919933
9 changed files with 66 additions and 46 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2001, 2006 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2001, 2006, 2009 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
|
||||
|
@ -207,7 +207,7 @@ SCM_DEFINE (scm_write_string_partial, "write-string/partial", 1, 3, 0,
|
|||
#define FUNC_NAME s_scm_write_string_partial
|
||||
{
|
||||
const char *src;
|
||||
long write_len;
|
||||
scm_t_off write_len;
|
||||
int fdes;
|
||||
|
||||
{
|
||||
|
@ -232,7 +232,7 @@ SCM_DEFINE (scm_write_string_partial, "write-string/partial", 1, 3, 0,
|
|||
SCM port = (SCM_UNBNDP (port_or_fdes)?
|
||||
scm_current_output_port () : port_or_fdes);
|
||||
scm_t_port *pt;
|
||||
off_t space;
|
||||
scm_t_off space;
|
||||
|
||||
SCM_VALIDATE_OPFPORT (2, port);
|
||||
SCM_VALIDATE_OUTPUT_PORT (2, port);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue