~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/mf_iocache.c

  • Committer: Monty Taylor
  • Date: 2008-10-02 01:31:53 UTC
  • mfrom: (398.1.6 codestyle-new)
  • Revision ID: monty@inaugust.com-20081002013153-b097om921cd3j1pn
MergedĀ fromĀ stdint-includes-fix.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1024
1024
  */
1025
1025
  while (write_length)
1026
1026
  {
1027
 
    size_t copy_length= min(write_length, write_cache->buffer_length);
 
1027
    size_t copy_length= cmin(write_length, write_cache->buffer_length);
1028
1028
    int  __attribute__((unused)) rc;
1029
1029
 
1030
1030
    rc= lock_io_cache(write_cache, write_cache->pos_in_file);
1182
1182
      TODO: figure out if the assert below is needed or correct.
1183
1183
    */
1184
1184
    assert(pos_in_file == info->end_of_file);
1185
 
    copy_len=min(Count, len_in_buff);
 
1185
    copy_len=cmin(Count, len_in_buff);
1186
1186
    memcpy(Buffer, info->append_read_pos, copy_len);
1187
1187
    info->append_read_pos += copy_len;
1188
1188
    Count -= copy_len;
1284
1284
      }
1285
1285
    }
1286
1286
        /* Copy found bytes to buffer */
1287
 
    length=min(Count,read_length);
 
1287
    length=cmin(Count,read_length);
1288
1288
    memcpy(Buffer,info->read_pos,(size_t) length);
1289
1289
    Buffer+=length;
1290
1290
    Count-=length;
1318
1318
      if ((read_length=my_read(info->file,info->request_pos,
1319
1319
                               read_length, info->myflags)) == (size_t) -1)
1320
1320
        return info->error= -1;
1321
 
      use_length=min(Count,read_length);
 
1321
      use_length=cmin(Count,read_length);
1322
1322
      memcpy(Buffer,info->request_pos,(size_t) use_length);
1323
1323
      info->read_pos=info->request_pos+Count;
1324
1324
      info->read_end=info->request_pos+read_length;