mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Portability fix in mysqlbinlog.cc (include my_pthread.h)
Clean up 'unused argument' warnings Add extern "C" { ... } in my_pthread.h
This commit is contained in:
@ -21,6 +21,7 @@
|
|||||||
#include <m_string.h>
|
#include <m_string.h>
|
||||||
#include <my_sys.h>
|
#include <my_sys.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
|
#include <my_pthread.h>
|
||||||
#include <thr_alarm.h>
|
#include <thr_alarm.h>
|
||||||
#include <mysql.h>
|
#include <mysql.h>
|
||||||
#include "log_event.h"
|
#include "log_event.h"
|
||||||
|
@ -247,10 +247,10 @@ static int eval_result = 0;
|
|||||||
|
|
||||||
/* Disable functions that only exist in MySQL 4.0 */
|
/* Disable functions that only exist in MySQL 4.0 */
|
||||||
#if MYSQL_VERSION_ID < 40000
|
#if MYSQL_VERSION_ID < 40000
|
||||||
static void mysql_enable_rpl_parse(MYSQL* mysql) {}
|
static void mysql_enable_rpl_parse(MYSQL* mysql __attribute__((unused))) {}
|
||||||
static void mysql_disable_rpl_parse(MYSQL* mysql) {}
|
static void mysql_disable_rpl_parse(MYSQL* mysql __attribute__((unused))) {}
|
||||||
static int mysql_rpl_parse_enabled(MYSQL* mysql) { return 1; }
|
static int mysql_rpl_parse_enabled(MYSQL* mysql __attribute__((unused))) { return 1; }
|
||||||
static int mysql_rpl_probe(MYSQL *mysql) { return 1; }
|
static int mysql_rpl_probe(MYSQL *mysql __attribute__((unused))) { return 1; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#ifndef THREAD
|
#ifndef THREAD
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(void)
|
||||||
{
|
{
|
||||||
printf("This test must be compiled with multithread support to work\n");
|
printf("This test must be compiled with multithread support to work\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -20,6 +20,10 @@
|
|||||||
#ifndef _my_pthread_h
|
#ifndef _my_pthread_h
|
||||||
#define _my_pthread_h
|
#define _my_pthread_h
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#ifndef ETIME
|
#ifndef ETIME
|
||||||
#define ETIME ETIMEDOUT /* For FreeBSD */
|
#define ETIME ETIMEDOUT /* For FreeBSD */
|
||||||
@ -576,4 +580,9 @@ extern struct st_my_thread_var *_my_thread_var(void) __attribute__ ((const));
|
|||||||
#endif /* SAFE_STATISTICS */
|
#endif /* SAFE_STATISTICS */
|
||||||
#endif /* HAVE_ATOMIC_ADD */
|
#endif /* HAVE_ATOMIC_ADD */
|
||||||
#endif /* thread_safe_increment */
|
#endif /* thread_safe_increment */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _my_ptread_h */
|
#endif /* _my_ptread_h */
|
||||||
|
Reference in New Issue
Block a user