~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_fstream.c

  • Committer: Brian Aker
  • Date: 2008-11-04 15:39:09 UTC
  • mfrom: (575.1.2 devel)
  • Revision ID: brian@tangent.org-20081104153909-c72hn65udxs1ccal
Merge of Monty's work

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
    #           Number of bytes written
43
43
*/
44
44
 
45
 
size_t my_fwrite(FILE *stream, const uchar *Buffer, size_t Count, myf MyFlags)
 
45
size_t my_fwrite(FILE *stream, const unsigned char *Buffer, size_t Count, myf MyFlags)
46
46
{
47
47
  size_t writtenbytes =0;
48
48
  my_off_t seekptr;
49
49
#if !defined(NO_BACKGROUND) && defined(USE_MY_STREAM)
50
 
  uint errors;
 
50
  uint32_t errors;
51
51
#endif
52
52
 
53
53
#if !defined(NO_BACKGROUND) && defined(USE_MY_STREAM)
71
71
#ifdef EINTR
72
72
      if (errno == EINTR)
73
73
      {
74
 
        VOID(my_fseek(stream,seekptr,MY_SEEK_SET,MYF(0)));
 
74
        my_fseek(stream,seekptr,MY_SEEK_SET,MYF(0));
75
75
        continue;
76
76
      }
77
77
#endif
84
84
        if (!(errors++ % MY_WAIT_GIVE_USER_A_MESSAGE))
85
85
          my_error(EE_DISK_FULL,MYF(ME_BELL | ME_NOREFRESH),
86
86
                   "[stream]",my_errno,MY_WAIT_FOR_USER_TO_FIX_PANIC);
87
 
        VOID(sleep(MY_WAIT_FOR_USER_TO_FIX_PANIC));
88
 
        VOID(my_fseek(stream,seekptr,MY_SEEK_SET,MYF(0)));
 
87
        sleep(MY_WAIT_FOR_USER_TO_FIX_PANIC);
 
88
        my_fseek(stream,seekptr,MY_SEEK_SET,MYF(0));
89
89
        continue;
90
90
      }
91
91
#endif