[vlc-commits] [Git][videolan/npapi-vlc][master] 2 commits: Don't force a lower version of _WIN32_WINNT
Martin Storsjö
gitlab at videolan.org
Sat Mar 17 23:46:48 CET 2018
Martin Storsjö pushed to branch master at VideoLAN / VLC Browser Plugins
Commits:
029e3c65 by Martin Storsjö at 2018-03-18T00:46:21+02:00
Don't force a lower version of _WIN32_WINNT
- - - - -
d7c8dab2 by Martin Storsjö at 2018-03-18T00:46:31+02:00
activex: Export plugin entry points via dllexport instead of a def file for mingw
This is the same approach as used for the npapi plugin. This
approach (using -Wl,--kill-at) is implemented in lld, while
a def file with renamed symbols isn't.
- - - - -
4 changed files:
- activex/Makefile.am
- − activex/axvlc.def
- activex/main.cpp
- configure.ac
Changes:
=====================================
activex/Makefile.am
=====================================
--- a/activex/Makefile.am
+++ b/activex/Makefile.am
@@ -14,7 +14,6 @@ DIST_rsrc = \
DIST_misc = \
axvlc.inf.in \
- axvlc.def \
axvlc.dll.manifest \
axvlc.idl \
axvlc.tlb \
@@ -68,8 +67,8 @@ axvlc_la_SOURCES = \
axvlc_idl.c \
axvlc_idl.h
-axvlc_la_DEPENDENCIES = $(srcdir)/axvlc.def $(DATA_axvlc_rc)
-axvlc_la_LDFLAGS = -Wl,$(srcdir)/axvlc.def -Wl,$(DATA_axvlc_rc) \
+axvlc_la_DEPENDENCIES = $(DATA_axvlc_rc)
+axvlc_la_LDFLAGS = -Wl,--kill-at -Wl,$(DATA_axvlc_rc) \
-no-undefined -avoid-version -module \
-Wc,--static -Wc,-static-libgcc
axvlc_la_LIBADD = ../common/libvlcplugin_common.la \
=====================================
activex/axvlc.def deleted
=====================================
--- a/activex/axvlc.def
+++ /dev/null
@@ -1,7 +0,0 @@
-LIBRARY AXVLC.DLL
-EXPORTS
- DllMain = DllMain at 12
- DllCanUnloadNow = DllCanUnloadNow at 0
- DllGetClassObject = DllGetClassObject at 12
- DllRegisterServer = DllRegisterServer at 0
- DllUnregisterServer = DllUnregisterServer at 0
=====================================
activex/main.cpp
=====================================
--- a/activex/main.cpp
+++ b/activex/main.cpp
@@ -49,6 +49,9 @@ DEFINE_GUID(CATID_SafeForInitializing, \
DEFINE_GUID(CATID_SafeForScripting, \
0x7DD95801, 0x9882, 0x11CF, 0x9F, 0xA9, 0x00,0xAA,0x00,0x6C,0x42,0xC4);
# endif /* __MINGW32_MAJOR_VERSION && !__MINGW64_VERSION_MAJOR */
+# define EXPORT __declspec(dllexport)
+#else
+# define EXPORT
#endif /* __MINGW32__ */
using namespace std;
@@ -70,7 +73,7 @@ HMODULE DllGetModule()
return h_instance;
};
-STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
+STDAPI EXPORT DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
HRESULT hr = CLASS_E_CLASSNOTAVAILABLE;
@@ -86,7 +89,7 @@ STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
return hr;
};
-STDAPI DllCanUnloadNow(VOID)
+STDAPI EXPORT DllCanUnloadNow(VOID)
{
return (0 == i_class_ref) ? S_OK: S_FALSE;
};
@@ -157,7 +160,7 @@ static void UnregisterProgID(REFCLSID rclsid, unsigned int version)
}
};
-STDAPI DllUnregisterServer(VOID)
+STDAPI EXPORT DllUnregisterServer(VOID)
{
// unregister type lib from the registry
#if !defined(_WIN64)
@@ -336,7 +339,7 @@ static HRESULT RegisterClassID(HKEY hParent, REFCLSID rclsid, unsigned int versi
return S_OK;
}
-STDAPI DllRegisterServer(VOID)
+STDAPI EXPORT DllRegisterServer(VOID)
{
DllUnregisterServer();
@@ -474,7 +477,7 @@ STDAPI_(int) WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int sw)
#else
-STDAPI_(BOOL) DllMain(HANDLE hModule, DWORD fdwReason, LPVOID lpReserved )
+STDAPI_(BOOL) EXPORT DllMain(HANDLE hModule, DWORD fdwReason, LPVOID lpReserved )
{
(void)lpReserved;
switch( fdwReason )
=====================================
configure.ac
=====================================
--- a/configure.ac
+++ b/configure.ac
@@ -98,7 +98,13 @@ case "${host_os}" in
*mingw32*)
SYS=mingw32
AC_CHECK_TOOL(WINDRES, windres, :)
- AC_DEFINE([_WIN32_WINNT], 0x0501, [Define to '0x0501' for Windows XP APIs.])
+ AC_TRY_COMPILE([#include <windows.h>], [
+ #if _WIN32_WINNT >= 0x0501
+ #error new enough by default
+ #endif
+ ], [
+ AC_DEFINE([_WIN32_WINNT], 0x0501, [Define to '0x0501' for Windows XP APIs.])
+ ])
AC_DEFINE([_WIN32_IE], 0x0600, [Define to '0x0600' for IE6.0 APIs.])
AC_DEFINE([_WIN32], 1, [Define to 1 if targetting Windows.])
CC="$CC -static-libgcc"
View it on GitLab: https://code.videolan.org/videolan/npapi-vlc/compare/25a5475ceb65ba943f0ed5b3728d5b6cec29ef27...d7c8dab25f1ffaee2e3cd14b140efe531c6181c3
---
View it on GitLab: https://code.videolan.org/videolan/npapi-vlc/compare/25a5475ceb65ba943f0ed5b3728d5b6cec29ef27...d7c8dab25f1ffaee2e3cd14b140efe531c6181c3
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list