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 _RWSPLITROUTER_H
|
||||
#define _RWSPLITROUTER_H
|
||||
/*
|
||||
@ -24,10 +25,13 @@
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
#include <maxscale/cdefs.h>
|
||||
#include <maxscale/dcb.h>
|
||||
#include <maxscale/hashtable.h>
|
||||
#include <math.h>
|
||||
|
||||
MXS_BEGIN_DECLS
|
||||
|
||||
#undef PREP_STMT_CACHING
|
||||
|
||||
#if defined(PREP_STMT_CACHING)
|
||||
@ -356,5 +360,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 /*< _RWSPLITROUTER_H */
|
||||
|
@ -1,3 +1,6 @@
|
||||
#pragma once
|
||||
#ifndef _RWSPLIT_INTERNAL_H
|
||||
#define _RWSPLIT_INTERNAL_H
|
||||
/*
|
||||
* Copyright (c) 2016 MariaDB Corporation Ab
|
||||
*
|
||||
@ -18,15 +21,11 @@
|
||||
* Created on 08 August 2016, 11:54
|
||||
*/
|
||||
|
||||
#ifndef RWSPLIT_INTERNAL_H
|
||||
#define RWSPLIT_INTERNAL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <maxscale/cdefs.h>
|
||||
#include <maxscale/query_classifier.h>
|
||||
|
||||
|
||||
MXS_BEGIN_DECLS
|
||||
|
||||
/* This needs to be removed along with dependency on it - see the
|
||||
* rwsplit_tmp_table_multi functions
|
||||
*/
|
||||
@ -145,5 +144,7 @@ qc_query_type_t determine_query_type(GWBUF *querybuf, int packet_type, bool non_
|
||||
}
|
||||
#endif
|
||||
|
||||
MXS_END_DECLS
|
||||
|
||||
#endif /* RWSPLIT_INTERNAL_H */
|
||||
|
||||
|
Reference in New Issue
Block a user