annotate lib/full-write.h @ 5105:d088e155d8f6

Add extern "C" for C++.
author Bruno Haible <bruno@clisp.org>
date Fri, 16 Jul 2004 16:28:48 +0000
parents 9fcf64c770ed
children a48fb0e98c8c
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
5105
d088e155d8f6 Add extern "C" for C++.
Bruno Haible <bruno@clisp.org>
parents: 4002
diff changeset
3 Copyright (C) 2002-2003 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
9fcf64c770ed Orthogonal approach to read()/write() that handles EINTR and counts > 2^31
Bruno Haible <bruno@clisp.org>
parents: 3405
diff changeset
5 This program is free software; you can redistribute it and/or modify
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
9fcf64c770ed Orthogonal approach to read()/write() that handles EINTR and counts > 2^31
Bruno Haible <bruno@clisp.org>
parents: 3405
diff changeset
7 the Free Software Foundation; either version 2, or (at your option)
9fcf64c770ed Orthogonal approach to read()/write() that handles EINTR and counts > 2^31
Bruno Haible <bruno@clisp.org>
parents: 3405
diff changeset
8 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
9fcf64c770ed Orthogonal approach to read()/write() that handles EINTR and counts > 2^31
Bruno Haible <bruno@clisp.org>
parents: 3405
diff changeset
16 along with this program; if not, write to the Free Software Foundation,
9fcf64c770ed Orthogonal approach to read()/write() that handles EINTR and counts > 2^31
Bruno Haible <bruno@clisp.org>
parents: 3405
diff changeset
17 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
9fcf64c770ed Orthogonal approach to read()/write() that handles EINTR and counts > 2^31
Bruno Haible <bruno@clisp.org>
parents: 3405
diff changeset
18
9fcf64c770ed Orthogonal approach to read()/write() that handles EINTR and counts > 2^31
Bruno Haible <bruno@clisp.org>
parents: 3405
diff changeset
19 #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
20
5105
d088e155d8f6 Add extern "C" for C++.
Bruno Haible <bruno@clisp.org>
parents: 4002
diff changeset
21
d088e155d8f6 Add extern "C" for C++.
Bruno Haible <bruno@clisp.org>
parents: 4002
diff changeset
22 #ifdef __cplusplus
d088e155d8f6 Add extern "C" for C++.
Bruno Haible <bruno@clisp.org>
parents: 4002
diff changeset
23 extern "C" {
d088e155d8f6 Add extern "C" for C++.
Bruno Haible <bruno@clisp.org>
parents: 4002
diff changeset
24 #endif
d088e155d8f6 Add extern "C" for C++.
Bruno Haible <bruno@clisp.org>
parents: 4002
diff changeset
25
d088e155d8f6 Add extern "C" for C++.
Bruno Haible <bruno@clisp.org>
parents: 4002
diff changeset
26
4002
9fcf64c770ed Orthogonal approach to read()/write() that handles EINTR and counts > 2^31
Bruno Haible <bruno@clisp.org>
parents: 3405
diff changeset
27 /* 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
28 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
29 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
30 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
31
d088e155d8f6 Add extern "C" for C++.
Bruno Haible <bruno@clisp.org>
parents: 4002
diff changeset
32
d088e155d8f6 Add extern "C" for C++.
Bruno Haible <bruno@clisp.org>
parents: 4002
diff changeset
33 #ifdef __cplusplus
d088e155d8f6 Add extern "C" for C++.
Bruno Haible <bruno@clisp.org>
parents: 4002
diff changeset
34 }
d088e155d8f6 Add extern "C" for C++.
Bruno Haible <bruno@clisp.org>
parents: 4002
diff changeset
35 #endif