File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3838
3939#ifdef HAVE_CONFIG_H
4040#include "config.h"
41- #include "config_unix.h"
42- #include "config_win32.h"
4341#else
4442#define SRCDIR ".."
4543#endif
4644
45+ #include <assert.h>
4746#include <stdbool.h>
4847#include <stdio.h>
4948#include <stdlib.h>
5049#include <string.h>
5150#include <sys/stat.h>
5251
53- #include "debug.h"
54- #include "utils/fs.h"
55- #include "utils/macros.h"
56- #include "utils/string.h"
52+ #ifdef _WIN32
53+ #include <windows.h> // for GetModuleFileNameA, GetTempPathA
54+ #endif
5755
5856// for get_exec_path
5957#ifdef __APPLE__
6866#include "host.h" // for uv_argv
6967#endif
7068
69+ #include "debug.h"
70+ #include "utils/fs.h"
71+ #include "utils/macros.h"
72+ #include "utils/string.h"
73+
7174#define MOD_NAME "[fs] "
7275
7376/**
@@ -271,7 +274,7 @@ FILE *get_temp_file(const char **filename) {
271274 }
272275 return ret ;
273276#else
274- snprintf_ch (filename_buf , "%s%s" , get_temp_dir (), "/ uv.XXXXXX" );
277+ snprintf_ch (filename_buf , "%s%s" , get_temp_dir (), "uv.XXXXXX" );
275278 umask (S_IRWXG |S_IRWXO );
276279 int fd = mkstemp (filename_buf );
277280 if (fd == -1 ) {
You can’t perform that action at this time.
0 commit comments