1
/******************************************************
2
Copyright (c) 2011 Percona Inc.
4
Common declarations for XtraBackup.
6
This program is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; version 2 of the License.
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
15
You should have received a copy of the GNU General Public License
16
along with this program; if not, write to the Free Software
17
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
*******************************************************/
24
#include <my_global.h>
25
#include <mysql_version.h>
31
msg("Assertion \"%s\" failed at %s:%lu\n", \
32
#expr, __FILE__, (unsigned long) __LINE__); \
38
#define xb_ad(expr) xb_a(expr)
43
static inline int msg(const char *fmt, ...) ATTRIBUTE_FORMAT(printf, 1, 2);
44
static inline int msg(const char *fmt, ...)
50
result = vfprintf(stderr, fmt, args);
55
#if MYSQL_VERSION_ID >= 50500
56
# define MY_FREE(a) my_free(a)
58
# define MY_FREE(a) my_free(a, MYF(0))
61
/* Use POSIX_FADV_NORMAL when available */
63
#ifdef POSIX_FADV_NORMAL
64
#define USE_POSIX_FADVISE
70
XB_STREAM_FMT_XBSTREAM