Commit d45cf0c2 authored by Yoni Fogel's avatar Yoni Fogel

Addresses #1974 refs[t:1974] Add toku_portability include, fix printf type...

Addresses #1974 refs[t:1974] Add toku_portability include, fix printf type mismatches, svn ignore, function prototype cleanliness

git-svn-id: file:///svn/toku/tokudb@14304 c7de825b-a66e-492c-adef-691d508d4ae1
parent 2d1ef22e
...@@ -65,7 +65,7 @@ test_main (int argc, const char *argv[]) { ...@@ -65,7 +65,7 @@ test_main (int argc, const char *argv[]) {
assert(r == 0 && le->cmd == LT_timestamp); assert(r == 0 && le->cmd == LT_timestamp);
assert(le->u.timestamp.comment.len == 5 && memcmp(le->u.timestamp.comment.data, "world", 5) == 0); assert(le->u.timestamp.comment.len == 5 && memcmp(le->u.timestamp.comment.data, "world", 5) == 0);
if (verbose) if (verbose)
printf("%"PRId64"\n", le->u.timestamp.timestamp - t); printf("%"PRIu64"\n", le->u.timestamp.timestamp - t);
assert(le->u.timestamp.timestamp - t >= 10*1000000); assert(le->u.timestamp.timestamp - t >= 10*1000000);
r = toku_logcursor_next(lc, &le); r = toku_logcursor_next(lc, &le);
...@@ -87,7 +87,7 @@ test_main (int argc, const char *argv[]) { ...@@ -87,7 +87,7 @@ test_main (int argc, const char *argv[]) {
assert(r == 0 && le->cmd == LT_timestamp); assert(r == 0 && le->cmd == LT_timestamp);
assert(le->u.timestamp.comment.len == 5 && memcmp(le->u.timestamp.comment.data, "hello", 5) == 0); assert(le->u.timestamp.comment.len == 5 && memcmp(le->u.timestamp.comment.data, "hello", 5) == 0);
if (verbose) if (verbose)
printf("%"PRId64"\n", t - le->u.timestamp.timestamp); printf("%"PRIu64"\n", t - le->u.timestamp.timestamp);
assert(t - le->u.timestamp.timestamp >= 10*1000000); assert(t - le->u.timestamp.timestamp >= 10*1000000);
r = toku_logcursor_prev(lc, &le); r = toku_logcursor_prev(lc, &le);
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
#include "brttypes.h" #include "brttypes.h"
#include "includes.h" #include "includes.h"
int test_0 (); static int test_0 (void);
int test_1 (); static int test_1 (void);
static void usage() { static void usage(void) {
printf("test_logcursors [OPTIONS]\n"); printf("test_logcursors [OPTIONS]\n");
printf("[-v]\n"); printf("[-v]\n");
printf("[-q]\n"); printf("[-q]\n");
...@@ -35,7 +35,7 @@ int test_main(int argc, const char *argv[]) { ...@@ -35,7 +35,7 @@ int test_main(int argc, const char *argv[]) {
return r; return r;
} }
int test_0 () { int test_0 (void) {
int r=0; int r=0;
char dbdir[100] = "./dir.test_logcursor"; char dbdir[100] = "./dir.test_logcursor";
struct toku_logcursor *cursor; struct toku_logcursor *cursor;
......
...@@ -8,6 +8,7 @@ extern "C" { ...@@ -8,6 +8,7 @@ extern "C" {
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved." #ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <stdlib.h> #include <stdlib.h>
#include <toku_portability.h>
/* Tokutek memory allocation functions and macros. /* Tokutek memory allocation functions and macros.
* These are functions for malloc and free */ * These are functions for malloc and free */
......
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