From dc8c2f27f7cafe447818a8d4c720b4eead8dd7dd Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Mon, 10 Dec 2018 12:24:56 +0200 Subject: [PATCH] MXS-2197 Rename all module include files from .h to .hh --- .../authenticator/GSSAPI/GSSAPIAuth/gssapi_auth.cc | 2 +- .../GSSAPIBackendAuth/gssapi_backend_auth.cc | 2 +- .../GSSAPI/{gssapi_auth.h => gssapi_auth.hh} | 4 ---- .../authenticator/GSSAPI/gssapi_auth_common.cc | 2 +- server/modules/filter/hintfilter/hintfilter.cc | 2 +- server/modules/filter/hintfilter/hintparser.cc | 2 +- .../hintfilter/{mysqlhint.h => mysqlhint.hh} | 13 +------------ server/modules/filter/maxrows/maxrows.cc | 6 +----- .../filter/maxrows/{maxrows.h => maxrows.hh} | 4 ++++ .../include/{binlog_common.h => binlog_common.hh} | 4 ---- .../include/{blr_constants.h => blr_constants.hh} | 12 +----------- server/modules/include/{debugcli.h => debugcli.hh} | 14 +------------- server/modules/include/{telnetd.h => telnetd.hh} | 14 +------------- server/modules/protocol/maxscaled/maxscaled.cc | 2 +- .../maxscaled/{maxscaled.h => maxscaled.hh} | 13 +------------ server/modules/protocol/telnetd/telnetd.cc | 2 +- server/modules/routing/avrorouter/avro.cc | 2 +- server/modules/routing/avrorouter/avro_file.cc | 4 ++-- server/modules/routing/avrorouter/avro_main.cc | 2 +- server/modules/routing/avrorouter/avrorouter.hh | 6 +++--- server/modules/routing/avrorouter/rpl.hh | 2 +- .../modules/routing/binlogrouter/binlog_common.cc | 4 ++-- server/modules/routing/cli/cli.cc | 2 +- server/modules/routing/debugcli/debugcli.cc | 2 +- server/modules/routing/debugcli/debugcmd.cc | 4 ++-- 25 files changed, 31 insertions(+), 95 deletions(-) rename server/modules/authenticator/GSSAPI/{gssapi_auth.h => gssapi_auth.hh} (96%) rename server/modules/filter/hintfilter/{mysqlhint.h => mysqlhint.hh} (92%) rename server/modules/filter/maxrows/{maxrows.h => maxrows.hh} (94%) rename server/modules/include/{binlog_common.h => binlog_common.hh} (95%) rename server/modules/include/{blr_constants.h => blr_constants.hh} (95%) rename server/modules/include/{debugcli.h => debugcli.hh} (87%) rename server/modules/include/{telnetd.h => telnetd.hh} (88%) rename server/modules/protocol/maxscaled/{maxscaled.h => maxscaled.hh} (84%) diff --git a/server/modules/authenticator/GSSAPI/GSSAPIAuth/gssapi_auth.cc b/server/modules/authenticator/GSSAPI/GSSAPIAuth/gssapi_auth.cc index 985cfaa7d..5dca62172 100644 --- a/server/modules/authenticator/GSSAPI/GSSAPIAuth/gssapi_auth.cc +++ b/server/modules/authenticator/GSSAPI/GSSAPIAuth/gssapi_auth.cc @@ -25,7 +25,7 @@ #include #include -#include "../gssapi_auth.h" +#include "../gssapi_auth.hh" /** * MySQL queries for retrieving the list of users diff --git a/server/modules/authenticator/GSSAPI/GSSAPIBackendAuth/gssapi_backend_auth.cc b/server/modules/authenticator/GSSAPI/GSSAPIBackendAuth/gssapi_backend_auth.cc index 3c08a12e2..d9e0f0870 100644 --- a/server/modules/authenticator/GSSAPI/GSSAPIBackendAuth/gssapi_backend_auth.cc +++ b/server/modules/authenticator/GSSAPI/GSSAPIBackendAuth/gssapi_backend_auth.cc @@ -20,7 +20,7 @@ #include #include -#include "../gssapi_auth.h" +#include "../gssapi_auth.hh" /** * @file gssapi_backend_auth.c - GSSAPI backend authenticator diff --git a/server/modules/authenticator/GSSAPI/gssapi_auth.h b/server/modules/authenticator/GSSAPI/gssapi_auth.hh similarity index 96% rename from server/modules/authenticator/GSSAPI/gssapi_auth.h rename to server/modules/authenticator/GSSAPI/gssapi_auth.hh index 4bcfa3a6e..f3aafe7a3 100644 --- a/server/modules/authenticator/GSSAPI/gssapi_auth.h +++ b/server/modules/authenticator/GSSAPI/gssapi_auth.hh @@ -1,6 +1,4 @@ #pragma once -#ifndef _GSSAPI_AUTH_H -#define _GSSAPI_AUTH_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -51,5 +49,3 @@ typedef struct gssapi_auth void report_error(OM_uint32 major, OM_uint32 minor); MXS_END_DECLS - -#endif diff --git a/server/modules/authenticator/GSSAPI/gssapi_auth_common.cc b/server/modules/authenticator/GSSAPI/gssapi_auth_common.cc index 8006b9f81..035e7b1a1 100644 --- a/server/modules/authenticator/GSSAPI/gssapi_auth_common.cc +++ b/server/modules/authenticator/GSSAPI/gssapi_auth_common.cc @@ -11,7 +11,7 @@ * Public License. */ -#include "gssapi_auth.h" +#include "gssapi_auth.hh" #include /** diff --git a/server/modules/filter/hintfilter/hintfilter.cc b/server/modules/filter/hintfilter/hintfilter.cc index 4c43548b5..dc7f555af 100644 --- a/server/modules/filter/hintfilter/hintfilter.cc +++ b/server/modules/filter/hintfilter/hintfilter.cc @@ -18,7 +18,7 @@ #include #include #include -#include "mysqlhint.h" +#include "mysqlhint.hh" /** * hintfilter.c - a filter to parse the MaxScale hint syntax and attach those diff --git a/server/modules/filter/hintfilter/hintparser.cc b/server/modules/filter/hintfilter/hintparser.cc index 46e0594be..bede6d73d 100644 --- a/server/modules/filter/hintfilter/hintparser.cc +++ b/server/modules/filter/hintfilter/hintparser.cc @@ -19,7 +19,7 @@ #include #include #include -#include "mysqlhint.h" +#include "mysqlhint.hh" #include /** diff --git a/server/modules/filter/hintfilter/mysqlhint.h b/server/modules/filter/hintfilter/mysqlhint.hh similarity index 92% rename from server/modules/filter/hintfilter/mysqlhint.h rename to server/modules/filter/hintfilter/mysqlhint.hh index d0ae82b9f..9c48979e0 100644 --- a/server/modules/filter/hintfilter/mysqlhint.h +++ b/server/modules/filter/hintfilter/mysqlhint.hh @@ -1,6 +1,4 @@ #pragma once -#ifndef _MYSQLHINT_H -#define _MYSQLHINT_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -14,14 +12,7 @@ * Public License. */ -/* - * Revision History - * - * Date Who Description - * 17-07-2014 Mark Riddoch Initial implementation - */ - -#include +#include #include MXS_BEGIN_DECLS @@ -118,5 +109,3 @@ NAMEDHINTS* free_named_hint(NAMEDHINTS* named_hint); HINTSTACK* free_hint_stack(HINTSTACK* hint_stack); MXS_END_DECLS - -#endif diff --git a/server/modules/filter/maxrows/maxrows.cc b/server/modules/filter/maxrows/maxrows.cc index 6ed2f1bca..ffd9333a2 100644 --- a/server/modules/filter/maxrows/maxrows.cc +++ b/server/modules/filter/maxrows/maxrows.cc @@ -15,9 +15,7 @@ * @file maxrows.c - Result set limit Filter */ -#define MXS_MODULE_NAME "maxrows" - -#include +#include "maxrows.hh" #include #include @@ -34,8 +32,6 @@ #include #include -#include "maxrows.h" - static MXS_FILTER* createInstance(const char* name, MXS_CONFIG_PARAMETER*); static MXS_FILTER_SESSION* newSession(MXS_FILTER* instance, MXS_SESSION* session); diff --git a/server/modules/filter/maxrows/maxrows.h b/server/modules/filter/maxrows/maxrows.hh similarity index 94% rename from server/modules/filter/maxrows/maxrows.h rename to server/modules/filter/maxrows/maxrows.hh index 4452eb646..36d5214ce 100644 --- a/server/modules/filter/maxrows/maxrows.h +++ b/server/modules/filter/maxrows/maxrows.hh @@ -12,6 +12,10 @@ */ #pragma once +#define MXS_MODULE_NAME "maxrows" + +#include + #include MXS_BEGIN_DECLS diff --git a/server/modules/include/binlog_common.h b/server/modules/include/binlog_common.hh similarity index 95% rename from server/modules/include/binlog_common.h rename to server/modules/include/binlog_common.hh index 3bb42c3b1..ae1c20d95 100644 --- a/server/modules/include/binlog_common.h +++ b/server/modules/include/binlog_common.hh @@ -1,6 +1,4 @@ #pragma once -#ifndef _BINLOG_COMMON_H -#define _BINLOG_COMMON_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -57,5 +55,3 @@ static inline REP_HEADER construct_header(uint8_t* ptr) } MXS_END_DECLS - -#endif /* BINLOG_COMMON_H */ diff --git a/server/modules/include/blr_constants.h b/server/modules/include/blr_constants.hh similarity index 95% rename from server/modules/include/blr_constants.h rename to server/modules/include/blr_constants.hh index 22d491172..c8ef0871a 100644 --- a/server/modules/include/blr_constants.h +++ b/server/modules/include/blr_constants.hh @@ -1,6 +1,4 @@ #pragma once -#ifndef _BLR_DEFINES_H -#define _BLR_DEFINES_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -16,15 +14,9 @@ /** * @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 */ -#include +#include MXS_BEGIN_DECLS @@ -176,5 +168,3 @@ MXS_BEGIN_DECLS #define MARIADB_FL_STANDALONE 1 MXS_END_DECLS - -#endif diff --git a/server/modules/include/debugcli.h b/server/modules/include/debugcli.hh similarity index 87% rename from server/modules/include/debugcli.h rename to server/modules/include/debugcli.hh index 1ab60377f..0819a3525 100644 --- a/server/modules/include/debugcli.h +++ b/server/modules/include/debugcli.hh @@ -1,6 +1,4 @@ #pragma once -#ifndef _DEBUGCLI_H -#define _DEBUGCLI_H /* * * Copyright (c) 2016 MariaDB Corporation Ab @@ -17,17 +15,9 @@ /** * @file debugcli.h The debug interface to the gateway - * - * @verbatim - * Revision History - * - * Date Who Description - * 18/06/13 Mark Riddoch Initial implementation - * - * @endverbatim */ -#include +#include #include #include @@ -64,5 +54,3 @@ typedef struct cli_session } CLI_SESSION; MXS_END_DECLS - -#endif diff --git a/server/modules/include/telnetd.h b/server/modules/include/telnetd.hh similarity index 88% rename from server/modules/include/telnetd.h rename to server/modules/include/telnetd.hh index ac16267df..0858e0afd 100644 --- a/server/modules/include/telnetd.h +++ b/server/modules/include/telnetd.hh @@ -1,6 +1,4 @@ #pragma once -#ifndef _TELNETD_H -#define _TELNETD_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -16,17 +14,9 @@ /** * @file telnetd.h The telnetd protocol module header file - * - * @verbatim - * Revision History - * - * Date Who Description - * 17/07/13 Mark Riddoch Initial implementation - * - * @endverbatim */ -#include +#include #include #include @@ -65,5 +55,3 @@ typedef struct telnetd #define TELNET_SUPPRESS_GO_AHEAD 3 MXS_END_DECLS - -#endif diff --git a/server/modules/protocol/maxscaled/maxscaled.cc b/server/modules/protocol/maxscaled/maxscaled.cc index 3daa5090a..1f5bad8ab 100644 --- a/server/modules/protocol/maxscaled/maxscaled.cc +++ b/server/modules/protocol/maxscaled/maxscaled.cc @@ -36,7 +36,7 @@ #include #include #include -#include "maxscaled.h" +#include "maxscaled.hh" #include #include diff --git a/server/modules/protocol/maxscaled/maxscaled.h b/server/modules/protocol/maxscaled/maxscaled.hh similarity index 84% rename from server/modules/protocol/maxscaled/maxscaled.h rename to server/modules/protocol/maxscaled/maxscaled.hh index 82ab0e2de..98fae44f3 100644 --- a/server/modules/protocol/maxscaled/maxscaled.h +++ b/server/modules/protocol/maxscaled/maxscaled.hh @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALED_H -#define _MAXSCALED_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -16,15 +14,8 @@ /** * @file maxscaled.h The maxscaled protocol module header file - * - * @verbatim - * Revision History - * - * Date Who Description - * 13/06/14 Mark Riddoch Initial implementation - * - * @endverbatim */ +#include #include #include @@ -45,5 +36,3 @@ typedef struct maxscaled #define MAXSCALED_STATE_DATA 3 /**< User logged in */ MXS_END_DECLS - -#endif diff --git a/server/modules/protocol/telnetd/telnetd.cc b/server/modules/protocol/telnetd/telnetd.cc index c63afa755..36706e0d1 100644 --- a/server/modules/protocol/telnetd/telnetd.cc +++ b/server/modules/protocol/telnetd/telnetd.cc @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include diff --git a/server/modules/routing/avrorouter/avro.cc b/server/modules/routing/avrorouter/avro.cc index 2a76e8ccb..d0df43b64 100644 --- a/server/modules/routing/avrorouter/avro.cc +++ b/server/modules/routing/avrorouter/avro.cc @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include "avro_converter.hh" diff --git a/server/modules/routing/avrorouter/avro_file.cc b/server/modules/routing/avrorouter/avro_file.cc index 075612d2f..1a976c8fa 100644 --- a/server/modules/routing/avrorouter/avro_file.cc +++ b/server/modules/routing/avrorouter/avro_file.cc @@ -25,8 +25,8 @@ #include "avrorouter.hh" #include -#include -#include +#include +#include #include #include #include diff --git a/server/modules/routing/avrorouter/avro_main.cc b/server/modules/routing/avrorouter/avro_main.cc index c0d9666bf..aa38a7ad8 100644 --- a/server/modules/routing/avrorouter/avro_main.cc +++ b/server/modules/routing/avrorouter/avro_main.cc @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include "avro_converter.hh" diff --git a/server/modules/routing/avrorouter/avrorouter.hh b/server/modules/routing/avrorouter/avrorouter.hh index acf71d538..6f6121980 100644 --- a/server/modules/routing/avrorouter/avrorouter.hh +++ b/server/modules/routing/avrorouter/avrorouter.hh @@ -14,7 +14,7 @@ #define MXS_MODULE_NAME "avrorouter" -#include +#include #include #include #include @@ -26,9 +26,9 @@ #include #include #include -#include +#include #include -#include +#include #include "rpl.hh" diff --git a/server/modules/routing/avrorouter/rpl.hh b/server/modules/routing/avrorouter/rpl.hh index b00eb110d..646445967 100644 --- a/server/modules/routing/avrorouter/rpl.hh +++ b/server/modules/routing/avrorouter/rpl.hh @@ -21,7 +21,7 @@ #include #include -#include +#include typedef std::vector Bytes; diff --git a/server/modules/routing/binlogrouter/binlog_common.cc b/server/modules/routing/binlogrouter/binlog_common.cc index ac3d3a894..f57e738fe 100644 --- a/server/modules/routing/binlogrouter/binlog_common.cc +++ b/server/modules/routing/binlogrouter/binlog_common.cc @@ -11,13 +11,13 @@ * Public License. */ +#include #include #include #include #include #include -#include -#include +#include #include /** diff --git a/server/modules/routing/cli/cli.cc b/server/modules/routing/cli/cli.cc index ac010af7c..399ca1f9b 100644 --- a/server/modules/routing/cli/cli.cc +++ b/server/modules/routing/cli/cli.cc @@ -27,7 +27,7 @@ #define MXS_MODULE_NAME "cli" -#include +#include #include #include #include diff --git a/server/modules/routing/debugcli/debugcli.cc b/server/modules/routing/debugcli/debugcli.cc index b8babda68..114ef4a2b 100644 --- a/server/modules/routing/debugcli/debugcli.cc +++ b/server/modules/routing/debugcli/debugcli.cc @@ -26,7 +26,7 @@ #define MXS_MODULE_NAME "debugcli" -#include +#include #include #include #include diff --git a/server/modules/routing/debugcli/debugcmd.cc b/server/modules/routing/debugcli/debugcmd.cc index 3d784769f..87bed500f 100644 --- a/server/modules/routing/debugcli/debugcmd.cc +++ b/server/modules/routing/debugcli/debugcmd.cc @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include @@ -54,7 +54,7 @@ #include #include -#include +#include #include "../../../core/internal/config.hh" #include "../../../core/internal/config_runtime.hh"