annotate lib/full-write.h @ 17342:c75939cb6254

merge with default branch
author Michael Goffioul <michael.goffioul@gmail.com>
date Thu, 21 Feb 2013 14:57:31 +0000
parents e542fd46ad6f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4002
9fcf64c770ed Orthogonal approach to read()/write() that handles EINTR and counts > 2^31
Bruno Haible <bruno@clisp.org>
parents: 3405
diff changeset
1 /* An interface to write() that writes all it is asked to write.
9fcf64c770ed Orthogonal approach to read()/write() that handles EINTR and counts > 2^31
Bruno Haible <bruno@clisp.org>
parents: 3405
diff changeset
2
17249
e542fd46ad6f maint: update all copyright year number ranges
Eric Blake <eblake@redhat.com>
parents: 16201
diff changeset
3 Copyright (C) 2002-2003, 2009-2013 Free Software Foundation, Inc.
4002
9fcf64c770ed Orthogonal approach to read()/write() that handles EINTR and counts > 2^31
Bruno Haible <bruno@clisp.org>
parents: 3405
diff changeset
4
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 5848
diff changeset
5 This program is free software: you can redistribute it and/or modify
4002
9fcf64c770ed Orthogonal approach to read()/write() that handles EINTR and counts > 2^31
Bruno Haible <bruno@clisp.org>
parents: 3405
diff changeset
6 it under the terms of the GNU General Public License as published by
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 5848
diff changeset
7 the Free Software Foundation; either version 3 of the License, or
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 5848
diff changeset
8 (at your option) any later version.
3405
7ed9e750f880 *** empty log message ***
Jim Meyering <jim@meyering.net>
parents:
diff changeset
9
4002
9fcf64c770ed Orthogonal approach to read()/write() that handles EINTR and counts > 2^31
Bruno Haible <bruno@clisp.org>
parents: 3405
diff changeset
10 This program is distributed in the hope that it will be useful,
9fcf64c770ed Orthogonal approach to read()/write() that handles EINTR and counts > 2^31
Bruno Haible <bruno@clisp.org>
parents: 3405
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
9fcf64c770ed Orthogonal approach to read()/write() that handles EINTR and counts > 2^31
Bruno Haible <bruno@clisp.org>
parents: 3405
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9fcf64c770ed Orthogonal approach to read()/write() that handles EINTR and counts > 2^31
Bruno Haible <bruno@clisp.org>
parents: 3405
diff changeset
13 GNU General Public License for more details.
9fcf64c770ed Orthogonal approach to read()/write() that handles EINTR and counts > 2^31
Bruno Haible <bruno@clisp.org>
parents: 3405
diff changeset
14
9fcf64c770ed Orthogonal approach to read()/write() that handles EINTR and counts > 2^31
Bruno Haible <bruno@clisp.org>
parents: 3405
diff changeset
15 You should have received a copy of the GNU General Public License
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 5848
diff changeset
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
4002
9fcf64c770ed Orthogonal approach to read()/write() that handles EINTR and counts > 2^31
Bruno Haible <bruno@clisp.org>
parents: 3405
diff changeset
17
9fcf64c770ed Orthogonal approach to read()/write() that handles EINTR and counts > 2^31
Bruno Haible <bruno@clisp.org>
parents: 3405
diff changeset
18 #include <stddef.h>
9fcf64c770ed Orthogonal approach to read()/write() that handles EINTR and counts > 2^31
Bruno Haible <bruno@clisp.org>
parents: 3405
diff changeset
19
5105
d088e155d8f6 Add extern "C" for C++.
Bruno Haible <bruno@clisp.org>
parents: 4002
diff changeset
20
d088e155d8f6 Add extern "C" for C++.
Bruno Haible <bruno@clisp.org>
parents: 4002
diff changeset
21 #ifdef __cplusplus
d088e155d8f6 Add extern "C" for C++.
Bruno Haible <bruno@clisp.org>
parents: 4002
diff changeset
22 extern "C" {
d088e155d8f6 Add extern "C" for C++.
Bruno Haible <bruno@clisp.org>
parents: 4002
diff changeset
23 #endif
d088e155d8f6 Add extern "C" for C++.
Bruno Haible <bruno@clisp.org>
parents: 4002
diff changeset
24
d088e155d8f6 Add extern "C" for C++.
Bruno Haible <bruno@clisp.org>
parents: 4002
diff changeset
25
4002
9fcf64c770ed Orthogonal approach to read()/write() that handles EINTR and counts > 2^31
Bruno Haible <bruno@clisp.org>
parents: 3405
diff changeset
26 /* Write COUNT bytes at BUF to descriptor FD, retrying if interrupted
9fcf64c770ed Orthogonal approach to read()/write() that handles EINTR and counts > 2^31
Bruno Haible <bruno@clisp.org>
parents: 3405
diff changeset
27 or if partial writes occur. Return the number of bytes successfully
9fcf64c770ed Orthogonal approach to read()/write() that handles EINTR and counts > 2^31
Bruno Haible <bruno@clisp.org>
parents: 3405
diff changeset
28 written, setting errno if that is less than COUNT. */
9fcf64c770ed Orthogonal approach to read()/write() that handles EINTR and counts > 2^31
Bruno Haible <bruno@clisp.org>
parents: 3405
diff changeset
29 extern size_t full_write (int fd, const void *buf, size_t count);
5105
d088e155d8f6 Add extern "C" for C++.
Bruno Haible <bruno@clisp.org>
parents: 4002
diff changeset
30
d088e155d8f6 Add extern "C" for C++.
Bruno Haible <bruno@clisp.org>
parents: 4002
diff changeset
31
d088e155d8f6 Add extern "C" for C++.
Bruno Haible <bruno@clisp.org>
parents: 4002
diff changeset
32 #ifdef __cplusplus
d088e155d8f6 Add extern "C" for C++.
Bruno Haible <bruno@clisp.org>
parents: 4002
diff changeset
33 }
d088e155d8f6 Add extern "C" for C++.
Bruno Haible <bruno@clisp.org>
parents: 4002
diff changeset
34 #endif