Commit 470c7bac authored by Yoni Fogel's avatar Yoni Fogel

Addresses #1531 linux port (fix compile) of [10491]

git-svn-id: file:///svn/toku/tokudb@10492 c7de825b-a66e-492c-adef-691d508d4ae1
parent 3839e70d
...@@ -198,7 +198,7 @@ toku_stat(const char *name, toku_struct_stat *buf) { ...@@ -198,7 +198,7 @@ toku_stat(const char *name, toku_struct_stat *buf) {
} }
int int
toku_stat(int fd, toku_struct_fstat *buf) { toku_fstat(int fd, toku_struct_stat *buf) {
int r = fstat(fd, buf); int r = fstat(fd, buf);
return r; return r;
} }
......
...@@ -39,7 +39,8 @@ typedef struct __toku_lsn { u_int64_t lsn; } LSN; ...@@ -39,7 +39,8 @@ 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;
#if !TOKU_WINDOWS #if !TOKU_WINDOWS && !defined(BOOL_DEFINED)
#define BOOL_DEFINED
typedef enum __toku_bool { FALSE=0, TRUE=1} BOOL; typedef enum __toku_bool { FALSE=0, TRUE=1} BOOL;
#endif #endif
......
...@@ -43,6 +43,10 @@ ...@@ -43,6 +43,10 @@
toku_default_compare_fun; toku_default_compare_fun;
toku_stat;
toku_fstat;
local: *; local: *;
}; };
...@@ -102,7 +102,8 @@ int_dbt_cmp (DB *db, const DBT *a, const DBT *b) { ...@@ -102,7 +102,8 @@ int_dbt_cmp (DB *db, const DBT *a, const DBT *b) {
return 0; return 0;
} }
#if !TOKU_WINDOWS #if !TOKU_WINDOWS && !defined(BOOL_DEFINED)
#define BOOL_DEFINED
typedef enum __toku_bool { FALSE=0, TRUE=1} BOOL; typedef enum __toku_bool { FALSE=0, TRUE=1} BOOL;
#endif #endif
......
...@@ -64,9 +64,9 @@ int toku_os_initialize_settings(int verbosity) __attribute__((__visibility__("d ...@@ -64,9 +64,9 @@ int toku_os_initialize_settings(int verbosity) __attribute__((__visibility__("d
int toku_os_is_absolute_name(const char* path) __attribute__((__visibility__("default"))); int toku_os_is_absolute_name(const char* path) __attribute__((__visibility__("default")));
// Portable linux 'stat' // Portable linux 'stat'
int toku_stat(const char *name, toku_struct_stat *statbuf); int toku_stat(const char *name, toku_struct_stat *statbuf) __attribute__((__visibility__("default")));
// Portable linux 'fstat' // Portable linux 'fstat'
int toku_fstat(int fd, toku_struct_stat *statbuf); int toku_fstat(int fd, toku_struct_stat *statbuf) __attribute__((__visibility__("default")));
#if defined __cplusplus #if defined __cplusplus
}; };
......
...@@ -50,11 +50,6 @@ typedef int64_t toku_off_t; ...@@ -50,11 +50,6 @@ typedef int64_t toku_off_t;
#include <stdint.h> #include <stdint.h>
#include <inttypes.h> #include <inttypes.h>
#ifndef TOKU_OFF_T_DEFINED
#define TOKU_OFF_T_DEFINED
typedef int64_t toku_off_t;
#endif
#include <unistd.h> #include <unistd.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/time.h> #include <sys/time.h>
...@@ -76,6 +71,11 @@ typedef int64_t toku_off_t; ...@@ -76,6 +71,11 @@ typedef int64_t toku_off_t;
#endif #endif
#ifndef TOKU_OFF_T_DEFINED
#define TOKU_OFF_T_DEFINED
typedef int64_t toku_off_t;
#endif
#include "toku_os.h" #include "toku_os.h"
#include "toku_htonl.h" #include "toku_htonl.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