Skip to content
This repository has been archived by the owner on Jun 20, 2019. It is now read-only.

Commit

Permalink
Update for mingw-w64 3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jpf91 committed Jun 12, 2014
1 parent d8871e4 commit d9b10c4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
6 changes: 6 additions & 0 deletions gcc/d/dfrontend/port.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ typedef unsigned long long ulonglong;

typedef unsigned char utf8_t;

// MinGWs stdlib.h defines strtod to __strtod.
// Depending on whether this header is included our function name changes...
#ifdef strtod
#undef strtod
#endif

struct Port
{
static longdouble ldbl_nan;
Expand Down
25 changes: 14 additions & 11 deletions libphobos/libdruntime/core/sys/windows/windows.d
Original file line number Diff line number Diff line change
Expand Up @@ -1587,17 +1587,20 @@ export BOOL SwitchToThread();

version (MinGW)
{
version (X86_64)
version = MinGW64RT;
}

version (MinGW64RT)
{
LONG InterlockedIncrement(LPLONG lpAddend);
LONG InterlockedDecrement(LPLONG lpAddend);
LONG InterlockedExchange(LPLONG Target, LONG Value);
LONG InterlockedExchangeAdd(LPLONG Addend, LONG Value);
LONG InterlockedCompareExchange(LONG *Destination, LONG Exchange, LONG Comperand);
extern(C)
{
LONG _InterlockedIncrement(LPLONG lpAddend);
LONG _InterlockedDecrement(LPLONG lpAddend);
LONG _InterlockedExchange(LPLONG Target, LONG Value);
LONG _InterlockedExchangeAdd(LPLONG Addend, LONG Value);
LONG _InterlockedCompareExchange(LONG *Destination, LONG Exchange, LONG Comperand);

alias InterlockedIncrement = _InterlockedIncrement;
alias InterlockedDecrement = _InterlockedDecrement;
alias InterlockedExchange = _InterlockedExchange;
alias InterlockedExchangeAdd = _InterlockedExchangeAdd;
alias InterlockedCompareExchange = _InterlockedCompareExchange;
}

void InitializeCriticalSection(CRITICAL_SECTION * lpCriticalSection);
void EnterCriticalSection(CRITICAL_SECTION * lpCriticalSection);
Expand Down

0 comments on commit d9b10c4

Please sign in to comment.