Skip to content

Commit de6e815

Browse files
fanc999-1kjellahl
authored andcommitted
gendef.cc: Skip symbols implemented inline
Like in the case of gtkmm, some symbols were implemented inline in the CRT on Visual Studio 2015+ (UCRT), so we don't want to put them in our .def file, otherwise linking will fail.
1 parent ec5bd24 commit de6e815

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

MSVC_NMake/gendef/gendef.cc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,25 @@ int main(int argc,char** argv)
7676
while(*e != ' ' && *e != '\t' && *e != '\0' && *e!= '\n') e++;
7777
*e = '\0';
7878

79+
#if (_MSC_VER >= 1900)
80+
/* Filter out these symbols as they are done inline in the
81+
* compiler-shipped headers, so that things can link properly on
82+
* later Visual Studio versions. Unfortunately we can't just
83+
* link to legacy_stdio_definitions.lib, so this list below may
84+
* continue to grow.
85+
*/
86+
if (_stricmp(s, "__local_stdio_printf_options") != 0 &&
87+
_stricmp(s, "_vsnprintf_l") != 0 &&
88+
_stricmp(s, "_vsprintf_l") != 0) {
89+
#endif
7990
if(strchr(s,'?')==0 && s[0]=='_' && strchr(s,'@') == 0 )//this is a C export type: _fct -> fct
8091
def_file << " " << (s+1) << endl;
8192
else
8293
if(strchr(s,'?')!=0 && strncmp(s,"??_G",4)!=0 && strncmp(s,"??_E",4)!=0) {
8394
def_file << " " << s << endl;
95+
#if (_MSC_VER >= 1900)
96+
}
97+
#endif
8498
}
8599
}
86100
}

0 commit comments

Comments
 (0)