[libxmlplusplus/nmake-3-2: 4/5] gendef.cc: Skip symbols implemented inline
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxmlplusplus/nmake-3-2: 4/5] gendef.cc: Skip symbols implemented inline
- Date: Fri, 12 Jun 2020 04:37:11 +0000 (UTC)
commit 3fe9ad23a02a127777f52b56cdd2002c69c2e1f5
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Fri Jun 12 12:34:32 2020 +0800
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.
MSVC_NMake/gendef/gendef.cc | 14 ++++++++++++++
1 file changed, 14 insertions(+)
---
diff --git a/MSVC_NMake/gendef/gendef.cc b/MSVC_NMake/gendef/gendef.cc
index f4ced63..ba5a8db 100644
--- a/MSVC_NMake/gendef/gendef.cc
+++ b/MSVC_NMake/gendef/gendef.cc
@@ -76,11 +76,25 @@ int main(int argc,char** argv)
while(*e != ' ' && *e != '\t' && *e != '\0' && *e!= '\n') e++;
*e = '\0';
+#if (_MSC_VER >= 1900)
+ /* Filter out these symbols as they are done inline in the
+ * compiler-shipped headers, so that things can link properly on
+ * later Visual Studio versions. Unfortunately we can't just
+ * link to legacy_stdio_definitions.lib, so this list below may
+ * continue to grow.
+ */
+ if (_stricmp(s, "__local_stdio_printf_options") != 0 &&
+ _stricmp(s, "_vsnprintf_l") != 0 &&
+ _stricmp(s, "_vsprintf_l") != 0) {
+#endif
if(strchr(s,'?')==0 && s[0]=='_' && strchr(s,'@') == 0 )//this is a C export type:
_fct -> fct
def_file << " " << (s+1) << endl;
else
if(strchr(s,'?')!=0 && strncmp(s,"??_G",4)!=0 && strncmp(s,"??_E",4)!=0) {
def_file << " " << s << endl;
+#if (_MSC_VER >= 1900)
+ }
+#endif
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]