Commit 607c399f authored by Georgi Kodinov's avatar Georgi Kodinov

merge

parents 453a941d e512d694
...@@ -228,18 +228,20 @@ int init_io_cache(IO_CACHE *info, File file, uint cachesize, ...@@ -228,18 +228,20 @@ int init_io_cache(IO_CACHE *info, File file, uint cachesize,
for (;;) for (;;)
{ {
uint buffer_block; uint buffer_block;
/*
Unset MY_WAIT_IF_FULL bit if it is set, to prevent conflict with
MY_ZEROFILL.
*/
myf flags= (myf) (cache_myflags & ~(MY_WME | MY_WAIT_IF_FULL));
if (cachesize < min_cache) if (cachesize < min_cache)
cachesize = min_cache; cachesize = min_cache;
buffer_block = cachesize; buffer_block = cachesize;
if (type == SEQ_READ_APPEND) if (type == SEQ_READ_APPEND)
buffer_block *= 2; buffer_block *= 2;
/* if (cachesize == min_cache)
Unset MY_WAIT_IF_FULL bit if it is set, to prevent conflict with flags|= (myf) MY_WME;
MY_ZEROFILL. if ((info->buffer= (byte*) my_malloc(buffer_block, flags)) != 0)
*/
myf flag = MYF((cache_myflags & ~ (MY_WME | MY_WAIT_IF_FULL)) |
(cachesize == min_cache ? MY_WME : 0));
if ((info->buffer= (byte*) my_malloc(buffer_block, flag)) != 0)
{ {
info->write_buffer=info->buffer; info->write_buffer=info->buffer;
if (type == SEQ_READ_APPEND) if (type == SEQ_READ_APPEND)
......
...@@ -77,7 +77,9 @@ end: ...@@ -77,7 +77,9 @@ end:
int my_copystat(const char *from, const char *to, int MyFlags) int my_copystat(const char *from, const char *to, int MyFlags)
{ {
struct stat statbuf; struct stat statbuf;
#if !defined(MSDOS) && !defined(__WIN__) && !defined(__EMX__) && !defined(OS2) && !defined(__NETWARE__)
int res; int res;
#endif /* MSDOS */
if (stat((char*) from, &statbuf)) if (stat((char*) from, &statbuf))
{ {
......
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