summaryrefslogtreecommitdiff
path: root/ext/mysql/libmysql/my_create.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mysql/libmysql/my_create.c')
-rw-r--r--ext/mysql/libmysql/my_create.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/ext/mysql/libmysql/my_create.c b/ext/mysql/libmysql/my_create.c
index d227140b09..f1d1e6f2fb 100644
--- a/ext/mysql/libmysql/my_create.c
+++ b/ext/mysql/libmysql/my_create.c
@@ -1,12 +1,12 @@
-/* Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB
- This file is public domain and comes with NO WARRANTY of any kind */
+/* Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB
+This file is public domain and comes with NO WARRANTY of any kind */
#define USES_TYPES
#include "mysys_priv.h"
#include <my_dir.h>
#include "mysys_err.h"
#include <errno.h>
-#if defined(MSDOS) || defined(__WIN32__)
+#if defined(MSDOS) || defined(__WIN__)
#include <share.h>
#endif
@@ -34,7 +34,7 @@ File my_create(const char *FileName, int CreateFlags, int access_flags,
#elif defined(VMS)
fd = open((my_string) FileName, access_flags | O_CREAT, 0,
"ctx=stm","ctx=bin");
-#elif defined(MSDOS) || defined(__WIN32__)
+#elif defined(MSDOS) || defined(__WIN__)
if (access_flags & O_SHARE)
fd = sopen((my_string) FileName, access_flags | O_CREAT | O_BINARY,
SH_DENYNO, MY_S_IREAD | MY_S_IWRITE);
@@ -48,11 +48,15 @@ File my_create(const char *FileName, int CreateFlags, int access_flags,
if (fd >= 0)
{
if ((int) fd >= MY_NFILE)
+ {
+ DBUG_PRINT("exit",("fd: %d",fd));
DBUG_RETURN(fd); /* safeguard */
+ }
if ((my_file_info[fd].name = (char*) my_strdup(FileName,MyFlags)))
{
my_file_opened++;
my_file_info[fd].type = FILE_BY_CREATE;
+ DBUG_PRINT("exit",("fd: %d",fd));
DBUG_RETURN(fd);
}
VOID(my_close(fd,MyFlags));