mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
Backport into build-201102032246-5.1.52sp1
> ------------------------------------------------------------ > revno: 3537 > revision-id: davi.arnaut@oracle.com-20110107192806-rmvvxwhk10sy0219 > parent: davi.arnaut@oracle.com-20110107183336-kp8niwm2hz3wb4c3 > committer: Davi Arnaut <davi.arnaut@oracle.com> > branch nick: mysql-5.1 > timestamp: Fri 2011-01-07 17:28:06 -0200 > message: > Bug#51023: Mysql server crashes on SIGHUP and destroys InnoDB files > > WIN32 compilation fixes: define ETIMEDOUT only if not available and > fix typos and add a missing parameter.
This commit is contained in:
parent
436b67e324
commit
5ac3c5dea3
2 changed files with 6 additions and 4 deletions
|
@ -126,7 +126,9 @@ struct tm *gmtime_r(const time_t *timep,struct tm *tmp);
|
|||
|
||||
void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/
|
||||
|
||||
#define ETIMEDOUT 145 /* Win32 doesn't have this */
|
||||
#ifndef ETIMEDOUT
|
||||
#define ETIMEDOUT 145 /* Win32 might not have this */
|
||||
#endif
|
||||
#define getpid() GetCurrentThreadId()
|
||||
#define HAVE_LOCALTIME_R 1
|
||||
#define _REENTRANT 1
|
||||
|
|
|
@ -103,17 +103,17 @@ FILE *my_fopen(const char *filename, int flags, myf MyFlags)
|
|||
|
||||
#if defined(_WIN32)
|
||||
|
||||
static FILE *my_win_freopen(const char *path, FILE *stream)
|
||||
static FILE *my_win_freopen(const char *path, const char *mode, FILE *stream)
|
||||
{
|
||||
int handle_fd, fd= _fileno(stream);
|
||||
HANDLE osfh;
|
||||
|
||||
DBUG_ASSERT(filename && stream);
|
||||
DBUG_ASSERT(path && stream);
|
||||
|
||||
/* Services don't have stdout/stderr on Windows, so _fileno returns -1. */
|
||||
if (fd < 0)
|
||||
{
|
||||
if (!freopen(filename, mode, stream))
|
||||
if (!freopen(path, mode, stream))
|
||||
return NULL;
|
||||
|
||||
fd= _fileno(stream);
|
||||
|
|
Loading…
Reference in a new issue