From 3cb519b5e677862b883e7fdf34dda375bc79d7bb Mon Sep 17 00:00:00 2001 From: John Esmet Date: Wed, 17 Apr 2013 00:01:24 -0400 Subject: [PATCH] refs #5811 fix mac build git-svn-id: file:///svn/toku/tokudb@51254 c7de825b-a66e-492c-adef-691d508d4ae1 --- portability/file.cc | 5 ----- portability/toku_random.h | 4 ---- src/tests/maxsize-for-loader.cc | 1 - src/tests/test.h | 3 +-- src/tests/test_error.cc | 5 ----- toku_include/toku_portability.h | 1 - 6 files changed, 1 insertion(+), 18 deletions(-) diff --git a/portability/file.cc b/portability/file.cc index 9d54ccafa07..4fd8892b71f 100644 --- a/portability/file.cc +++ b/portability/file.cc @@ -430,8 +430,3 @@ int toku_fsync_directory(const char *fname) { toku_free(dirname); return result; } - -FILE *toku_os_fmemopen(void *buf, size_t size, const char *mode) { - return fmemopen(buf, size, mode); -} - diff --git a/portability/toku_random.h b/portability/toku_random.h index 6df3a2e673a..bd50c4c5cde 100644 --- a/portability/toku_random.h +++ b/portability/toku_random.h @@ -13,8 +13,6 @@ #include #include -namespace toku { - #if defined(HAVE_RANDOM_R) // Definition of randu62 and randu64 assume myrandom_r generates 31 low-order bits static_assert(RAND_MAX == INT32_MAX, "Unexpected RAND_MAX"); @@ -87,6 +85,4 @@ rand_choices(struct random_data *buf, uint32_t choices) { return result; } -} // end namespace toku - #endif // TOKU_RANDOM_H diff --git a/src/tests/maxsize-for-loader.cc b/src/tests/maxsize-for-loader.cc index 039a40b0819..75f3371fd4b 100644 --- a/src/tests/maxsize-for-loader.cc +++ b/src/tests/maxsize-for-loader.cc @@ -9,7 +9,6 @@ #include #include "toku_random.h" -using namespace toku; bool fast = false; DB_ENV *env; diff --git a/src/tests/test.h b/src/tests/test.h index 109b9392f92..bbfd9152295 100644 --- a/src/tests/test.h +++ b/src/tests/test.h @@ -216,10 +216,9 @@ uint_dbt_cmp (DB *db, const DBT *a, const DBT *b) { #include -unsigned int seed = 0xFEEDFACE; - static uint64_t __attribute__((__unused__)) random64(void) { + const unsigned int seed = 0xFEEDFACE; static int seeded = 0; if (!seeded) { seeded = 1; diff --git a/src/tests/test_error.cc b/src/tests/test_error.cc index 9aed326b785..1ad48ddf8f4 100644 --- a/src/tests/test_error.cc +++ b/src/tests/test_error.cc @@ -21,10 +21,6 @@ int test_main (int argc, char *const argv[]) { parse_args(argc, argv); -#if defined(OSX) - if (verbose) printf("Warning: fmemopen does not exist in OSX!\n"); -#else - int r; r = system("rm -rf " ENVDIR); CKERR(r); @@ -97,6 +93,5 @@ test_main (int argc, char *const argv[]) { } } } -#endif return 0; } diff --git a/toku_include/toku_portability.h b/toku_include/toku_portability.h index c9f2b4fece6..35ed137340e 100644 --- a/toku_include/toku_portability.h +++ b/toku_include/toku_portability.h @@ -266,7 +266,6 @@ int toku_os_close(int fd); int toku_os_fclose(FILE * stream); ssize_t toku_os_read(int fd, void *buf, size_t count); ssize_t toku_os_pread(int fd, void *buf, size_t count, off_t offset); -FILE *toku_os_fmemopen(void *buf, size_t size, const char *mode); // wrapper around fsync void toku_file_fsync_without_accounting(int fd);