sas             Wed Oct  2 04:32:26 2002 EDT

  Modified files:              
    /php4       acinclude.m4 
  Log:
  Another Linux x86 system returns ELIMIT so we need to check errno as well
  before assuming that pread/pwrite work.
  
  
Index: php4/acinclude.m4
diff -u php4/acinclude.m4:1.208 php4/acinclude.m4:1.209
--- php4/acinclude.m4:1.208     Wed Oct  2 02:05:15 2002
+++ php4/acinclude.m4   Wed Oct  2 04:32:26 2002
@@ -1,4 +1,4 @@
-dnl $Id: acinclude.m4,v 1.208 2002/10/02 06:05:15 sas Exp $
+dnl $Id: acinclude.m4,v 1.209 2002/10/02 08:32:26 sas Exp $
 dnl
 dnl This file contains local autoconf functions.
 
@@ -380,6 +380,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
+#include <errno.h>
 $1
     main() {
     int fd = open("conftest_in", O_WRONLY|O_CREAT, 0600);
@@ -387,7 +388,7 @@
     if (fd < 0) exit(1);
     if (pwrite(fd, "text", 4, 0) != 4) exit(1);
     /* Linux glibc breakage until 2.2.5 */
-    if (pwrite(fd, "text", 4, -1) != -1) exit(1);
+    if (pwrite(fd, "text", 4, -1) != -1 || errno != EINVAL) exit(1);
     exit(0);
     }
 
@@ -407,6 +408,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
+#include <errno.h>
 $1
     main() {
     char buf[3]; 
@@ -414,7 +416,7 @@
     if (fd < 0) exit(1);
     if (pread(fd, buf, 2, 0) != 2) exit(1);
     /* Linux glibc breakage until 2.2.5 */
-    if (pread(fd, buf, 2, -1) != -1) exit(1);
+    if (pread(fd, buf, 2, -1) != -1 || errno != EINVAL) exit(1);
     exit(0);
     }
   ],[



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to