Commit 58b02cee authored by John van Groningen's avatar John van Groningen
Browse files

Merge branch 'quote-arguments-with-mingw' into 'master'

Quote arguments with mingw

See merge request !14
parents 978cfd39 e9c6af2e
Pipeline #46016 passed with stage
in 14 seconds
......@@ -70,6 +70,7 @@
# include <windef.h>
# include <winbase.h>
# ifdef __MINGW32__
# define QUOTE_SPAWN_ARGUMENTS
# include <winuser.h>
# else
# include <WinUser.h>
......@@ -3771,14 +3772,17 @@ static int link_project (P_NODE first_project_node,char *options_file_name,char
strcpy (kernel32_file_name,"\"-l");
strcpy (kernel32_file_name+3,system_file_name+1);
replace_file_name_in_path (kernel32_file_name+3,"kernel_library","");
strcat (kernel32_file_name+3,"\"");
*arg++ = kernel32_file_name;
strcpy (user32_file_name,"\"-l");
strcpy (user32_file_name+3,system_file_name+1);
replace_file_name_in_path (user32_file_name+3,"user_library","");
strcat (user32_file_name+3,"\"");
*arg++ = user32_file_name;
strcpy (gdi32_file_name,"\"-l");
strcpy (gdi32_file_name+3,system_file_name+1);
replace_file_name_in_path (gdi32_file_name+3,"gdi_library","");
strcat (gdi32_file_name+3,"\"");
*arg++ = gdi32_file_name;
# else
strcpy (kernel32_file_name,"-l");
......@@ -3862,10 +3866,14 @@ static int link_project (P_NODE first_project_node,char *options_file_name,char
}
*cmd++=' ';
#ifndef QUOTE_SPAWN_ARGUMENTS
*cmd++='"';
#endif
for (char *c=*arg; *c; c++)
*cmd++=*c;
#ifndef QUOTE_SPAWN_ARGUMENTS
*cmd++='"';
#endif
}
*cmd='\0';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment