We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4259 - SDL should not export hidapi symbols
Summary: SDL should not export hidapi symbols
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: joystick (show other bugs)
Version: HG 2.0
Hardware: All Windows (All)
: P2 normal
Assignee: Ozkan Sezer
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-14 11:28 UTC by Ozkan Sezer
Modified: 2018-09-17 06:33 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ozkan Sezer 2018-09-14 11:28:07 UTC
SDL2.dll built from current hg exports hidapi symbols,
it should not.  Is the following patch OK for this?

diff --git a/src/hidapi/hidapi/hidapi.h b/src/hidapi/hidapi/hidapi.h
--- a/src/hidapi/hidapi/hidapi.h
+++ b/src/hidapi/hidapi/hidapi.h
@@ -29,7 +29,7 @@
 
 #include <wchar.h>
 
-#if defined(_WIN32) && !defined(NAMESPACE)
+#if defined(_WIN32) && !defined(NAMESPACE) && (0) /* SDL: don't export hidapi syms */
       #define HID_API_EXPORT __declspec(dllexport)
       #define HID_API_CALL
 #else
Comment 1 Sam Lantinga 2018-09-17 05:59:21 UTC
Yes, that's fine. Nice catch!
Comment 2 Ozkan Sezer 2018-09-17 06:33:44 UTC
Applied: https://hg.libsdl.org/SDL/rev/3c9c784e85bb