Commit c1b8cc71 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

remove nested functions to compile with icc. addresses #1185

git-svn-id: file:///svn/tokudb.1131b+1080a+1185@6367 c7de825b-a66e-492c-adef-691d508d4ae1
parent abd7a990
......@@ -37,6 +37,10 @@ void expect(DBC *cursor, int k, int v) {
free(val.data);
}
static int mycmp(const void *a, const void *b) {
return memcmp(a, b, sizeof (int));
}
/* verify that key insertions are stored in insert order */
void test_insert(int n, int dup_mode) {
if (verbose) printf("test_insert:%d %d\n", n, dup_mode);
......@@ -66,9 +70,6 @@ void test_insert(int n, int dup_mode) {
int sortvalues[n];
for (i=0; i<n; i++)
sortvalues[i] = values[i];
int mycmp(const void *a, const void *b) {
return memcmp(a, b, sizeof (int));
}
qsort(sortvalues, n, sizeof sortvalues[0], mycmp);
/* insert n-1 unique keys {0, 1, n-1} - {n/2} */
......@@ -165,9 +166,6 @@ void test_nonleaf_insert(int n, int dup_mode) {
int sortvalues[n];
for (i=0; i<n; i++)
sortvalues[i] = values[i];
int mycmp(const void *a, const void *b) {
return memcmp(a, b, sizeof (int));
}
qsort(sortvalues, n, sizeof sortvalues[0], mycmp);
/* insert n-1 unique keys {0, 1, n-1} - {n/2} */
......
......@@ -32,6 +32,10 @@ void expect_cursor_get(DBC *cursor, int op, int expectr) {
assert(r == expectr);
}
static int mycmp(const void *a, const void *b) {
return memcmp(a, b, sizeof (int));
}
void test_dupsort_delete(int n) {
if (verbose) printf("test_dupsort_delete:%d\n", n);
......@@ -56,9 +60,6 @@ void test_dupsort_delete(int n) {
int sortvalues[n];
for (i=0; i<n; i++)
sortvalues[i] = values[i];
int mycmp(const void *a, const void *b) {
return memcmp(a, b, sizeof (int));
}
qsort(sortvalues, n, sizeof sortvalues[0], mycmp);
for (i=0; i<n; i++) {
......
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