Commit 1548c6b7 authored by unknown's avatar unknown

Merge hundin.mysql.fi:/home/heikki/mysql-4.0

into hundin.mysql.fi:/home/heikki/mysql-4.1


configure.in:
  SCCS merged
innobase/os/os0file.c:
  SCCS merged
parents ba9ca889 fed35d92
...@@ -1850,6 +1850,7 @@ os_file_pread( ...@@ -1850,6 +1850,7 @@ os_file_pread(
return(n_bytes); return(n_bytes);
#else #else
{ {
off_t ret_offset;
ssize_t ret; ssize_t ret;
ulint i; ulint i;
...@@ -1858,12 +1859,12 @@ os_file_pread( ...@@ -1858,12 +1859,12 @@ os_file_pread(
os_mutex_enter(os_file_seek_mutexes[i]); os_mutex_enter(os_file_seek_mutexes[i]);
ret = lseek(file, offs, 0); ret_offset = lseek(file, offs, SEEK_SET);
if (ret < 0) { if (ret_offset < 0) {
os_mutex_exit(os_file_seek_mutexes[i]); os_mutex_exit(os_file_seek_mutexes[i]);
return(ret); return(-1);
} }
ret = read(file, buf, (ssize_t)n); ret = read(file, buf, (ssize_t)n);
...@@ -1936,6 +1937,7 @@ os_file_pwrite( ...@@ -1936,6 +1937,7 @@ os_file_pwrite(
return(ret); return(ret);
#else #else
{ {
off_t ret_offset;
ulint i; ulint i;
/* Protect the seek / write operation with a mutex */ /* Protect the seek / write operation with a mutex */
...@@ -1943,12 +1945,12 @@ os_file_pwrite( ...@@ -1943,12 +1945,12 @@ os_file_pwrite(
os_mutex_enter(os_file_seek_mutexes[i]); os_mutex_enter(os_file_seek_mutexes[i]);
ret = lseek(file, offs, 0); ret_offset = lseek(file, offs, SEEK_SET);
if (ret < 0) { if (ret_offset < 0) {
os_mutex_exit(os_file_seek_mutexes[i]); os_mutex_exit(os_file_seek_mutexes[i]);
return(ret); return(-1);
} }
ret = write(file, buf, (ssize_t)n); ret = write(file, buf, (ssize_t)n);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment