Skip to content

Commit a58c8a5

Browse files
committed
Sync with upstream
After dlang/installer#414.
1 parent ba4f296 commit a58c8a5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

buildsdk.d

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ void sanitizeDef(string defFile)
117117
"strnlen",
118118
"tanf", "tanhf",
119119
"wcrtomb", "wcsrtombs", "wctob",
120+
"__lc_collate_cp", "_osplatform",
120121
];
121122

122123
patchLines(defFile, defFile, (line)
@@ -146,7 +147,7 @@ void sanitizeDef(string defFile)
146147
}
147148

148149
// Un-hide functions overridden by the MinGW runtime.
149-
if (line.endsWith(" DATA"))
150+
if (line.endsWith(" DATA") || line.endsWith("\tDATA"))
150151
{
151152
foreach (name; overriddenMinGWFunctions)
152153
{
@@ -254,7 +255,7 @@ bool defWithStdcallMangling2implib(string defFile)
254255
line.startsWith("LIBRARY ") || line.startsWith("EXPORTS"))
255256
return line;
256257

257-
if (line.length > 5 && (line[$-5] == ' ' || line[$-5] == '\t') && line.endsWith("DATA"))
258+
if (line.endsWith(" DATA") || line.endsWith("\tDATA"))
258259
{
259260
fields ~= line[0 .. $-5];
260261
return line;
@@ -346,7 +347,7 @@ void c2lib(string outDir, string cFile, string clFlags = null)
346347
{
347348
const obj = buildPath(outDir, baseName(cFile).setExtension(".obj"));
348349
const lib = setExtension(obj, ".lib");
349-
cl(obj, clFlags ? clFlags ~ " " ~ quote(cFile) : quote(cFile));
350+
cl(obj, clFlags ~ (clFlags ? " " : null) ~ quote(cFile));
350351
runShell(`lib "/OUT:` ~ lib ~ `" ` ~ quote(obj));
351352
std.file.remove(obj);
352353
}

0 commit comments

Comments
 (0)