~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_create.cc

  • Committer: Brian Aker
  • Date: 2009-09-26 04:00:11 UTC
  • mfrom: (1126.12.1 trunk-nodebug)
  • Revision ID: brian@gaz-20090926040011-2qzxdcbpm1ibpkhl
Merge Lee

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_priv.h"
17
 
#include <my_dir.h>
18
 
#include "mysys_err.h"
 
16
#include "mysys/mysys_priv.h"
 
17
#include "my_dir.h"
 
18
#include "mysys/mysys_err.h"
 
19
 
19
20
#include <errno.h>
20
 
#include <my_sys.h>
21
21
        /*
22
22
        ** Create a new file
23
23
        ** Arguments:
29
29
 
30
30
 
31
31
File my_create(const char *FileName, int CreateFlags, int access_flags,
32
 
               myf MyFlags)
 
32
               myf MyFlags)
33
33
{
34
34
  int fd, rc;
35
35
 
47
47
    fd= -1;
48
48
  }
49
49
 
50
 
  rc= my_register_filename(fd, FileName, FILE_BY_CREATE,
51
 
                           EE_CANTCREATEFILE, MyFlags);
 
50
  rc= my_register_filename(fd, FileName, EE_CANTCREATEFILE, MyFlags);
52
51
  /*
53
52
    my_register_filename() may fail on some platforms even if the call to
54
53
    *open() above succeeds. In this case, don't leave the stale file because
61
60
    my_delete(FileName, MyFlags);
62
61
    my_errno= tmp;
63
62
  }
64
 
  
 
63
 
65
64
  return(rc);
66
65
} /* my_create */