Use #ifndef instead of #if !defined

And #ifdef instead of #if defined

This is more standard form (see for example iostream file).

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
homoSapiensSapiens
2013-07-23 16:31:57 +03:00
committed by Marco Costalba
parent 4064ee5406
commit 002062ae93
23 changed files with 57 additions and 57 deletions
+4 -4
View File
@@ -24,7 +24,7 @@
#include "misc.h"
#include "thread.h"
#if defined(__hpux)
#ifdef __hpux
# include <sys/pstat.h>
#endif
@@ -173,7 +173,7 @@ void start_logger(bool b) { Logger::start(b); }
int cpu_count() {
#if defined(_WIN32)
#ifdef _WIN32
SYSTEM_INFO s;
GetSystemInfo(&s);
return s.dwNumberOfProcessors;
@@ -199,7 +199,7 @@ int cpu_count() {
void timed_wait(WaitCondition& sleepCond, Lock& sleepLock, int msec) {
#if defined(_WIN32)
#ifdef _WIN32
int tm = msec;
#else
timespec ts, *tm = &ts;
@@ -216,7 +216,7 @@ void timed_wait(WaitCondition& sleepCond, Lock& sleepLock, int msec) {
/// prefetch() preloads the given address in L1/L2 cache. This is a non
/// blocking function and do not stalls the CPU waiting for data to be
/// loaded from memory, that can be quite slow.
#if defined(NO_PREFETCH)
#ifdef NO_PREFETCH
void prefetch(char*) {}