~eday/drizzle/eday-dev

« back to all changes in this revision

Viewing changes to drizzled/internal/my_copy.cc

  • Committer: Eric Day
  • Date: 2010-01-07 20:02:38 UTC
  • mfrom: (971.3.291 staging)
  • Revision ID: eday@oddments.org-20100107200238-uqw8v6kv9pl7nny5
Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
   along with this program; if not, write to the Free Software
14
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
 
#include "mysys/mysys_priv.h"
17
 
 
18
 
#include <mystrings/m_string.h>
 
16
#include "drizzled/internal/mysys_priv.h"
 
17
 
 
18
#include <fcntl.h>
 
19
 
 
20
#include "drizzled/internal/m_string.h"
19
21
#if defined(HAVE_UTIME_H)
20
22
#include <utime.h>
21
23
#elif defined(HAVE_SYS_UTIME_H)
28
30
};
29
31
#endif
30
32
 
 
33
#ifdef HAVE_SYS_STAT_H
 
34
# include <sys/stat.h>
 
35
#endif
 
36
 
31
37
#include <drizzled/util/test.h>
32
38
 
33
39
/*
54
60
  uint32_t Count;
55
61
  bool new_file_stat= 0; /* 1 if we could stat "to" */
56
62
  int create_flag;
57
 
  File from_file,to_file;
 
63
  int from_file,to_file;
58
64
  unsigned char buff[IO_SIZE];
59
65
  struct stat stat_buff,new_stat_buff;
60
66
 
67
73
  {
68
74
    if (stat(from, &stat_buff))
69
75
    {
70
 
      my_errno=errno;
 
76
      errno=errno;
71
77
      goto err;
72
78
    }
73
79
    if (MyFlags & MY_HOLD_ORIGINAL_MODES && new_file_stat)