mirror of
https://github.com/mirror/make.git
synced 2025-02-05 09:10:12 +08:00
Foix compilation with MSVC.
w32/compat/posixfcn.c (tmpfile): Move declaration of h before the first executable statement. Reported by Gisle Vanem <gvanem@yahoo.no>.
This commit is contained in:
parent
b539908f73
commit
b69b04dc8c
@ -1,3 +1,9 @@
|
|||||||
|
2013-10-07 Eli Zaretskii <eliz@gnu.org>
|
||||||
|
|
||||||
|
* w32/compat/posixfcn.c (tmpfile): Move declaration of h before
|
||||||
|
the first executable statement. Reported by Gisle Vanem
|
||||||
|
<gvanem@yahoo.no>.
|
||||||
|
|
||||||
2013-10-05 Paul Smith <psmith@gnu.org>
|
2013-10-05 Paul Smith <psmith@gnu.org>
|
||||||
|
|
||||||
* makeint.h (MAP_USERFUNC): A new map type for function names.
|
* makeint.h (MAP_USERFUNC): A new map type for function names.
|
||||||
|
@ -301,19 +301,21 @@ tmpfile (void)
|
|||||||
path_size + sizemax < sizeof temp_path &&
|
path_size + sizemax < sizeof temp_path &&
|
||||||
!(uniq >= 0x10000 && second_loop))
|
!(uniq >= 0x10000 && second_loop))
|
||||||
{
|
{
|
||||||
|
HANDLE h;
|
||||||
|
|
||||||
sprintf (temp_path + path_size,
|
sprintf (temp_path + path_size,
|
||||||
"%s%s%u-%x.tmp",
|
"%s%s%u-%x.tmp",
|
||||||
temp_path[path_size - 1] == '\\' ? "" : "\\",
|
temp_path[path_size - 1] == '\\' ? "" : "\\",
|
||||||
base, pid, uniq);
|
base, pid, uniq);
|
||||||
HANDLE h = CreateFile (temp_path, /* file name */
|
h = CreateFile (temp_path, /* file name */
|
||||||
GENERIC_READ | GENERIC_WRITE | DELETE, /* desired access */
|
GENERIC_READ | GENERIC_WRITE | DELETE, /* desired access */
|
||||||
FILE_SHARE_READ | FILE_SHARE_WRITE, /* share mode */
|
FILE_SHARE_READ | FILE_SHARE_WRITE, /* share mode */
|
||||||
NULL, /* default security attributes */
|
NULL, /* default security attributes */
|
||||||
CREATE_NEW, /* creation disposition */
|
CREATE_NEW, /* creation disposition */
|
||||||
FILE_ATTRIBUTE_NORMAL | /* flags and attributes */
|
FILE_ATTRIBUTE_NORMAL | /* flags and attributes */
|
||||||
FILE_ATTRIBUTE_TEMPORARY |
|
FILE_ATTRIBUTE_TEMPORARY |
|
||||||
FILE_FLAG_DELETE_ON_CLOSE,
|
FILE_FLAG_DELETE_ON_CLOSE,
|
||||||
NULL); /* no template file */
|
NULL); /* no template file */
|
||||||
|
|
||||||
if (h == INVALID_HANDLE_VALUE)
|
if (h == INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user