Fix wxFSVolume compilation with Cygwin in 64 bits
Use __LONG32, which is always 32 bits when using Cygwin, unlike long, which is 64 bits there in 64 bit builds, and so can't be used as an argument to InterlockedExchange(). Closes #16746.
This commit is contained in:
@@ -68,7 +68,18 @@ static WNetCloseEnumPtr s_pWNetCloseEnum;
|
|||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
// Globals/Statics
|
// Globals/Statics
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
static long s_cancelSearch = FALSE;
|
|
||||||
|
#if defined(__CYGWIN__) && defined(__LP64__)
|
||||||
|
// We can't use long in 64 bit Cygwin build because Cygwin uses LP64 model
|
||||||
|
// (unlike all the other MSW compilers) and long is 64 bits, while
|
||||||
|
// InterlockedExchange(), with which this variable is used, requires a 32
|
||||||
|
// bit-sized value, so use Cygwin-specific type with the right size.
|
||||||
|
typedef __LONG32 wxInterlockedArg_t;
|
||||||
|
#else
|
||||||
|
typedef long wxInterlockedArg_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static wxInterlockedArg_t s_cancelSearch = FALSE;
|
||||||
|
|
||||||
struct FileInfo
|
struct FileInfo
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user