VC++ compilation
This commit is contained in:
+7
-4
@@ -37,6 +37,7 @@
|
|||||||
#include "opentx.h"
|
#include "opentx.h"
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <direct.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
@@ -324,6 +325,11 @@ void *main_thread(void *)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined WIN32 || !defined __GNUC__
|
||||||
|
#define chdir _chdir
|
||||||
|
#define getcwd _getcwd
|
||||||
|
#endif
|
||||||
|
|
||||||
pthread_t main_thread_pid;
|
pthread_t main_thread_pid;
|
||||||
void StartMainThread(bool tests)
|
void StartMainThread(bool tests)
|
||||||
{
|
{
|
||||||
@@ -514,11 +520,8 @@ FRESULT f_chdir (const TCHAR *name)
|
|||||||
else
|
else
|
||||||
strcpy(path, name);
|
strcpy(path, name);
|
||||||
|
|
||||||
#if defined WIN32 || !defined __GNUC__
|
|
||||||
_chdir(path);
|
|
||||||
#else
|
|
||||||
chdir(path);
|
chdir(path);
|
||||||
#endif
|
|
||||||
return FR_OK;
|
return FR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user