diff options
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/my_delete.c | 2 | ||||
-rw-r--r-- | mysys/my_thr_init.c | 5 | ||||
-rw-r--r-- | mysys/my_winfile.c | 15 |
3 files changed, 14 insertions, 8 deletions
diff --git a/mysys/my_delete.c b/mysys/my_delete.c index 22425ed95fd..3ab6ba399f9 100644 --- a/mysys/my_delete.c +++ b/mysys/my_delete.c @@ -36,7 +36,7 @@ int my_delete(const char *name, myf MyFlags) DBUG_RETURN(err); } /* my_delete */ -#if defined(__WIN__) && defined(__NT__) +#if defined(__WIN__) /* Delete file which is possibly not closed. diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c index c59b2d51742..c6057f19a82 100644 --- a/mysys/my_thr_init.c +++ b/mysys/my_thr_init.c @@ -267,6 +267,11 @@ my_bool my_thread_init(void) #endif goto end; } + +#ifdef _MSC_VER + install_sigabrt_handler(); +#endif + if (!(tmp= (struct st_my_thread_var *) calloc(1, sizeof(*tmp)))) { error= 1; diff --git a/mysys/my_winfile.c b/mysys/my_winfile.c index de1d747c967..6a2cda5ba29 100644 --- a/mysys/my_winfile.c +++ b/mysys/my_winfile.c @@ -314,10 +314,10 @@ size_t my_win_pread(File Filedes, uchar *Buffer, size_t Count, my_off_t offset) if(!ReadFile(hFile, Buffer, (DWORD)Count, &nBytesRead, &ov)) { DWORD lastError= GetLastError(); - /*
- ERROR_BROKEN_PIPE is returned when no more data coming
- through e.g. a command pipe in windows : see MSDN on ReadFile.
- */
+ /* + ERROR_BROKEN_PIPE is returned when no more data coming + through e.g. a command pipe in windows : see MSDN on ReadFile. + */ if(lastError == ERROR_HANDLE_EOF || lastError == ERROR_BROKEN_PIPE) DBUG_RETURN(0); /*return 0 at EOF*/ my_osmaperr(lastError); @@ -367,8 +367,8 @@ size_t my_win_pwrite(File Filedes, const uchar *Buffer, size_t Count, LARGE_INTEGER li; DBUG_ENTER("my_win_pwrite"); - DBUG_PRINT("my",("Filedes: %d, Buffer: %p, Count: %zd, offset: %llu", - Filedes, Buffer, Count, (ulonglong)offset)); + DBUG_PRINT("my",("Filedes: %d, Buffer: %p, Count: %llu, offset: %llu", + Filedes, Buffer, (ulonglong)Count, (ulonglong)offset)); if(!Count) DBUG_RETURN(0); @@ -425,7 +425,8 @@ size_t my_win_write(File fd, const uchar *Buffer, size_t Count) HANDLE hFile; DBUG_ENTER("my_win_write"); - DBUG_PRINT("my",("Filedes: %d, Buffer: %p, Count %zd", fd, Buffer, Count)); + DBUG_PRINT("my",("Filedes: %d, Buffer: %p, Count %llu", fd, Buffer, + (ulonglong)Count)); if(my_get_open_flags(fd) & _O_APPEND) { /* |