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) {
}
int
toku_stat(int fd, toku_struct_fstat *buf) {
toku_fstat(int fd, toku_struct_stat *buf) {
int r = fstat(fd, buf);
return r;
}
......
......@@ -39,7 +39,8 @@ 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;
#if !TOKU_WINDOWS
#if !TOKU_WINDOWS && !defined(BOOL_DEFINED)
#define BOOL_DEFINED
typedef enum __toku_bool { FALSE=0, TRUE=1} BOOL;
#endif
......
......@@ -43,6 +43,10 @@
toku_default_compare_fun;
toku_stat;
toku_fstat;
local: *;
};
......@@ -102,7 +102,8 @@ int_dbt_cmp (DB *db, const DBT *a, const DBT *b) {
return 0;
}
#if !TOKU_WINDOWS
#if !TOKU_WINDOWS && !defined(BOOL_DEFINED)
#define BOOL_DEFINED
typedef enum __toku_bool { FALSE=0, TRUE=1} BOOL;
#endif
......
......@@ -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")));
// 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'
int toku_fstat(int fd, toku_struct_stat *statbuf);
int toku_fstat(int fd, toku_struct_stat *statbuf) __attribute__((__visibility__("default")));
#if defined __cplusplus
};
......
......@@ -50,11 +50,6 @@ typedef int64_t toku_off_t;
#include <stdint.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 <sys/types.h>
#include <sys/time.h>
......@@ -76,6 +71,11 @@ typedef int64_t toku_off_t;
#endif
#ifndef TOKU_OFF_T_DEFINED
#define TOKU_OFF_T_DEFINED
typedef int64_t toku_off_t;
#endif
#include "toku_os.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