diff options
| author | Sascha Schumann <sas@php.net> | 2002-10-02 06:05:16 +0000 |
|---|---|---|
| committer | Sascha Schumann <sas@php.net> | 2002-10-02 06:05:16 +0000 |
| commit | e1dd35bddb25e4f88567c543d96418fe985afbd4 (patch) | |
| tree | 7aaa42aa046d67965d04be36610dc44c26eaaf44 /ext/session/mod_files.c | |
| parent | d4c7e8bbaf83905b8e83295c5546d0bf328182a5 (diff) | |
| download | php-git-e1dd35bddb25e4f88567c543d96418fe985afbd4.tar.gz | |
The pread/pwrite macros check for a bug in the Linux glibc now.
The bug causes the kernel not to return -1/EAGAIN. The new test case
has been borrowed from the Linux Test Project.
This also fixes a bug which apparently caused HAVE_PREAD/WRITE to be
defined even if the more complex checks failed (ac_cv_func_NAME=no
was set albeit with no difference).
Diffstat (limited to 'ext/session/mod_files.c')
| -rw-r--r-- | ext/session/mod_files.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c index 1a784e8b1e..541adbea91 100644 --- a/ext/session/mod_files.c +++ b/ext/session/mod_files.c @@ -271,7 +271,7 @@ PS_READ_FUNC(files) data->st_size = *vallen = sbuf.st_size; *val = emalloc(sbuf.st_size); -#if defined(HAVE_WORKING_PREAD_TEST) && defined(HAVE_PREAD) +#if 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); -#if defined(HAVE_WORKING_PWRITE_TEST) && defined(HAVE_PWRITE) +#if defined(HAVE_PWRITE) n = pwrite(data->fd, val, vallen, 0); #else lseek(data->fd, 0, SEEK_SET); |
