properly escape defines.
This commit is contained in:
parent
921be76b06
commit
1dbc1ea784
@ -35,7 +35,7 @@ project "curl-lib"
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if ca then
|
if ca then
|
||||||
defines { "CURL_CA_BUNDLE=\\\"" .. ca .. "\\\"" }
|
defines { 'CURL_CA_BUNDLE="' .. ca .. '"' }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -89,6 +89,7 @@
|
|||||||
|
|
||||||
function make.esc(value)
|
function make.esc(value)
|
||||||
result = value:gsub("\\", "\\\\")
|
result = value:gsub("\\", "\\\\")
|
||||||
|
result = result:gsub("\"", "\\\"")
|
||||||
result = result:gsub(" ", "\\ ")
|
result = result:gsub(" ", "\\ ")
|
||||||
result = result:gsub("%(", "\\(")
|
result = result:gsub("%(", "\\(")
|
||||||
result = result:gsub("%)", "\\)")
|
result = result:gsub("%)", "\\)")
|
||||||
|
@ -136,7 +136,7 @@
|
|||||||
function gcc.getdefines(defines)
|
function gcc.getdefines(defines)
|
||||||
local result = {}
|
local result = {}
|
||||||
for _, define in ipairs(defines) do
|
for _, define in ipairs(defines) do
|
||||||
table.insert(result, '-D' .. define)
|
table.insert(result, '-D' .. p.esc(define))
|
||||||
end
|
end
|
||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
@ -144,7 +144,7 @@
|
|||||||
function gcc.getundefines(undefines)
|
function gcc.getundefines(undefines)
|
||||||
local result = {}
|
local result = {}
|
||||||
for _, undefine in ipairs(undefines) do
|
for _, undefine in ipairs(undefines) do
|
||||||
table.insert(result, '-U' .. undefine)
|
table.insert(result, '-U' .. p.esc(undefine))
|
||||||
end
|
end
|
||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user