aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/ChangeLog6
-rw-r--r--common/estream.c10
2 files changed, 13 insertions, 3 deletions
diff --git a/common/ChangeLog b/common/ChangeLog
index fccc71d49..08fb06775 100644
--- a/common/ChangeLog
+++ b/common/ChangeLog
@@ -1,3 +1,9 @@
+2005-06-03 Werner Koch <[email protected]>
+
+ * estream.c: Use HAVE_CONFIG_H and not USE_CONFIG_H!
+ (es_func_fd_read, es_func_fd_write): Protect against EINTR.
+
+
2005-06-01 Werner Koch <[email protected]>
* Makefile.am (AM_CPPFLAGS): Added.
diff --git a/common/estream.c b/common/estream.c
index 00cb749e8..bf5b02001 100644
--- a/common/estream.c
+++ b/common/estream.c
@@ -22,7 +22,7 @@
# include <estream-support.h>
#endif
-#ifdef USE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
@@ -597,7 +597,9 @@ es_func_fd_read (void *cookie, char *buffer, size_t size)
estream_cookie_fd_t file_cookie = cookie;
ssize_t bytes_read;
- bytes_read = ESTREAM_SYS_READ (file_cookie->fd, buffer, size);
+ do
+ bytes_read = ESTREAM_SYS_READ (file_cookie->fd, buffer, size);
+ while (bytes_read == -1 && errno == EINTR);
return bytes_read;
}
@@ -610,7 +612,9 @@ es_func_fd_write (void *cookie, const char *buffer, size_t size)
estream_cookie_fd_t file_cookie = cookie;
ssize_t bytes_written;
- bytes_written = ESTREAM_SYS_WRITE (file_cookie->fd, buffer, size);
+ do
+ bytes_written = ESTREAM_SYS_WRITE (file_cookie->fd, buffer, size);
+ while (bytes_written == -1 && errno == EINTR);
return bytes_written;
}