Don't use "#ifdef EINTR". dd.c has been doing that since 2004.
* src/copy.c (sparse_copy): Remove #ifdef...#endif around EINTR use.
* src/tee.c (tee_files): Remove #ifdef...#endif around EINTR use.
If we need it, add something like this in system.h:
/* When EINTR is not defined, define it to an improbable value
so that each use does not have to be #ifdef'd. */
#ifndef EINTR
# define EINTR 999988
#endif
ssize_t n_read = read (src_fd, buf, MIN (max_n_read, buf_size));
if (n_read < 0)
{
-#ifdef EINTR
if (errno == EINTR)
continue;
-#endif
error (0, errno, _("reading %s"), quote (src_name));
return false;
}
while (1)
{
bytes_read = read (0, buffer, sizeof buffer);
-#ifdef EINTR
if (bytes_read < 0 && errno == EINTR)
continue;
-#endif
if (bytes_read <= 0)
break;