+ /* This test fails on HP-UX 11.00..11.11. */
+ {
+ int fd;
+ char buf[] = "01";
+
+ fd = open ("conftest.out", O_WRONLY | O_CREAT | O_TRUNC, 0600);
+ if (fd < 0)
+ return 3;
+ if (write (fd, buf, 2) < 2)
+ return 4;
+ if (close (fd) < 0)
+ return 5;
+
+ fd = open ("conftest.out", O_WRONLY, 0600);
+ if (fd < 0)
+ return 6;
+ if (pwrite (fd, "W", 1, (off_t) 0) != 1)
+ return 7;
+ if (close (fd) < 0)
+ return 8;
+
+ fd = open ("conftest.out", O_RDONLY);
+ if (fd < 0)
+ return 9;
+ if (read (fd, buf, 2) < 2)
+ return 10;
+ if (close (fd) < 0)
+ return 11;
+ if (buf[0] != 'W')
+ return 12;
+ if (buf[1] != '1')
+ return 13;
+ }
+ return 0;
+}
+
+