~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to vio/viosocket.c

  • Committer: Monty Taylor
  • Date: 2008-10-05 01:41:06 UTC
  • Revision ID: monty@inaugust.com-20081005014106-bulqe4kp7i6ipts1
Moved qsort declarations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
#include "vio_priv.h"
24
24
#include <sys/socket.h>
25
 
#include <drizzled/util/test.h>
26
25
 
27
26
int vio_errno(Vio *vio __attribute__((unused)))
28
27
{
30
29
}
31
30
 
32
31
 
33
 
size_t vio_read(Vio * vio, unsigned char* buf, size_t size)
 
32
size_t vio_read(Vio * vio, uchar* buf, size_t size)
34
33
{
35
34
  size_t r;
36
35
 
47
46
  reduce number of syscalls.
48
47
*/
49
48
 
50
 
size_t vio_read_buff(Vio *vio, unsigned char* buf, size_t size)
 
49
size_t vio_read_buff(Vio *vio, uchar* buf, size_t size)
51
50
{
52
51
  size_t rc;
53
52
#define VIO_UNBUFFERED_READ_MIN_SIZE 2048
65
64
  }
66
65
  else if (size < VIO_UNBUFFERED_READ_MIN_SIZE)
67
66
  {
68
 
    rc= vio_read(vio, (unsigned char*) vio->read_buffer, VIO_READ_BUFFER_SIZE);
 
67
    rc= vio_read(vio, (uchar*) vio->read_buffer, VIO_READ_BUFFER_SIZE);
69
68
    if (rc != 0 && rc != (size_t) -1)
70
69
    {
71
70
      if (rc > size)
85
84
}
86
85
 
87
86
 
88
 
size_t vio_write(Vio * vio, const unsigned char* buf, size_t size)
 
87
size_t vio_write(Vio * vio, const uchar* buf, size_t size)
89
88
{
90
89
  size_t r;
91
90