~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_dup.cc

Merge of Jay

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 "mysys_err.h"
18
 
#include <my_dir.h>
 
16
#include "mysys/mysys_priv.h"
 
17
#include "mysys/mysys_err.h"
19
18
#include <errno.h>
20
19
        /* Open a file */
21
20
 
22
21
File my_dup(File file, myf MyFlags)
23
22
{
24
23
  File fd;
25
 
  const char *filename;
26
 
  fd = dup(file);
27
 
  filename= (((uint) file < my_file_limit) ?
28
 
             my_file_info[(int) file].name : "Unknown");
29
 
  return(my_register_filename(fd, filename, FILE_BY_DUP,
30
 
                                   EE_FILENOTFOUND, MyFlags));
 
24
  fd= dup(file);
 
25
 
 
26
 
 
27
  return(my_register_filename(fd, "Unknown", EE_FILENOTFOUND, MyFlags));
31
28
}