summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2010-12-10 21:33:00 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2010-12-10 21:33:00 +0200
commit1ef742582942bb2a7ef4ce8531cf3b306b3f82d7 (patch)
treeb8b97fcb906a3e0a82ed88653035a4d570a49cca /examples
parent841fc4842ae81579edab2a7752b0347944575d2c (diff)
downloadmailutils-1ef742582942bb2a7ef4ce8531cf3b306b3f82d7.tar.gz
mailutils-1ef742582942bb2a7ef4ce8531cf3b306b3f82d7.tar.bz2
Remove the MU_STREAM_FD_AUTOCLOSE stream flag.
This is the default behavior now. The reverse can be requested by a special MU_IOCTL_FD,MU_IOCTL_FD_SET_BORROW ioctl. * include/mailutils/stream.h (MU_STREAM_FD_AUTOCLOSE): Remove. This is the default behavior now. (MU_IOCTL_FD): New ioctl. (MU_IOCTL_FD_GET_BORROW, MU_IOCTL_FD_SET_BORROW): New opcodes. * include/mailutils/sys/file_stream.h (_MU_FILE_STREAM_FD_BORROWED): New flag. * libmailutils/stream/file_stream.c (fd_close): Close the fd unless _MU_FILE_STREAM_FD_BORROWED bit is set. (fd_open): Clear the _MU_FILE_STREAM_FD_BORROWED bit. (fd_ioctl): Handle MU_IOCTL_FD. (mu_file_stream_create): Remove MU_STREAM_FD_AUTOCLOSE. * ibmailutils/base/version.c (mu_print_options): Set borrow mode on the temporary stdout stream. * libmailutils/cfg/driver.c (mu_cfg_tree_reduce): Set borrow mode on the temporary stderr stream. * libmailutils/stdstream/strerr.c (mu_stdstream_strerr_create): Set borrow mode on the stderr stream. * libmailutils/tests/tempfile.c: set borrow mode on the temporary stream, because it may be reopened later (verify mode). * examples/mta.c: Remove MU_STREAM_FD_AUTOCLOSE. * imap4d/io.c: Likewise. * libmailutils/stream/prog_stream.c: Likewise. * libmailutils/stream/socket_stream.c: Likewise. * libmailutils/stream/temp_file_stream.c: Likewise. * maidag/lmtp.c: Likewise. * pop3d/extra.c: Likewise. These will disappear when the corresponding utilities are rewritten to use MU stdstream: * mail/escape.c (quote0): set borrow mode on the output stream. * mimeview/mimeview.c (display_file): set borrow mode on the input stream. Likewise, these will disappear when MH uses MU stdstream: * mh/anno.c (main): Set borrow mode on the input stream. * mh/mh_init.c (mh_real_install): Likewise. * mh/mh_whatnow.c (_whatnow): Likewise. * mh/mhl.c (open_output): Set borrow mode on the output stream. * mh/mhn.c (mhn_show,store_handler): Likewise.
Diffstat (limited to 'examples')
-rw-r--r--examples/mta.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/mta.c b/examples/mta.c
index 03bb77384..ecd837286 100644
--- a/examples/mta.c
+++ b/examples/mta.c
@@ -824,8 +824,7 @@ mta_smtp (int argc, char **argv)
return 1;
}
- rc = mu_fd_stream_create (&str, NULL, sfd,
- MU_STREAM_RDWR|MU_STREAM_FD_AUTOCLOSE);
+ rc = mu_fd_stream_create (&str, NULL, sfd, MU_STREAM_RDWR);
if (rc)
{
mu_diag_funcall (MU_DIAG_ERROR, "mu_fd_stream_create", NULL, rc);

Return to:

Send suggestions and report system problems to the System administrator.