summaryrefslogtreecommitdiff
path: root/ext/mysql/libmysql/my_create.c
diff options
context:
space:
mode:
authorMySQL Team <mysql@php.net>2000-10-20 22:26:48 +0000
committerMySQL Team <mysql@php.net>2000-10-20 22:26:48 +0000
commita2dbb10eb14801370522ec248e1d819eb38a83a2 (patch)
treec3888dc986fa7baa6937b38d485af20d8ee81d9d /ext/mysql/libmysql/my_create.c
parentebaf484830ab5c7a0e14a9b43a174916330cd031 (diff)
downloadphp-git-a2dbb10eb14801370522ec248e1d819eb38a83a2.tar.gz
Update libmysql to 3.23 version. No major changes visible to the user - mostly
bug fixes and other maintenance-oriented changes.
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));