~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_open.cc

Removed global.h. Fixed all the headers.
Also fixed headers to allow for some out of tree builds.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#include "mysys/mysys_err.h"
18
18
#include "my_dir.h"
19
19
 
20
 
#include <errno.h>
21
 
#include <stdlib.h>
22
 
#include <string.h>
 
20
#include <fcntl.h>
 
21
 
 
22
#include <cerrno>
 
23
#include <cstdlib>
 
24
#include <cstring>
23
25
 
24
26
/*
25
27
  Open a file
31
33
      MyFlags   Special flags
32
34
 
33
35
  RETURN VALUE
34
 
    File descriptor
 
36
    int descriptor
35
37
*/
36
38
 
37
 
File my_open(const char *FileName, int Flags, myf MyFlags)
 
39
int my_open(const char *FileName, int Flags, myf MyFlags)
38
40
                                /* Path-name of file */
39
41
                                /* Read | write .. */
40
42
                                /* Special flags */
41
43
{
42
 
  File fd;
 
44
  int fd;
43
45
 
44
46
#if !defined(NO_OPEN_3)
45
47
  fd = open(FileName, Flags, my_umask); /* Normal unix */
61
63
 
62
64
*/
63
65
 
64
 
int my_close(File fd, myf MyFlags)
 
66
int my_close(int fd, myf MyFlags)
65
67
{
66
68
  int err;
67
69
 
99
101
 
100
102
*/
101
103
 
102
 
File my_register_filename(File fd, const char *FileName, uint32_t error_message_number, myf MyFlags)
 
104
int my_register_filename(int fd, const char *FileName, uint32_t error_message_number, myf MyFlags)
103
105
{
104
106
  if ((int) fd >= 0)
105
107
  {