@@ -117,6 +117,7 @@ void sanitizeDef(string defFile)
117
117
" strnlen" ,
118
118
" tanf" , " tanhf" ,
119
119
" wcrtomb" , " wcsrtombs" , " wctob" ,
120
+ " __lc_collate_cp" , " _osplatform" ,
120
121
];
121
122
122
123
patchLines(defFile, defFile, (line)
@@ -146,7 +147,7 @@ void sanitizeDef(string defFile)
146
147
}
147
148
148
149
// Un-hide functions overridden by the MinGW runtime.
149
- if (line.endsWith(" DATA" ))
150
+ if (line.endsWith(" DATA" ) || line.endsWith( " \t DATA " ) )
150
151
{
151
152
foreach (name; overriddenMinGWFunctions)
152
153
{
@@ -254,7 +255,7 @@ bool defWithStdcallMangling2implib(string defFile)
254
255
line.startsWith(" LIBRARY " ) || line.startsWith(" EXPORTS" ))
255
256
return line;
256
257
257
- if (line.length > 5 && (line[$ - 5 ] == ' ' || line[$ - 5 ] == ' \t ' ) && line .endsWith(" DATA " ))
258
+ if (line.endsWith( " DATA " ) || line.endsWith(" \t DATA " ))
258
259
{
259
260
fields ~= line[0 .. $- 5 ];
260
261
return line;
@@ -346,7 +347,7 @@ void c2lib(string outDir, string cFile, string clFlags = null)
346
347
{
347
348
const obj = buildPath(outDir, baseName(cFile).setExtension(" .obj" ));
348
349
const lib = setExtension(obj, " .lib" );
349
- cl(obj, clFlags ? clFlags ~ " " ~ quote(cFile) : quote(cFile));
350
+ cl(obj, clFlags ~ ( clFlags ? " " : null ) ~ quote(cFile));
350
351
runShell(` lib "/OUT:` ~ lib ~ ` " ` ~ quote(obj));
351
352
std.file.remove (obj);
352
353
}
0 commit comments