Skip to content

Commit

Permalink
misc src updates
Browse files Browse the repository at this point in the history
  • Loading branch information
raedrizqie committed Nov 23, 2024
1 parent 35be5f7 commit cc3d691
Show file tree
Hide file tree
Showing 15 changed files with 715 additions and 16 deletions.
6 changes: 3 additions & 3 deletions src/common/classes/FpeControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#define CLASSES_FPE_CONTROL_H

#include <math.h>
#if defined(WIN_NT)
#if defined(_MSC_VER)
#include <float.h>
#else
#include <fenv.h>
Expand Down Expand Up @@ -78,7 +78,7 @@ class FpeControl
}
}

#if defined(WIN_NT)
#if defined(_MSC_VER)
static void maskAll() noexcept
{
_clearfp(); // always call _clearfp() before setting control word
Expand Down Expand Up @@ -215,7 +215,7 @@ class FpeControl

inline bool isNegativeInf(double x)
{
#ifdef WIN_NT
#ifdef _MSC_VER
return _fpclass(x) == _FPCLASS_NINF;
#else
return x == -INFINITY;
Expand Down
6 changes: 5 additions & 1 deletion src/common/isc_sync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1847,7 +1847,11 @@ SharedMemoryBase::SharedMemoryBase(const TEXT* filename, ULONG length, IpcObject
}

PathName mappedName;
#ifdef MINGW
if (!getMappedFileName(address, mappedName))
#else
if (!getMappedFileName(address, mappedName) || mappedName != expanded_filename)
#endif
{
UnmapViewOfFile(address);
CloseHandle(file_obj);
Expand Down Expand Up @@ -2096,7 +2100,7 @@ static const int DEFAULT_INTERLOCKED_SPIN_COUNT_SMP = 200;

static SLONG pid = 0;

typedef WINBASEAPI BOOL (WINAPI *pfnSwitchToThread) ();
typedef BOOL (WINAPI *pfnSwitchToThread) ();
static inline BOOL switchToThread()
{
static pfnSwitchToThread fnSwitchToThread = NULL;
Expand Down
Loading

0 comments on commit cc3d691

Please sign in to comment.