X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=gnulib%2Fsafe-read.c;h=855be677aa07f01dcb77f3907e6aa200f3529fce;hb=HEAD;hp=b7bf1d5cd60ef2cf12de123820a17d147af6a7c2;hpb=94a044f90357edefa6f4ae9f0b1d5885b0e34aee;p=debian%2Famanda
diff --git a/gnulib/safe-read.c b/gnulib/safe-read.c
index b7bf1d5..855be67 100644
--- a/gnulib/safe-read.c
+++ b/gnulib/safe-read.c
@@ -1,12 +1,12 @@
/* An interface to read and write that retries after interrupts.
- Copyright (C) 1993, 1994, 1998, 2002, 2003, 2004, 2005, 2006 Free
- Software Foundation, Inc.
+ Copyright (C) 1993-1994, 1998, 2002-2006, 2009-2010 Free Software
+ Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -14,8 +14,7 @@
GNU General Public License for more details.
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program. If not, see . */
#include
@@ -67,12 +66,12 @@ safe_rw (int fd, void const *buf, size_t count)
ssize_t result = rw (fd, buf, count);
if (0 <= result)
- return result;
+ return result;
else if (IS_EINTR (errno))
- continue;
+ continue;
else if (errno == EINVAL && BUGGY_READ_MAXIMUM < count)
- count = BUGGY_READ_MAXIMUM;
+ count = BUGGY_READ_MAXIMUM;
else
- return result;
+ return result;
}
}