Update backend files to work with MSVC - #1025
Conversation
Use weak linking for MSVC. Also added compiler flags to define USE_WEAK_JACK, even though it's already defined earlier, because for some reason obj.define wasn't helping and I was getting undefined symbols when linking. Also included SIGCPP to resolve some linking errors (for MSVC).
Changed 3 cases of #if defined COMPILER_MINGW && (!defined __PTW32_VERSION || defined __jack_systemdeps_h__) with #if (defined COMPILER_MINGW || defined COMPILER_MSVC) && (!defined __PTW32_VERSION || defined __jack_systemdeps_h__) Also changed 3 lines that were giving warnings, to compare them against nullptr.
The user has no relationship with the project, and batch approved all PR. Troll/Spam
| #ifdef COMPILER_MSVC | ||
| struct timeval { | ||
| long tv_sec; | ||
| long tv_usec; | ||
| }; | ||
| #endif |
There was a problem hiding this comment.
According to https://stackoverflow.com/questions/70811813/struct-timeval-in-visual-c
MSVC defines this in winsock.h
So include <winsock.h> or winsock2 should do the trick?
There was a problem hiding this comment.
Yes, it's defined in winsock/winsock2, but this edit must've been sufficient. I assumed these lines of code would be marginally better for performance, but if you think it should be replaced with a header include, I recommend replacing with winsock2 to avoid the possibility of some macro conflicts between winsock/winsock2. Below are pictures from winsock and winsock2 respectively.
There was a problem hiding this comment.
in general I think we should prefer header files over inline definitions for external APIs
|
Rebased and merged as 9.2-90 75b7575 |
No description provided.