]> git.pond.sub.org Git - empserver/commitdiff
(fillcache, do_write): Revert the previous revision. The portability
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 26 Nov 2005 18:36:48 +0000 (18:36 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 26 Nov 2005 18:36:48 +0000 (18:36 +0000)
issue applies only to sockets, and EWOULDBLOCK isn't defined on all
systems.

src/lib/common/file.c

index 9781ad9b15828f01515a7d5389b19b74436f141f..fdba22b29ec1ac5c5c483ed3bef1accd410d2583 100644 (file)
@@ -276,7 +276,7 @@ fillcache(struct empfile *ep, int start)
     while (n > 0) {
        ret = read(ep->fd, p, n);
        if (ret < 0) {
-           if (errno != EAGAIN && errno != EWOULDBLOCK) {
+           if (errno != EAGAIN) {
                logerror("Error reading %s (%s)", ep->file, strerror(errno));
                break;
            }
@@ -319,7 +319,7 @@ do_write(struct empfile *ep, void *buf, int id, int count)
     while (n > 0) {
        ret = write(ep->fd, p, n);
        if (ret < 0) {
-           if (errno != EAGAIN && errno != EWOULDBLOCK) {
+           if (errno != EAGAIN) {
                logerror("Error writing %s (%s)", ep->file, strerror(errno));
                /* FIXME if this extended file, truncate back to old size */
                return -1;