fix: build and run on windows with MinGW#302
fix: build and run on windows with MinGW#302tangxinfa wants to merge 1 commit intoHardySimpson:masterfrom
Conversation
c287aab to
b03c16a
Compare
4a3e424 to
0922dd1
Compare
| time_stamp_convert_function(&(now_sec), time); | ||
| if (use_utc) { | ||
| gmtime_r(&(now_sec), time); | ||
| } else { |
There was a problem hiding this comment.
On MinGW gmtime_r and localtime_r are inline functions, can't get function pointers
| a_thread->event->last_pid = a_thread->event->pid; | ||
| a_thread->event->pid_str_len | ||
| = sprintf(a_thread->event->pid_str, "%u", a_thread->event->pid); | ||
| = sprintf(a_thread->event->pid_str, "%ld", (long)a_thread->event->pid); |
| #define zlog_stat stat64 | ||
| #elif defined(_WIN32) | ||
| #elif defined(_WIN32) && !defined(__MINGW32__) | ||
| #define zlog_fstat _fstat |
There was a problem hiding this comment.
Conflict with MinGW defined macros
|
Is there any progress on Windows MinGW porting?
|
|
Porting zlog to windows is a heavy lift, even though there already did some For support Non-ASCII path we must use wide char version of api. This means we must convert multi byte path to utf-16 string, and call wide char For support long path(exceed 260 characters), we must rewrite all posix and Finally, most of the people will give up, especially just do it for one small project. |
Fix build errors and segmentation fault on Windows