mariadb/utils/tokudb_common.h
Yoni Fogel 5d4ed64c3e Used PRI macros to remove warnings in printf statements
Addresses #172

git-svn-id: file:///svn/tokudb@1082 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-11 17:28:38 +00:00

26 lines
739 B
C

#if !defined(TOKUDB_COMMON_H)
#define TOKUDB_COMMON_H
/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <stdlib.h>
#include <stdint.h>
#include <limits.h>
#include <db.h>
#include <inttypes.h>
#include <signal.h>
typedef uint8_t bool;
#define true ((bool)1)
#define false ((bool)0)
#define SET_BITS(bitvector, bits) ((bitvector) |= (bits))
#define REMOVE_BITS(bitvector, bits) ((bitvector) &= ~(bits))
#define IS_SET_ANY(bitvector, bits) ((bitvector) & (bits))
#define IS_SET_ALL(bitvector, bits) (((bitvector) & (bits)) == (bits))
#define IS_POWER_OF_2(num) ((num) > 0 && ((num) & ((num) - 1)) == 0)
#endif /* #if !defined(TOKUDB_COMMON_H) */