From bf1af189e0ace55bf47e894b72ff05bef8b77388 Mon Sep 17 00:00:00 2001 From: Rich Prohaska Date: Tue, 16 Apr 2013 23:57:28 -0400 Subject: [PATCH] test with icc on linux. addresses #1032 git-svn-id: file:///svn/toku/tokudb.1032b@7810 c7de825b-a66e-492c-adef-691d508d4ae1 --- include/portability.h | 24 +++++++++--------------- newbrt/brttypes.h | 4 +--- newbrt/includes.h | 2 +- newbrt/log-internal.h | 2 -- 4 files changed, 11 insertions(+), 21 deletions(-) diff --git a/include/portability.h b/include/portability.h index 0c4c7c43ba8..b32864794e1 100644 --- a/include/portability.h +++ b/include/portability.h @@ -1,31 +1,25 @@ #ifndef TOKU_PORTABILITY_H #define TOKU_PORTABILITY_H +// Tokutek portability layer + #if defined __cplusplus extern "C" { #endif -// Portability layer -#define DEV_NULL_FILE "/dev/null" +#if defined(_MSC_VER) || (defined(__INTEL_COMPILER) && defined(__ICL)) -#if defined(_MSC_VER) -// Microsoft compiler #define TOKU_WINDOWS 1 -#endif - -#if defined(__INTEL_COMPILER) -// Intel compiler - -#if defined(__ICL) -#define TOKU_WINDOWS 1 -#endif - -#undef DEV_NULL_FILE #define DEV_NULL_FILE "NUL" +#else + +#define TOKU_WINDOWS 0 +#define DEV_NULL_FILE "/dev/null" + #endif -#if defined(TOKU_WINDOWS) +#if defined(TOKU_WINDOWS) && TOKU_WINDOWS // Windows // ntohl and htonl are defined in winsock.h diff --git a/newbrt/brttypes.h b/newbrt/brttypes.h index 0fd85298bd4..d753410a60d 100644 --- a/newbrt/brttypes.h +++ b/newbrt/brttypes.h @@ -10,9 +10,7 @@ #define _FILE_OFFSET_BITS 64 #include "../include/db.h" -#if !defined(TOKU_WINDOWS) #include -#endif typedef struct brt *BRT; struct brt_header; @@ -42,7 +40,7 @@ typedef struct __toku_lsn { u_int64_t lsn; } LSN; /* Make the FILEID a struct for the same reason. */ typedef struct __toku_fileid { u_int32_t fileid; } FILENUM; -#ifndef TOKU_WINDOWS +#if !TOKU_WINDOWS typedef enum __toku_bool { FALSE=0, TRUE=1} BOOL; #endif diff --git a/newbrt/includes.h b/newbrt/includes.h index a206c179dd2..83eb3f6004d 100644 --- a/newbrt/includes.h +++ b/newbrt/includes.h @@ -11,7 +11,7 @@ #include "portability.h" #include "os.h" -#if defined(TOKU_WINDOWS) +#if TOKU_WINDOWS #include "zlib.h" #include "toku_pthread.h" #include diff --git a/newbrt/log-internal.h b/newbrt/log-internal.h index f4265cc3e6c..b790fd7e3a1 100644 --- a/newbrt/log-internal.h +++ b/newbrt/log-internal.h @@ -9,9 +9,7 @@ #include "list.h" #include "memarena.h" #include -#if !defined(TOKU_WINDOWS) #include -#endif #include #include