~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_quick.c

  • Committer: Brian Aker
  • Date: 2008-07-18 20:10:26 UTC
  • mfrom: (51.3.29 remove-dbug)
  • Revision ID: brian@tangent.org-20080718201026-tto5golt0xhwqe4a
Merging in Jay's final patch on dbug.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
  if ((readbytes = read(Filedes, Buffer, Count)) != Count)
27
27
  {
28
 
#ifndef DBUG_OFF
29
 
    if ((readbytes == 0 || readbytes == (size_t) -1) && errno == EINTR)
30
 
    {  
31
 
      DBUG_PRINT("error", ("my_quick_read() was interrupted and returned %d"
32
 
                           ".  This function does not retry the read!",
33
 
                           (int) readbytes));
34
 
    }
35
 
#endif
36
28
    my_errno=errno;
37
29
    return readbytes;
38
30
  }
42
34
 
43
35
size_t my_quick_write(File Filedes,const uchar *Buffer,size_t Count)
44
36
{
45
 
#ifndef DBUG_OFF
46
 
  size_t writtenbytes;
47
 
#endif
48
 
 
49
37
  if ((
50
 
#ifndef DBUG_OFF
51
 
       writtenbytes =
52
 
#endif
53
38
       (size_t) write(Filedes,Buffer,Count)) != Count)
54
39
  {
55
 
#ifndef DBUG_OFF
56
 
    if ((writtenbytes == 0 || writtenbytes == (size_t) -1) && errno == EINTR)
57
 
    {  
58
 
      DBUG_PRINT("error", ("my_quick_write() was interrupted and returned %d"
59
 
                           ".  This function does not retry the write!",
60
 
                           (int) writtenbytes));
61
 
    }
62
 
#endif
63
40
    my_errno=errno;
64
41
    return (size_t) -1;
65
42
  }