Commit c5da83fe authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

test with icc on linux. addresses #1032

git-svn-id: file:///svn/toku/tokudb.1032b@7810 c7de825b-a66e-492c-adef-691d508d4ae1
parent 7bac08be
#ifndef TOKU_PORTABILITY_H #ifndef TOKU_PORTABILITY_H
#define TOKU_PORTABILITY_H #define TOKU_PORTABILITY_H
// Tokutek portability layer
#if defined __cplusplus #if defined __cplusplus
extern "C" { extern "C" {
#endif #endif
// Portability layer #if defined(_MSC_VER) || (defined(__INTEL_COMPILER) && defined(__ICL))
#define DEV_NULL_FILE "/dev/null"
#if defined(_MSC_VER)
// Microsoft compiler
#define TOKU_WINDOWS 1 #define TOKU_WINDOWS 1
#endif #define DEV_NULL_FILE "NUL"
#if defined(__INTEL_COMPILER)
// Intel compiler
#if defined(__ICL) #else
#define TOKU_WINDOWS 1
#endif
#undef DEV_NULL_FILE #define TOKU_WINDOWS 0
#define DEV_NULL_FILE "NUL" #define DEV_NULL_FILE "/dev/null"
#endif #endif
#if defined(TOKU_WINDOWS) #if defined(TOKU_WINDOWS) && TOKU_WINDOWS
// Windows // Windows
// ntohl and htonl are defined in winsock.h // ntohl and htonl are defined in winsock.h
......
...@@ -10,9 +10,7 @@ ...@@ -10,9 +10,7 @@
#define _FILE_OFFSET_BITS 64 #define _FILE_OFFSET_BITS 64
#include "../include/db.h" #include "../include/db.h"
#if !defined(TOKU_WINDOWS)
#include <inttypes.h> #include <inttypes.h>
#endif
typedef struct brt *BRT; typedef struct brt *BRT;
struct brt_header; struct brt_header;
...@@ -42,7 +40,7 @@ typedef struct __toku_lsn { u_int64_t lsn; } LSN; ...@@ -42,7 +40,7 @@ typedef struct __toku_lsn { u_int64_t lsn; } LSN;
/* Make the FILEID a struct for the same reason. */ /* Make the FILEID a struct for the same reason. */
typedef struct __toku_fileid { u_int32_t fileid; } FILENUM; typedef struct __toku_fileid { u_int32_t fileid; } FILENUM;
#ifndef TOKU_WINDOWS #if !TOKU_WINDOWS
typedef enum __toku_bool { FALSE=0, TRUE=1} BOOL; typedef enum __toku_bool { FALSE=0, TRUE=1} BOOL;
#endif #endif
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include "portability.h" #include "portability.h"
#include "os.h" #include "os.h"
#if defined(TOKU_WINDOWS) #if TOKU_WINDOWS
#include "zlib.h" #include "zlib.h"
#include "toku_pthread.h" #include "toku_pthread.h"
#include <dirent.h> #include <dirent.h>
......
...@@ -9,9 +9,7 @@ ...@@ -9,9 +9,7 @@
#include "list.h" #include "list.h"
#include "memarena.h" #include "memarena.h"
#include <stdio.h> #include <stdio.h>
#if !defined(TOKU_WINDOWS)
#include <toku_pthread.h> #include <toku_pthread.h>
#endif
#include <sys/types.h> #include <sys/types.h>
#include <string.h> #include <string.h>
......
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