summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog266
-rw-r--r--auth/tls.c6
-rw-r--r--examples/argcv.c3
-rw-r--r--examples/base64.c3
-rw-r--r--examples/mimetest.c4
-rw-r--r--examples/murun.c3
-rw-r--r--examples/nntpclient.c5
-rw-r--r--examples/pop3client.c5
-rw-r--r--include/mailutils/header.h2
-rw-r--r--include/mailutils/mailbox.h2
-rw-r--r--include/mailutils/stream.h26
-rw-r--r--libmu_scm/mu_port.c10
-rw-r--r--mail.local/main.c14
-rw-r--r--mailbox/amd.c36
-rw-r--r--mailbox/body.c26
-rw-r--r--mailbox/file_stream.c24
-rw-r--r--mailbox/filter.c10
-rw-r--r--mailbox/filter_iconv.c4
-rw-r--r--mailbox/filter_rfc822.c16
-rw-r--r--mailbox/filter_trans.c2
-rw-r--r--mailbox/getopt.h6
-rw-r--r--mailbox/header.c14
-rw-r--r--mailbox/imap/folder.c4
-rw-r--r--mailbox/imap/mbox.c16
-rw-r--r--mailbox/include/amd.h4
-rw-r--r--mailbox/include/filter0.h6
-rw-r--r--mailbox/include/header0.h2
-rw-r--r--mailbox/include/imap0.h4
-rw-r--r--mailbox/include/mailbox0.h2
-rw-r--r--mailbox/include/stream0.h14
-rw-r--r--mailbox/mailbox.c2
-rw-r--r--mailbox/mapfile_stream.c14
-rw-r--r--mailbox/mbox/mbox.c54
-rw-r--r--mailbox/mbox/mboxscan.c2
-rw-r--r--mailbox/memory_stream.c12
-rw-r--r--mailbox/message.c26
-rw-r--r--mailbox/mime.c4
-rw-r--r--mailbox/nntp/mbox.c16
-rw-r--r--mailbox/nntp/nntp_stream.c4
-rw-r--r--mailbox/pop/mbox.c26
-rw-r--r--mailbox/pop/pop3_stream.c4
-rw-r--r--mailbox/stream.c28
-rw-r--r--mailbox/tcp.c4
-rw-r--r--mh/mh_stream.c18
-rw-r--r--po/ca.po481
-rw-r--r--po/es.po481
-rw-r--r--po/fr.po482
-rw-r--r--po/pl.po485
-rw-r--r--po/ro.po480
-rw-r--r--po/ru.po488
-rw-r--r--po/rw.po483
-rw-r--r--po/uk.po486
-rw-r--r--pop3d/pop3d.c4
-rwxr-xr-xscripts/gnulib-sync2
54 files changed, 3029 insertions, 1596 deletions
diff --git a/ChangeLog b/ChangeLog
index 1d0806497..c7338a4ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,271 @@
2005-11-15 Sergey Poznyakoff <gray@gnu.org.ua>
+ * configure.ac: Determine the size of off_t and define an
+ equivalent mu_off_t type. We cannot use off_t in the library since
+ its size depends on whether large file support is used or not,
+ which will lead to arbitrary crashes if a user application and the
+ library use off_t of different sizes.
+ (MU_COMMON_INCLUDES): New substitute variable
+
+ * gnulib.modules (mailutils): Add glob
+
+ * include/mailutils/types.h: Removed
+ * include/mailutils/types.hin: New file
+ * include/mailutils/Makefile.am: Build types.h
+
+ * auth/Makefile.am (UNCLUDES): Rewritten using MU_COMMON_INCLUDES
+ * comsat/Makefile.am: Likewise
+ * config/Makefile.am: Likewise
+ * dotlock/Makefile.am: Likewise
+ * examples/Makefile.am: Likewise
+ * frm/Makefile.am: Likewise
+ * guimb/Makefile.am: Likewise
+ * imap4d/Makefile.am: Likewise
+ * lib/Makefile.am: Likewise
+ * libmu_cpp/Makefile.am: Likewise
+ * libmu_scm/Makefile.am: Likewise
+ * libsieve/Makefile.am: Likewise
+ * libsieve/extensions/Makefile.am: Likewise
+ * mail/Makefile.am: Likewise
+ * mail.local/Makefile.am: Likewise
+ * mail.remote/Makefile.am: Likewise
+ * mailbox/Makefile.am: Likewise
+ * mailbox/imap/Makefile.am: Likewise
+ * mailbox/maildir/Makefile.am: Likewise
+ * mailbox/mbox/Makefile.am: Likewise
+ * mailbox/mh/Makefile.am: Likewise
+ * mailbox/nntp/Makefile.am: Likewise
+ * mailbox/pop/Makefile.am: Likewise
+ * mapi/Makefile.am: Likewise
+ * messages/Makefile.am: Likewise
+ * mh/Makefile.am: Likewise
+ * mimeview/Makefile.am: Likewise
+ * movemail/Makefile.am: Likewise
+ * pop3d/Makefile.am: Likewise
+ * readmsg/Makefile.am: Likewise
+ * sieve/Makefile.am: Likewise
+ * sql/Makefile.am: Likewise
+
+ * auth/tls.c: Use mu_off_t instead of off_t
+ * examples/argcv.c: Likewise
+ * examples/base64.c: Likewise
+ * examples/mimetest.c: Likewise
+ * examples/murun.c: Likewise
+ * examples/nntpclient.c: Likewise
+ * examples/pop3client.c: Likewise
+ * include/mailutils/header.h: Likewise
+ * include/mailutils/mailbox.h: Likewise
+ * include/mailutils/stream.h: Likewise
+ * include/mailutils/types.h: Likewise
+ * libmu_scm/mu_port.c: Likewise
+
+ * mail.local/main.c: Likewise
+ * mailbox/amd.c: Likewise
+ * mailbox/body.c: Likewise
+ * mailbox/file_stream.c: Likewise
+ * mailbox/filter.c: Likewise
+ * mailbox/filter_iconv.c: Likewise
+ * mailbox/filter_rfc822.c: Likewise
+ * mailbox/filter_trans.c: Likewise
+ * mailbox/header.c: Likewise
+ * mailbox/mailbox.c: Likewise
+ * mailbox/mapfile_stream.c
+ * mailbox/memory_stream.c
+ * mailbox/message.c: Likewise
+ * mailbox/mime.c: Likewise
+ * mailbox/stream.c: Likewise
+ * mailbox/tcp.c: Likewise
+ * mailbox/imap/folder.c: Likewise
+ * mailbox/imap/mbox.c: Likewise
+ * mailbox/include/amd.h: Likewise
+ * mailbox/include/filter0.h: Likewise
+ * mailbox/include/header0.h: Likewise
+ * mailbox/include/imap0.h: Likewise
+ * mailbox/include/mailbox0.h: Likewise
+ * mailbox/include/stream0.h: Likewise
+ * mailbox/mbox/mbox.c: Likewise
+ * mailbox/mbox/mboxscan.c: Likewise
+ * mailbox/nntp/mbox.c: Likewise
+ * mailbox/nntp/nntp_stream.c: Likewise
+ * mailbox/pop/mbox.c: Likewise
+ * mailbox/pop/pop3_stream.c: Likewise
+ * mh/mh_stream.c: Likewise
+ * pop3d/pop3d.c: Likewise
+
+ * m4/gnulib.m4: Update
+ * m4/mu_libobj.m4: Update
+
+ Update by gnulib-sync:
+
+ * lib/allocsa.c: Updated
+ * lib/allocsa.h: Updated
+ * lib/allocsa.valgrind: Updated
+ * lib/asprintf.c: Updated
+ * lib/error.c: Updated
+ * lib/error.h: Updated
+ * lib/exit.h: Updated
+ * lib/exitfail.c: Updated
+ * lib/exitfail.h: Updated
+ * lib/getpass.c: Updated
+ * lib/getpass.h: Updated
+ * lib/intprops.h: Updated
+ * lib/mbswidth.c: Updated
+ * lib/mbswidth.h: Updated
+ * lib/obstack.c: Updated
+ * lib/obstack.h: Updated
+ * lib/realloc.c: Updated
+ * lib/setenv.c: Updated
+ * lib/setenv.h: Updated
+ * lib/snprintf.c: Updated
+ * lib/snprintf.h: Updated
+ * lib/unsetenv.c: Updated
+ * lib/vasprintf.c: Updated
+ * lib/vasprintf.h: Updated
+ * lib/xalloc-die.c: Updated
+ * lib/xalloc.h: Updated
+ * lib/xmalloc.c: Updated
+ * lib/xsize.h: Updated
+ * lib/xstrtol.c: Updated
+ * lib/xstrtol.h: Updated
+ * lib/xstrtoul.c: Updated
+ * m4/alloca.m4: Updated
+ * m4/allocsa.m4: Updated
+ * m4/argp.m4: Updated
+ * m4/d-type.m4: Added to the repository
+ * m4/eealloc.m4: Updated
+ * m4/eoverflow.m4: Updated
+ * m4/error.m4: Updated
+ * m4/exitfail.m4: Updated
+ * m4/extensions.m4: Updated
+ * m4/fnmatch.m4: Updated
+ * m4/getdelim.m4: Updated
+ * m4/getline.m4: Updated
+ * m4/getlogin_r.m4: Added to the repository
+ * m4/getopt.m4: Updated
+ * m4/getpass.m4: Updated
+ * m4/glob.m4: Added to the repository
+ * m4/intmax_t.m4: Updated
+ * m4/inttypes.m4: Updated
+ * m4/inttypes_h_gl.m4: Updated
+ * m4/longdouble.m4: Updated
+ * m4/longlong_gl.m4: Updated
+ * m4/mbchar.m4: Updated
+ * m4/mbiter.m4: Added to the repository
+ * m4/mbrtowc.m4: Updated
+ * m4/mbstate_t.m4: Updated
+ * m4/mbswidth.m4: Updated
+ * m4/md5.m4: Updated
+ * m4/memchr.m4: Updated
+ * m4/mempcpy.m4: Updated
+ * m4/minmax.m4: Updated
+ * m4/obstack.m4: Updated
+ * m4/onceonly.m4: Updated
+ * m4/regex.m4: Updated
+ * m4/restrict.m4: Updated
+ * m4/setenv.m4: Updated
+ * m4/signed.m4: Updated
+ * m4/size_max.m4: Updated
+ * m4/snprintf.m4: Updated
+ * m4/stat-macros.m4: Added to the repository
+ * m4/stdbool.m4: Updated
+ * m4/stdint.m4: Added to the repository
+ * m4/stdint_h_gl.m4: Updated
+ * m4/strcase.m4: Updated
+ * m4/strchrnul.m4: Updated
+ * m4/strdup.m4: Added to the repository
+ * m4/strerror_r.m4: Updated
+ * m4/strndup.m4: Updated
+ * m4/strnlen.m4: Updated
+ * m4/strtok_r.m4: Updated
+ * m4/sysexits.m4: Updated
+ * m4/uintmax_t_gl.m4: Updated
+ * m4/ulonglong_gl.m4: Updated
+ * m4/vasnprintf.m4: Updated
+ * m4/vasprintf.m4: Updated
+ * m4/vsnprintf.m4: Updated
+ * m4/wchar_t.m4: Updated
+ * m4/wint_t.m4: Updated
+ * m4/xalloc.m4: Updated
+ * m4/xsize.m4: Updated
+ * m4/xstrtol.m4: Updated
+ * mailbox/alloca.c: Updated
+ * mailbox/alloca_.h: Updated
+ * mailbox/argp-ba.c: Updated
+ * mailbox/argp-eexst.c: Updated
+ * mailbox/argp-fmtstream.c: Updated
+ * mailbox/argp-fmtstream.h: Updated
+ * mailbox/argp-fs-xinl.c: Updated
+ * mailbox/argp-help.c: Updated
+ * mailbox/argp-namefrob.h: Updated
+ * mailbox/argp-parse.c: Updated
+ * mailbox/argp-pv.c: Updated
+ * mailbox/argp-pvh.c: Updated
+ * mailbox/argp-xinl.c: Updated
+ * mailbox/argp.h: Updated
+ * mailbox/asnprintf.c: Updated
+ * mailbox/fnmatch.c: Added to the repository
+ * mailbox/fnmatch_.h: Added to the repository
+ * mailbox/fnmatch_loop.c: Added to the repository
+ * mailbox/getdelim.c: Updated
+ * mailbox/getdelim.h: Updated
+ * mailbox/getline.c: Updated
+ * mailbox/getline.h: Updated
+ * mailbox/getlogin_r.c: Added to the repository
+ * mailbox/getlogin_r.h: Added to the repository
+ * mailbox/getopt.c: Updated
+ * mailbox/getopt1.c: Updated
+ * mailbox/getopt_.h: Updated
+ * mailbox/getopt_int.h: Updated
+ * mailbox/gettext.h: Updated
+ * mailbox/glob-libc.h: Added to the repository
+ * mailbox/glob.c: Added to the repository
+ * mailbox/glob_.h: Added to the repository
+ * mailbox/malloc.c: Added to the repository
+ * mailbox/mbchar.c: Updated
+ * mailbox/mbchar.h: Updated
+ * mailbox/mbuiter.h: Added to the repository
+ * mailbox/md5.c: Updated
+ * mailbox/md5.h: Updated
+ * mailbox/memchr.c: Updated
+ * mailbox/mempcpy.c: Updated
+ * mailbox/mempcpy.h: Updated
+ * mailbox/minmax.h: Updated
+ * mailbox/printf-args.c: Updated
+ * mailbox/printf-args.h: Updated
+ * mailbox/printf-parse.c: Updated
+ * mailbox/printf-parse.h: Updated
+ * mailbox/regcomp.c: Updated
+ * mailbox/regex.c: Updated
+ * mailbox/regex.h: Updated
+ * mailbox/regex_internal.c: Updated
+ * mailbox/regex_internal.h: Updated
+ * mailbox/regexec.c: Updated
+ * mailbox/size_max.h: Updated
+ * mailbox/stat-macros.h: Added to the repository
+ * mailbox/stdbool_.h: Updated
+ * mailbox/stdint_.h: Added to the repository
+ * mailbox/strcase.h: Updated
+ * mailbox/strcasecmp.c: Updated
+ * mailbox/strchrnul.c: Updated
+ * mailbox/strchrnul.h: Updated
+ * mailbox/strdup.c: Added to the repository
+ * mailbox/strdup.h: Added to the repository
+ * mailbox/strncasecmp.c: Updated
+ * mailbox/strndup.c: Updated
+ * mailbox/strndup.h: Updated
+ * mailbox/strnlen.c: Updated
+ * mailbox/strnlen.h: Updated
+ * mailbox/strnlen1.c: Updated
+ * mailbox/strnlen1.h: Updated
+ * mailbox/strtok_r.c: Updated
+ * mailbox/strtok_r.h: Updated
+ * mailbox/sysexit_.h: Updated
+ * mailbox/vasnprintf.c: Updated
+ * mailbox/vasnprintf.h: Updated
+ * mailbox/vsnprintf.c: Updated
+ * mailbox/vsnprintf.h: Updated
+ * mailbox/xsize.h: Updated
+
* examples/argcv.c: Add missing includes
* examples/mailcap.c: Likewise
* examples/url-parse.c: Likewise
diff --git a/auth/tls.c b/auth/tls.c
index 155a60c66..51046986a 100644
--- a/auth/tls.c
+++ b/auth/tls.c
@@ -271,7 +271,7 @@ _tls_destroy (mu_stream_t stream)
static int
_tls_read (mu_stream_t stream, char *optr, size_t osize,
- off_t offset, size_t *nbytes)
+ mu_off_t offset, size_t *nbytes)
{
struct _tls_stream *s = mu_stream_get_owner (stream);
int rc;
@@ -290,7 +290,7 @@ _tls_read (mu_stream_t stream, char *optr, size_t osize,
static int
_tls_readline (mu_stream_t stream, char *optr, size_t osize,
- off_t offset, size_t *nbytes)
+ mu_off_t offset, size_t *nbytes)
{
struct _tls_stream *s = mu_stream_get_owner (stream);
int rc;
@@ -329,7 +329,7 @@ _tls_readline (mu_stream_t stream, char *optr, size_t osize,
static int
_tls_write (mu_stream_t stream, const char *iptr, size_t isize,
- off_t offset, size_t *nbytes)
+ mu_off_t offset, size_t *nbytes)
{
struct _tls_stream *s = mu_stream_get_owner (stream);
int rc;
diff --git a/examples/argcv.c b/examples/argcv.c
index 1ad719801..83a53b278 100644
--- a/examples/argcv.c
+++ b/examples/argcv.c
@@ -16,9 +16,6 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301 USA */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/examples/base64.c b/examples/base64.c
index 2b8a713d2..d7beaff81 100644
--- a/examples/base64.c
+++ b/examples/base64.c
@@ -16,9 +16,6 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301 USA */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
#include <unistd.h>
#include <stdio.h>
#include <assert.h>
diff --git a/examples/mimetest.c b/examples/mimetest.c
index cb5b19d57..9d7decd58 100644
--- a/examples/mimetest.c
+++ b/examples/mimetest.c
@@ -16,10 +16,6 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301 USA */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/examples/murun.c b/examples/murun.c
index 84abb6f71..a7e21894e 100644
--- a/examples/murun.c
+++ b/examples/murun.c
@@ -16,9 +16,6 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301 USA */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
diff --git a/examples/nntpclient.c b/examples/nntpclient.c
index 4ad1120f2..aa1f33266 100644
--- a/examples/nntpclient.c
+++ b/examples/nntpclient.c
@@ -20,9 +20,8 @@
MA 02110-1301 USA */
#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
+# include <config.h> /* For ARG_UNUSED only */
+#endif
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
diff --git a/examples/pop3client.c b/examples/pop3client.c
index a0288d224..fa4df2a56 100644
--- a/examples/pop3client.c
+++ b/examples/pop3client.c
@@ -20,9 +20,8 @@
MA 02110-1301 USA */
#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
+# include <config.h> /* For ARG_UNUSED only */
+#endif
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
diff --git a/include/mailutils/header.h b/include/mailutils/header.h
index 5040e715a..573a17ab4 100644
--- a/include/mailutils/header.h
+++ b/include/mailutils/header.h
@@ -130,7 +130,7 @@ extern int mu_header_set_lines (mu_header_t,
int (*_lines) (mu_header_t, size_t *), void *);
extern int mu_header_set_fill (mu_header_t,
- int (*_fill) (mu_header_t, char *, size_t, off_t, size_t *), void *owner);
+ int (*_fill) (mu_header_t, char *, size_t, mu_off_t, size_t *), void *owner);
#ifdef __cplusplus
diff --git a/include/mailutils/mailbox.h b/include/mailutils/mailbox.h
index 87bab05d9..4ed72e8c2 100644
--- a/include/mailutils/mailbox.h
+++ b/include/mailutils/mailbox.h
@@ -56,7 +56,7 @@ extern int mu_mailbox_expunge (mu_mailbox_t);
extern int mu_mailbox_save_attributes (mu_mailbox_t);
/* Update and scanning. */
-extern int mu_mailbox_get_size (mu_mailbox_t, off_t *size);
+extern int mu_mailbox_get_size (mu_mailbox_t, mu_off_t *size);
extern int mu_mailbox_is_updated (mu_mailbox_t);
extern int mu_mailbox_scan (mu_mailbox_t, size_t no, size_t *count);
diff --git a/include/mailutils/stream.h b/include/mailutils/stream.h
index fe05aa401..e4ce838eb 100644
--- a/include/mailutils/stream.h
+++ b/include/mailutils/stream.h
@@ -70,12 +70,12 @@ extern int mu_stream_get_transport2 (mu_stream_t stream, mu_transport_t *pt,
mu_transport_t *pt2);
extern int mu_stream_get_transport (mu_stream_t stream, mu_transport_t *pt);
-extern int mu_stream_read (mu_stream_t, char *, size_t, off_t, size_t *);
-extern int mu_stream_readline (mu_stream_t, char *, size_t, off_t, size_t *);
-extern int mu_stream_size (mu_stream_t, off_t *);
-extern int mu_stream_truncate (mu_stream_t, off_t);
-extern int mu_stream_write (mu_stream_t, const char *, size_t, off_t,
- size_t *);
+extern int mu_stream_read (mu_stream_t, char *, size_t, mu_off_t, size_t *);
+extern int mu_stream_readline (mu_stream_t, char *, size_t, mu_off_t, size_t *);
+extern int mu_stream_size (mu_stream_t, mu_off_t *);
+extern int mu_stream_truncate (mu_stream_t, mu_off_t);
+extern int mu_stream_write (mu_stream_t, const char *, size_t, mu_off_t,
+ size_t *);
extern int mu_stream_setbufsiz (mu_stream_t stream, size_t size);
extern int mu_stream_flush (mu_stream_t);
@@ -118,21 +118,21 @@ extern int mu_stream_set_get_transport2 (mu_stream_t,
void *owner);
extern int mu_stream_set_read (mu_stream_t,
- int (*_read) (mu_stream_t, char *, size_t, off_t, size_t *),
- void *owner);
+ int (*_read) (mu_stream_t, char *, size_t, mu_off_t, size_t *),
+ void *owner);
extern int mu_stream_set_readline (mu_stream_t,
- int (*_readline) (mu_stream_t, char *, size_t, off_t, size_t *),
+ int (*_readline) (mu_stream_t, char *, size_t, mu_off_t, size_t *),
void *owner);
extern int mu_stream_set_size (mu_stream_t,
- int (*_size) (mu_stream_t, off_t *), void *owner);
+ int (*_size) (mu_stream_t, mu_off_t *), void *owner);
extern int mu_stream_set_truncate (mu_stream_t,
- int (*_truncate) (mu_stream_t, off_t), void *owner);
+ int (*_truncate) (mu_stream_t, mu_off_t), void *owner);
extern int mu_stream_set_write (mu_stream_t,
- int (*_write) (mu_stream_t, const char *, size_t, off_t, size_t *),
+ int (*_write) (mu_stream_t, const char *, size_t, mu_off_t, size_t *),
void *owner);
extern int mu_stream_set_flush (mu_stream_t,
@@ -152,7 +152,7 @@ extern int mu_stream_sequential_readline (mu_stream_t stream,
extern int mu_stream_sequential_write (mu_stream_t stream,
const char *buf, size_t size);
-extern int mu_stream_seek (mu_stream_t stream, off_t off, int whence);
+extern int mu_stream_seek (mu_stream_t stream, mu_off_t off, int whence);
extern int mu_stream_strerror (mu_stream_t stream, const char **p);
diff --git a/libmu_scm/mu_port.c b/libmu_scm/mu_port.c
index 608a3d182..9077f4e0f 100644
--- a/libmu_scm/mu_port.c
+++ b/libmu_scm/mu_port.c
@@ -213,12 +213,12 @@ mu_port_end_input (SCM port, int offset)
pt->rw_active = SCM_PORT_NEITHER;
}
-static off_t
-mu_port_seek (SCM port, off_t offset, int whence)
+static mu_off_t
+mu_port_seek (SCM port, mu_off_t offset, int whence)
{
struct mu_port *mp = MU_PORT (port);
scm_port *pt = SCM_PTAB_ENTRY (port);
- off_t size = 0;
+ mu_off_t size = 0;
if (whence == SEEK_CUR && offset == 0)
return mp->offset;
@@ -251,7 +251,7 @@ mu_port_seek (SCM port, off_t offset, int whence)
}
static void
-mu_port_truncate (SCM port, off_t length)
+mu_port_truncate (SCM port, mu_off_t length)
{
struct mu_port *mp = MU_PORT (port);
if (mu_stream_truncate (mp->stream, length))
@@ -262,7 +262,7 @@ static int
mu_port_print (SCM exp, SCM port, scm_print_state *pstate)
{
struct mu_port *mp = MU_PORT (exp);
- off_t size = 0;
+ mu_off_t size = 0;
scm_puts ("#<", port);
scm_print_port_mode (exp, port);
diff --git a/mail.local/main.c b/mail.local/main.c
index 3307d1b67..9bc6259ae 100644
--- a/mail.local/main.c
+++ b/mail.local/main.c
@@ -520,7 +520,7 @@ switch_user_id (struct mu_auth_data *auth, int user)
}
static int
-tmp_write (mu_stream_t stream, off_t *poffset, char *buf, size_t len)
+tmp_write (mu_stream_t stream, mu_off_t *poffset, char *buf, size_t len)
{
size_t n = 0;
int status = mu_stream_write (stream, buf, len, *poffset, &n);
@@ -536,7 +536,7 @@ make_tmp (const char *from, mu_mailbox_t *mbox)
mu_stream_t stream;
char *buf = NULL;
size_t n = 0;
- off_t offset = 0;
+ mu_off_t offset = 0;
size_t line;
int status;
static char *newline = "\n";
@@ -655,7 +655,7 @@ deliver (mu_mailbox_t imbx, char *name)
struct mu_auth_data *auth;
int status;
mu_stream_t istream, ostream;
- off_t size;
+ mu_off_t size;
int failed = 0;
auth = mu_get_auth_by_name (name);
@@ -738,7 +738,7 @@ deliver (mu_mailbox_t imbx, char *name)
#if defined(USE_MAILBOX_QUOTAS)
{
size_t n;
- off_t isize;
+ mu_off_t isize;
switch (check_quota (name, size, &n))
{
@@ -773,11 +773,11 @@ deliver (mu_mailbox_t imbx, char *name)
if (!failed && switch_user_id (auth, 1) == 0)
{
- off_t ioff = 0;
- off_t off = size;
+ mu_off_t ioff = 0;
+ mu_off_t off = size;
size_t nwr, nrd;
char *buf = NULL;
- off_t bufsize = 1024;
+ mu_off_t bufsize = 1024;
mu_stream_size (istream, &bufsize);
for (; (buf = malloc (bufsize)) == NULL && bufsize > 1; bufsize /= 2)
diff --git a/mailbox/amd.c b/mailbox/amd.c
index 56b76ee3a..77fff7703 100644
--- a/mailbox/amd.c
+++ b/mailbox/amd.c
@@ -84,17 +84,17 @@ static int amd_uidnext (mu_mailbox_t mailbox, size_t *puidnext);
static int amd_uidvalidity (mu_mailbox_t, unsigned long *);
static int amd_scan (mu_mailbox_t, size_t, size_t *);
static int amd_is_updated (mu_mailbox_t);
-static int amd_get_size (mu_mailbox_t, off_t *);
+static int amd_get_size (mu_mailbox_t, mu_off_t *);
-static int amd_body_read (mu_stream_t, char *, size_t, off_t, size_t *);
-static int amd_body_readline (mu_stream_t, char *, size_t, off_t, size_t *);
-static int amd_stream_size (mu_stream_t stream, off_t *psize);
+static int amd_body_read (mu_stream_t, char *, size_t, mu_off_t, size_t *);
+static int amd_body_readline (mu_stream_t, char *, size_t, mu_off_t, size_t *);
+static int amd_stream_size (mu_stream_t stream, mu_off_t *psize);
static int amd_body_size (mu_body_t body, size_t *psize);
static int amd_body_lines (mu_body_t body, size_t *plines);
static int amd_header_fill (mu_header_t header, char *buffer, size_t len,
- off_t off, size_t *pnread);
+ mu_off_t off, size_t *pnread);
static int amd_header_size (mu_header_t header, size_t *psize);
static int amd_header_lines (mu_header_t header, size_t *plines);
@@ -125,11 +125,11 @@ static int amd_envelope_sender (mu_envelope_t envelope, char *buf, size_t len,
Indexes are zero-based. */
static int
-amd_msg_bsearch (struct _amd_data *amd, off_t first, off_t last,
+amd_msg_bsearch (struct _amd_data *amd, mu_off_t first, mu_off_t last,
struct _amd_message *msg,
- off_t *pret)
+ mu_off_t *pret)
{
- off_t mid;
+ mu_off_t mid;
int rc;
if (last < first)
@@ -163,7 +163,7 @@ amd_msg_lookup (struct _amd_data *amd, struct _amd_message *msg,
size_t *pret)
{
int rc;
- off_t i;
+ mu_off_t i;
if (!amd->msg_array)
{
@@ -997,7 +997,7 @@ amd_scan_message (struct _amd_message *mhm)
{
mu_stream_t stream = mhm->stream;
char buf[1024];
- off_t off = 0;
+ mu_off_t off = 0;
size_t n;
int status;
int in_header = 1;
@@ -1096,7 +1096,7 @@ amd_is_updated (mu_mailbox_t mailbox)
}
static int
-amd_get_size (mu_mailbox_t mailbox ARG_UNUSED, off_t *psize ARG_UNUSED)
+amd_get_size (mu_mailbox_t mailbox ARG_UNUSED, mu_off_t *psize ARG_UNUSED)
{
/*FIXME*/
return ENOSYS;
@@ -1227,12 +1227,12 @@ amd_check_message (struct _amd_message *mhm)
static int
amd_readstream (struct _amd_message *mhm, char *buffer, size_t buflen,
- off_t off, size_t *pnread, int isreadline,
- off_t start, off_t end)
+ mu_off_t off, size_t *pnread, int isreadline,
+ mu_off_t start, mu_off_t end)
{
size_t nread = 0;
int status = 0;
- off_t ln;
+ mu_off_t ln;
if (buffer == NULL || buflen == 0)
{
@@ -1272,7 +1272,7 @@ amd_readstream (struct _amd_message *mhm, char *buffer, size_t buflen,
}
static int
-amd_body_read (mu_stream_t is, char *buffer, size_t buflen, off_t off,
+amd_body_read (mu_stream_t is, char *buffer, size_t buflen, mu_off_t off,
size_t *pnread)
{
mu_body_t body = mu_stream_get_owner (is);
@@ -1285,7 +1285,7 @@ amd_body_read (mu_stream_t is, char *buffer, size_t buflen, off_t off,
static int
amd_body_readline (mu_stream_t is, char *buffer, size_t buflen,
- off_t off, size_t *pn