Commit 42e3dc99 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul Committed by Yoni Fogel

More link hacking. Addresses #1032, #1343, #1328.

git-svn-id: file:///svn/toku/tokudb.1032b+1343@8456 c7de825b-a66e-492c-adef-691d508d4ae1
parent 4fb33dd9
...@@ -19,7 +19,7 @@ utils.dir: src.dir ...@@ -19,7 +19,7 @@ utils.dir: src.dir
%.dir: %.dir:
cd $(patsubst %.dir, %, $@) && $(MAKE) build cd $(patsubst %.dir, %, $@) && $(MAKE) build
build: $(patsubst %,%.dir, $(BUILDDIRS)); build: $(patsubst %,%.dir, $(BUILDDIRS))
CHECKS = $(patsubst %,%.checkdir,$(filter-out linux, $(SRCDIRS))) CHECKS = $(patsubst %,%.checkdir,$(filter-out linux, $(SRCDIRS)))
......
...@@ -76,7 +76,7 @@ void *toku_realloc(void *, size_t size) __attribute__((__visibility__("default" ...@@ -76,7 +76,7 @@ void *toku_realloc(void *, size_t size) __attribute__((__visibility__("default"
/* Copy memory. Analogous to strdup() */ /* Copy memory. Analogous to strdup() */
void *toku_memdup (const void *v, size_t len); void *toku_memdup (const void *v, size_t len);
/* Toku-version of strdup. Use this so that it calls toku_malloc() */ /* Toku-version of strdup. Use this so that it calls toku_malloc() */
char *toku_strdup (const char *s); char *toku_strdup (const char *s) __attribute__((__visibility__("default")));
void toku_malloc_cleanup (void); /* Before exiting, call this function to free up any internal data structures from toku_malloc. Otherwise valgrind will complain of memory leaks. */ void toku_malloc_cleanup (void); /* Before exiting, call this function to free up any internal data structures from toku_malloc. Otherwise valgrind will complain of memory leaks. */
......
...@@ -8,10 +8,10 @@ extern "C" { ...@@ -8,10 +8,10 @@ extern "C" {
#include "toku_os_types.h" #include "toku_os_types.h"
// Returns: the current process id // Returns: the current process id
int toku_os_getpid(void); int toku_os_getpid(void) __attribute__((__visibility__("default")));
// Returns: the current thread id // Returns: the current thread id
int toku_os_gettid(void); int toku_os_gettid(void) __attribute__((__visibility__("default")));
// Returns: the number of processors in the system // Returns: the number of processors in the system
int toku_os_get_number_processors(void); int toku_os_get_number_processors(void);
...@@ -27,7 +27,7 @@ uint64_t toku_os_get_phys_memory_size(void); ...@@ -27,7 +27,7 @@ uint64_t toku_os_get_phys_memory_size(void);
// Returns: 0 on success // Returns: 0 on success
// sets fsize to the number of bytes in a file // sets fsize to the number of bytes in a file
int toku_os_get_file_size(int fildes, int64_t *fsize); int toku_os_get_file_size(int fildes, int64_t *fsize) __attribute__((__visibility__("default")));
// Returns: 0 on success // Returns: 0 on success
// Initializes id as a unique fileid for fildes on success. // Initializes id as a unique fileid for fildes on success.
......
...@@ -21,3 +21,4 @@ $(TARGET): $(OBJS) ...@@ -21,3 +21,4 @@ $(TARGET): $(OBJS)
clean: clean:
$(MAYBEATSIGN)rm -rf $(TARGET) $(LIBPORTABILITY) $(MAYBEATSIGN)rm -rf $(TARGET) $(LIBPORTABILITY)
build: $(OBJS)
...@@ -16,6 +16,16 @@ ...@@ -16,6 +16,16 @@
toku_add_trace_mem; toku_add_trace_mem;
toku_print_trace_mem; toku_print_trace_mem;
toku_free;
toku_malloc;
toku_os_get_file_size;
toku_os_getpid;
toku_os_gettid;
toku_os_initialize_settings;
toku_os_is_absolute_name;
toku_os_mkdir;
toku_strdup;
local: *; local: *;
}; };
...@@ -58,7 +58,6 @@ TDB_TESTS_THAT_SHOULD_FAIL= \ ...@@ -58,7 +58,6 @@ TDB_TESTS_THAT_SHOULD_FAIL= \
test_truncate_subdb \ test_truncate_subdb \
test_txn_nested_abort3 \ test_txn_nested_abort3 \
test_txn_nested_abort4 \ test_txn_nested_abort4 \
helgrind1 \
helgrind2 \ helgrind2 \
helgrind3 \ helgrind3 \
#\ ends prev line #\ ends prev line
...@@ -158,7 +157,7 @@ endif ...@@ -158,7 +157,7 @@ endif
%.bdb$(BINSUF): CFLAGS+= -DENVDIR=\"dir.$<.bdb\" -DUSE_BDB -DIS_TDB=0 %.bdb$(BINSUF): CFLAGS+= -DENVDIR=\"dir.$<.bdb\" -DUSE_BDB -DIS_TDB=0
%.bdb$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) %.bdb$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK)
$(MAYBEATSIGN)$(CC) $< $(BIN_FROM_C_FLAGS) $(LIBPORTABILITY) $(MAYBEATSIGN)$(CC) $< $(BIN_FROM_C_FLAGS)
%.tdb$(BINSUF): DLINK_FILES+=$(LIBTDB) %.tdb$(BINSUF): DLINK_FILES+=$(LIBTDB)
%.tdb$(BINSUF): RPATH_DIRS+=$(dir $(LIBTDB)) %.tdb$(BINSUF): RPATH_DIRS+=$(dir $(LIBTDB))
...@@ -167,7 +166,7 @@ endif ...@@ -167,7 +166,7 @@ endif
%.tdb$(BINSUF) %.tdbt$(BINSUF): CFLAGS+= -DENVDIR=\"dir.$<.tdb\" -DUSE_TDB -DIS_TDB=1 %.tdb$(BINSUF) %.tdbt$(BINSUF): CFLAGS+= -DENVDIR=\"dir.$<.tdb\" -DUSE_TDB -DIS_TDB=1
%.tdb$(BINSUF) %.tdbt$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) %.tdb$(BINSUF) %.tdbt$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK)
$(MAYBEATSIGN)$(CC) $< $(BIN_FROM_C_FLAGS) $(MAYBEATSIGN)$(CC) $< $(filter-out ../../lib/libtokuportability.a,$(BIN_FROM_C_FLAGS))
clean: clean:
$(MAYBEATSIGN)rm -f $(ALL_TESTS) $(MAYBEATSIGN)rm -f $(ALL_TESTS)
......
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