]> granicus.if.org Git - php/commitdiff
Disable pread/pwrite for now until we can clarify why it should be
authorSascha Schumann <sas@php.net>
Tue, 1 Oct 2002 19:19:10 +0000 (19:19 +0000)
committerSascha Schumann <sas@php.net>
Tue, 1 Oct 2002 19:19:10 +0000 (19:19 +0000)
impossible to write a check for a broken OS feature.

ext/session/mod_files.c

index 82727d3da13c81bd414e17649ce56c8c9b779e24..1a784e8b1efe2ff7c1efb01be0252b026f9b4d8f 100644 (file)
@@ -271,7 +271,7 @@ PS_READ_FUNC(files)
        data->st_size = *vallen = sbuf.st_size;
        *val = emalloc(sbuf.st_size);
 
-#ifdef HAVE_PREAD
+#if defined(HAVE_WORKING_PREAD_TEST) && defined(HAVE_PREAD)
        n = pread(data->fd, *val, sbuf.st_size, 0);
 #else
        lseek(data->fd, 0, SEEK_SET);
@@ -307,7 +307,7 @@ PS_WRITE_FUNC(files)
        if (vallen < (int)data->st_size)
                ftruncate(data->fd, 0);
 
-#ifdef HAVE_PWRITE
+#if defined(HAVE_WORKING_PWRITE_TEST) && defined(HAVE_PWRITE)
        n = pwrite(data->fd, val, vallen, 0);
 #else
        lseek(data->fd, 0, SEEK_SET);