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,3 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef _SCHEMAROUTER_H
|
||||
#define _SCHEMAROUTER_H
|
||||
/*
|
||||
@ -23,14 +24,15 @@
|
||||
*
|
||||
* @endverbatim
|
||||
*/
|
||||
#ifndef PCRE2_CODE_UNIT_WIDTH
|
||||
#define PCRE2_CODE_UNIT_WIDTH 8
|
||||
#endif
|
||||
|
||||
#include <maxscale/cdefs.h>
|
||||
#include <maxscale/dcb.h>
|
||||
#include <maxscale/hashtable.h>
|
||||
#include <maxscale/protocol/mysql.h>
|
||||
#include <pcre2.h>
|
||||
#include <maxscale/pcre2.h>
|
||||
|
||||
MXS_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* Bitmask values for the router session's initialization. These values are used
|
||||
* to prevent responses from internal commands being forwarded to the client.
|
||||
@ -377,4 +379,6 @@ typedef struct router_instance
|
||||
#define BACKEND_TYPE(b) (SERVER_IS_MASTER((b)->backend_server) ? BE_MASTER : \
|
||||
(SERVER_IS_SLAVE((b)->backend_server) ? BE_SLAVE : BE_UNDEFINED));
|
||||
|
||||
MXS_END_DECLS
|
||||
|
||||
#endif /*< _SCHEMAROUTER_H */
|
||||
|
@ -1,3 +1,6 @@
|
||||
#pragma once
|
||||
#ifndef _SHARDING_COMMON_HG
|
||||
#define _SHARDING_COMMON_HG
|
||||
/*
|
||||
* Copyright (c) 2016 MariaDB Corporation Ab
|
||||
*
|
||||
@ -11,9 +14,7 @@
|
||||
* Public License.
|
||||
*/
|
||||
|
||||
#ifndef _SHARDING_COMMON_HG
|
||||
#define _SHARDING_COMMON_HG
|
||||
|
||||
#include <maxscale/cdefs.h>
|
||||
#include <my_config.h>
|
||||
#include <poll.h>
|
||||
#include <maxscale/buffer.h>
|
||||
@ -23,8 +24,12 @@
|
||||
#include <maxscale/log_manager.h>
|
||||
#include <maxscale/query_classifier.h>
|
||||
|
||||
MXS_BEGIN_DECLS
|
||||
|
||||
bool extract_database(GWBUF* buf, char* str);
|
||||
void create_error_reply(char* fail_str, DCB* dcb);
|
||||
bool change_current_db(char* dest, HASHTABLE* dbhash, GWBUF* buf);
|
||||
|
||||
MXS_END_DECLS
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user