New module 'time', so that apps can include <time.h> as per
[gnulib.git] / lib / safe-write.h
index 25d1a4d..c194636 100644 (file)
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 #include <stddef.h>
 
+#define SAFE_WRITE_ERROR ((size_t) -1)
+
 /* Write up to COUNT bytes at BUF to descriptor FD, retrying if interrupted.
-   Return the actual number of bytes written, zero for EOF, or (size_t) -1
-   for an error.  */
+   Return the actual number of bytes written, zero for EOF, or SAFE_WRITE_ERROR
+   upon error.  */
 extern size_t safe_write (int fd, const void *buf, size_t count);