# | Line 149 | Line 149 | temp_fd(char *s, size_t len, char *templ) | |
---|---|---|
149 | ||
150 | ts = prepare_tmpname(s, len, templ); | |
151 | if (ts == NULL) return -1; | |
152 | < | #ifdef _WIN32 |
152 | > | #if defined(_WIN32) || defined(_WIN64) |
153 | ts = mktemp(ts); | |
154 | if (ts == NULL) return -1; | |
155 | return open(ts, O_CREAT|O_EXCL, S_IRUSR|S_IWUSR); | |
# | Line 162 | Line 162 | temp_fd(char *s, size_t len, char *templ) | |
162 | FILE * | |
163 | temp_fp(char *s, size_t len, char *templ) | |
164 | { | |
165 | < | int fd = temp_file(s, len, templ); |
165 | > | int fd = temp_fd(s, len, templ); |
166 | if (fd < 0) return NULL; | |
167 | return fdopen(fd, "w+"); | |
168 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |