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
#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
#define DEV_NULL_FILE "NUL"
#if defined(__ICL)
#define TOKU_WINDOWS 1
#endif
#else
#undef DEV_NULL_FILE
#define DEV_NULL_FILE "NUL"
#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
......
......@@ -10,9 +10,7 @@
#define _FILE_OFFSET_BITS 64
#include "../include/db.h"
#if !defined(TOKU_WINDOWS)
#include <inttypes.h>
#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
......
......@@ -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 <dirent.h>
......
......@@ -9,9 +9,7 @@
#include "list.h"
#include "memarena.h"
#include <stdio.h>
#if !defined(TOKU_WINDOWS)
#include <toku_pthread.h>
#endif
#include <sys/types.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