Commit fb839475 by Shannon Woods

Fix ifdef complaints in clang

BUG=angle:677 Change-Id: Iee457dfc0990e5ffd61932b1f286f3c0208568bc Reviewed-on: https://chromium-review.googlesource.com/203427Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarShannon Woods <shannonwoods@chromium.org>
parent a0dc219e
......@@ -8,7 +8,7 @@
#include "common/platform.h"
#if !defined(TRACE_ENTRY)
# if ANGLE_PLATFORM_WINDOWS
# ifdef ANGLE_PLATFORM_WINDOWS
# define TRACE_ENTRY __stdcall
# else
# define TRACE_ENTRY
......
......@@ -109,7 +109,7 @@ inline unsigned int unorm(float x)
inline bool supportsSSE2()
{
#if ANGLE_PLATFORM_WINDOWS
#ifdef ANGLE_PLATFORM_WINDOWS
static bool checked = false;
static bool supports = false;
......
......@@ -33,7 +33,7 @@
# error Unsupported platform.
#endif
#if ANGLE_PLATFORM_WINDOWS
#ifdef ANGLE_PLATFORM_WINDOWS
# ifndef STRICT
# define STRICT 1
# endif
......
......@@ -14,9 +14,9 @@ TLSIndex CreateTLSIndex()
{
TLSIndex index;
#if ANGLE_PLATFORM_WINDOWS
#ifdef ANGLE_PLATFORM_WINDOWS
index = TlsAlloc();
#elif ANGLE_PLATFORM_POSIX
#elif defined(ANGLE_PLATFORM_POSIX)
// Create global pool key
if ((pthread_key_create(&index, NULL)) != 0)
{
......@@ -36,9 +36,9 @@ bool DestroyTLSIndex(TLSIndex index)
return false;
}
#if ANGLE_PLATFORM_WINDOWS
#ifdef ANGLE_PLATFORM_WINDOWS
return (TlsFree(index) == TRUE);
#elif ANGLE_PLATFORM_POSIX
#elif defined(ANGLE_PLATFORM_POSIX)
return (pthread_key_delete(index) == 0);
#endif
}
......@@ -51,9 +51,9 @@ bool SetTLSValue(TLSIndex index, void *value)
return false;
}
#if ANGLE_PLATFORM_WINDOWS
#ifdef ANGLE_PLATFORM_WINDOWS
return (TlsSetValue(index, value) == TRUE);
#elif ANGLE_PLATFORM_POSIX
#elif defined(ANGLE_PLATFORM_POSIX)
return (pthread_setspecific(index, value) == 0);
#endif
}
......@@ -66,9 +66,9 @@ void *GetTLSValue(TLSIndex index)
return NULL;
}
#if ANGLE_PLATFORM_WINDOWS
#ifdef ANGLE_PLATFORM_WINDOWS
return TlsGetValue(index);
#elif ANGLE_PLATFORM_POSIX
#elif defined(ANGLE_PLATFORM_POSIX)
return pthread_getspecific(index);
#endif
}
......@@ -11,10 +11,10 @@
#include "common/platform.h"
#if ANGLE_PLATFORM_WINDOWS
#ifdef ANGLE_PLATFORM_WINDOWS
typedef DWORD TLSIndex;
# define TLS_INVALID_INDEX (TLS_OUT_OF_INDEXES)
#elif ANGLE_PLATFORM_POSIX
#elif defined(ANGLE_PLATFORM_POSIX)
# include <pthread.h>
# include <semaphore.h>
# include <errno.h>
......
......@@ -433,7 +433,7 @@ bool IsTriangleMode(GLenum drawMode)
std::string getTempPath()
{
#if ANGLE_PLATFORM_WINDOWS
#ifdef ANGLE_PLATFORM_WINDOWS
char path[MAX_PATH];
DWORD pathLen = GetTempPathA(sizeof(path) / sizeof(path[0]), path);
if (pathLen == 0)
......
......@@ -584,7 +584,7 @@ EGLint SwapChain11::swapRect(EGLint x, EGLint y, EGLint width, EGLint height)
// Draw
deviceContext->Draw(4, 0);
#if ANGLE_FORCE_VSYNC_OFF
#ifdef ANGLE_FORCE_VSYNC_OFF
result = mSwapChain->Present(0, 0);
#else
result = mSwapChain->Present(mSwapInterval, 0);
......
......@@ -50,7 +50,7 @@ void SwapChain9::release()
static DWORD convertInterval(EGLint interval)
{
#if ANGLE_FORCE_VSYNC_OFF
#ifdef ANGLE_FORCE_VSYNC_OFF
return D3DPRESENT_INTERVAL_IMMEDIATE;
#else
switch(interval)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment