diff options
author | Alexander Barkov <bar@mariadb.org> | 2017-05-26 19:32:28 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-05-26 19:32:28 +0400 |
commit | 9bc32256427373e5bfa78f17c5854ac4e6a2fc31 (patch) | |
tree | 748fd55866bcbc4de5eee1c078ac8d2cad5b6fd7 /extra/mariabackup/xb_regex.h | |
parent | 77b2f55f61a4e3ba642049a01651c92bfb0a7d9d (diff) | |
parent | ca7cf69cb13285585922722063af888b957580ee (diff) | |
download | mariadb-git-9bc32256427373e5bfa78f17c5854ac4e6a2fc31.tar.gz |
Merge tag 'mariadb-10.2.6' into bb-10.2-ext
Diffstat (limited to 'extra/mariabackup/xb_regex.h')
-rw-r--r-- | extra/mariabackup/xb_regex.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/extra/mariabackup/xb_regex.h b/extra/mariabackup/xb_regex.h new file mode 100644 index 00000000000..2e07e434e27 --- /dev/null +++ b/extra/mariabackup/xb_regex.h @@ -0,0 +1,48 @@ +/****************************************************** +Copyright (c) 2011-2013 Percona LLC and/or its affiliates. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +*******************************************************/ + +/* This file is required to abstract away regex(3) calls so that +my_regex is used on Windows and native calls are used on POSIX platforms. */ + +#ifndef XB_REGEX_H +#define XB_REGEX_H + +#ifdef HAVE_SYSTEM_REGEX +#include <regex.h> +#else +#include <pcreposix.h> +#endif + +typedef regex_t* xb_regex_t; + +#define xb_regex_init() + +#define xb_regexec(preg,string,nmatch,pmatch,eflags) \ + regexec(preg, string, nmatch, pmatch, eflags) + +#define xb_regerror(errcode,preg,errbuf,errbuf_size) \ + regerror(errcode, preg, errbuf, errbuf_size) + +#define xb_regcomp(preg,regex,cflags) \ + regcomp(preg, regex, cflags) + +#define xb_regfree(preg) regfree(preg) + +#define xb_regex_end() + +#endif /* XB_REGEX_H */ |