Cleanup header files
- All now include maxscale/cdefs.h as the very first file. - MXS_[BEGIN|END]_DECLS added to all C-headers. Strictly speaking not necessary for private headers, but does not hurt either. - Include guards moved to the very top of the file. - #pragma once added.
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
#ifndef BINLOG_COMMON_H
|
||||
#define BINLOG_COMMON_H
|
||||
#pragma once
|
||||
#ifndef _BINLOG_COMMON_H
|
||||
#define _BINLOG_COMMON_H
|
||||
/*
|
||||
* Copyright (c) 2016 MariaDB Corporation Ab
|
||||
*
|
||||
@ -13,9 +14,13 @@
|
||||
* Public License.
|
||||
*/
|
||||
|
||||
#include <maxscale/cdefs.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
|
||||
MXS_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* Packet header for replication messages
|
||||
*/
|
||||
@ -45,4 +50,6 @@ bool binlog_next_file_exists(const char* binlogdir, const char* binlog);
|
||||
uint32_t extract_field(uint8_t *src, int bits);
|
||||
const char* binlog_event_name(int type);
|
||||
|
||||
MXS_END_DECLS
|
||||
|
||||
#endif /* BINLOG_COMMON_H */
|
||||
|
@ -1,3 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef _BLR_DEFINES_H
|
||||
#define _BLR_DEFINES_H
|
||||
/*
|
||||
@ -13,16 +14,19 @@
|
||||
* Public License.
|
||||
*/
|
||||
|
||||
/*
|
||||
/**
|
||||
* @file blr_defines.h - Various definitions for binlogrouter
|
||||
|
||||
* @verbatim
|
||||
* Revision History
|
||||
*
|
||||
* 26/04/16 Massimiliano Pinto Added MariaDB 10.0 and 10.1 GTID event flags detection
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file blr_defines.h - Various definitions for binlogrouter
|
||||
*/
|
||||
#include <maxscale/cdefs.h>
|
||||
|
||||
MXS_BEGIN_DECLS
|
||||
|
||||
#define BINLOG_FNAMELEN 255
|
||||
#define BLR_PROTOCOL "MySQLBackend"
|
||||
@ -201,4 +205,6 @@
|
||||
#define EXTRACT32(x) extract_field((x), 32)
|
||||
#endif
|
||||
|
||||
MXS_END_DECLS
|
||||
|
||||
#endif
|
||||
|
@ -1,3 +1,6 @@
|
||||
#pragma once
|
||||
#ifndef _CDC_H
|
||||
#define _CDC_H
|
||||
/*
|
||||
* Copyright (c) 2016 MariaDB Corporation Ab
|
||||
*
|
||||
@ -18,6 +21,7 @@
|
||||
* 11-01-2016 Massimiliano Pinto First Implementation
|
||||
*/
|
||||
|
||||
#include <maxscale/cdefs.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -35,6 +39,8 @@
|
||||
#include <maxscale/atomic.h>
|
||||
#include <maxscale/gw.h>
|
||||
|
||||
MXS_BEGIN_DECLS
|
||||
|
||||
#define CDC_SMALL_BUFFER 1024
|
||||
#define CDC_METHOD_MAXLEN 128
|
||||
#define CDC_USER_MAXLEN 128
|
||||
@ -87,3 +93,7 @@ typedef struct cdc_protocol
|
||||
|
||||
/* routines */
|
||||
extern int gw_hex2bin(uint8_t *out, const char *in, unsigned int len);
|
||||
|
||||
MXS_END_DECLS
|
||||
|
||||
#endif
|
||||
|
@ -1,3 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef _DEBUGCLI_H
|
||||
#define _DEBUGCLI_H
|
||||
/*
|
||||
@ -13,10 +14,14 @@
|
||||
* of this software will be governed by version 2 or later of the General
|
||||
* Public License.
|
||||
*/
|
||||
|
||||
#include <maxscale/cdefs.h>
|
||||
#include <maxscale/service.h>
|
||||
#include <maxscale/session.h>
|
||||
#include <maxscale/spinlock.h>
|
||||
|
||||
MXS_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* @file debugcli.h The debug interface to the gateway
|
||||
*
|
||||
@ -63,4 +68,7 @@ typedef struct cli_session
|
||||
/* Command line interface modes */
|
||||
#define CLIM_USER 1
|
||||
#define CLIM_DEVELOPER 2
|
||||
|
||||
MXS_END_DECLS
|
||||
|
||||
#endif
|
||||
|
@ -1,3 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef _MYSQL_AUTH_H
|
||||
#define _MYSQL_AUTH_H
|
||||
/*
|
||||
@ -23,11 +24,14 @@
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
#include <maxscale/cdefs.h>
|
||||
#include <maxscale/dcb.h>
|
||||
#include <maxscale/buffer.h>
|
||||
#include <stdint.h>
|
||||
#include <maxscale/protocol/mysql.h>
|
||||
|
||||
MXS_BEGIN_DECLS
|
||||
|
||||
int gw_check_mysql_scramble_data(DCB *dcb,
|
||||
uint8_t *token,
|
||||
unsigned int token_len,
|
||||
@ -41,4 +45,6 @@ int gw_find_mysql_user_password_sha1(
|
||||
uint8_t *gateway_password,
|
||||
DCB *dcb);
|
||||
|
||||
MXS_END_DECLS
|
||||
|
||||
#endif /** _MYSQL_AUTH_H */
|
||||
|
@ -1,3 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef _TELNETD_H
|
||||
#define _TELNETD_H
|
||||
/*
|
||||
@ -24,8 +25,13 @@
|
||||
*
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
#include <maxscale/cdefs.h>
|
||||
#include <maxscale/dcb.h>
|
||||
#include <maxscale/housekeeper.h>
|
||||
|
||||
MXS_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* The telnetd specific protocol structure to put in the DCB.
|
||||
*/
|
||||
@ -57,4 +63,7 @@ typedef struct telnetd
|
||||
#define TELNET_IAC 255
|
||||
#define TELNET_ECHO 1
|
||||
#define TELNET_SUPPRESS_GO_AHEAD 3
|
||||
|
||||
MXS_END_DECLS
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user