From d7ce3ad75beccb15575d0de6e034dec6a0b63dc4 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Wed, 26 Oct 2016 08:23:15 +0300 Subject: [PATCH] Replace include guards with #pragma once --- include/maxscale/adminusers.h.in | 4 ---- include/maxscale/alloc.h | 4 ---- include/maxscale/atomic.h | 4 ---- include/maxscale/buffer.h | 4 ---- include/maxscale/cdefs.h | 4 ---- include/maxscale/config.h | 4 ---- include/maxscale/dcb.h | 4 ---- include/maxscale/debug.h | 4 ---- include/maxscale/externcmd.h | 4 ---- include/maxscale/filter.h | 4 ---- include/maxscale/gw_authenticator.h | 5 ----- include/maxscale/gw_protocol.h | 5 ----- include/maxscale/gw_ssl.h | 4 ---- include/maxscale/gwbitmask.h | 4 ---- include/maxscale/gwdirs.h.in | 4 ---- include/maxscale/hashtable.h | 4 ---- include/maxscale/hint.h | 4 ---- include/maxscale/hk_heartbeat.h | 5 ----- include/maxscale/housekeeper.h | 4 ---- include/maxscale/limits.h | 4 ---- include/maxscale/listener.h | 4 ---- include/maxscale/listmanager.h | 4 ---- include/maxscale/log_manager.h | 4 ---- include/maxscale/maxadmin.h | 4 ---- include/maxscale/maxscale.h | 4 ---- include/maxscale/memlog.h | 4 ---- include/maxscale/modinfo.h | 4 ---- include/maxscale/modules.h | 4 ---- include/maxscale/modutil.h | 4 ---- include/maxscale/monitor.h | 4 ---- include/maxscale/mysql_binlog.h | 4 ---- include/maxscale/mysql_utils.h | 4 ---- include/maxscale/notification.h | 4 ---- include/maxscale/pcre2.h | 4 ---- include/maxscale/platform.h | 4 ---- include/maxscale/poll.h | 4 ---- include/maxscale/protocol/mysql.h | 5 +---- include/maxscale/query_classifier.h | 4 ---- include/maxscale/queuemanager.h | 4 ---- include/maxscale/random_jkiss.h | 4 ---- include/maxscale/rdtsc.h | 4 ---- include/maxscale/resultset.h | 4 ---- include/maxscale/router.h | 4 ---- include/maxscale/secrets.h | 4 ---- include/maxscale/server.h | 4 ---- include/maxscale/service.h | 4 ---- include/maxscale/session.h | 4 ---- include/maxscale/spinlock.h | 4 ---- include/maxscale/statistics.h | 4 ---- include/maxscale/thread.h | 4 ---- include/maxscale/users.h | 4 ---- include/maxscale/utils.h | 4 ---- 52 files changed, 1 insertion(+), 211 deletions(-) diff --git a/include/maxscale/adminusers.h.in b/include/maxscale/adminusers.h.in index bc9302b13..5526d1ee7 100644 --- a/include/maxscale/adminusers.h.in +++ b/include/maxscale/adminusers.h.in @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_ADMINUSERS_H -#define _MAXSCALE_ADMINUSERS_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -69,5 +67,3 @@ extern bool admin_verify_inet_user(const char *uname, const char *passwor extern void dcb_PrintAdminUsers(DCB *dcb); MXS_END_DECLS - -#endif diff --git a/include/maxscale/alloc.h b/include/maxscale/alloc.h index 49cd04a29..8c2dad478 100644 --- a/include/maxscale/alloc.h +++ b/include/maxscale/alloc.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_ALLOC_H -#define _MAXSCALE_ALLOC_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -79,5 +77,3 @@ char *mxs_strndup_a(const char *s, size_t n/*, const char *caller*/); #define MXS_ABORT_IF_FALSE(b) do { if (!b) { abort(); } } while (false) MXS_END_DECLS - -#endif diff --git a/include/maxscale/atomic.h b/include/maxscale/atomic.h index 71127ee7c..f6d694e0c 100644 --- a/include/maxscale/atomic.h +++ b/include/maxscale/atomic.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_ATOMIC_H -#define _MAXSCALE_ATOMIC_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -35,5 +33,3 @@ int atomic_add(int *variable, int value); int atomic_add(int *variable, int value); MXS_END_DECLS - -#endif diff --git a/include/maxscale/buffer.h b/include/maxscale/buffer.h index f963167a0..3e9995faf 100644 --- a/include/maxscale/buffer.h +++ b/include/maxscale/buffer.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_BUFFER_H -#define _MAXSCALE_BUFFER_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -219,5 +217,3 @@ extern void dprintAllBuffers(void *pdcb); #endif MXS_END_DECLS - -#endif diff --git a/include/maxscale/cdefs.h b/include/maxscale/cdefs.h index a26342939..3b24b55c9 100644 --- a/include/maxscale/cdefs.h +++ b/include/maxscale/cdefs.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_CDEFS_H -#define _MAXSCALE_CDEFS_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -73,5 +71,3 @@ #include #include #include - -#endif diff --git a/include/maxscale/config.h b/include/maxscale/config.h index 128a906eb..b765c33fb 100644 --- a/include/maxscale/config.h +++ b/include/maxscale/config.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_CONFIG_H -#define _MAXSCALE_CONFIG_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -166,5 +164,3 @@ void free_config_parameter(CONFIG_PARAMETER* p1); bool is_internal_service(const char *router); MXS_END_DECLS - -#endif diff --git a/include/maxscale/dcb.h b/include/maxscale/dcb.h index 5b08e377c..617d124e1 100644 --- a/include/maxscale/dcb.h +++ b/include/maxscale/dcb.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_DCB_H -#define _MAXSCALE_DCB_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -375,5 +373,3 @@ void dcb_append_readqueue(DCB *dcb, GWBUF *buffer); #define DCB_REPLIED(d) ((d)->flags & DCBF_REPLIED) MXS_END_DECLS - -#endif /* _DCB_H */ diff --git a/include/maxscale/debug.h b/include/maxscale/debug.h index 69d0d7367..dde1f3032 100644 --- a/include/maxscale/debug.h +++ b/include/maxscale/debug.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_DEBUG_H -#define _MAXSCALE_DEBUG_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -568,5 +566,3 @@ static bool conn_open[10240]; #endif /* FAKE_CODE */ MXS_END_DECLS - -#endif diff --git a/include/maxscale/externcmd.h b/include/maxscale/externcmd.h index 36efeb544..284c7e8dd 100644 --- a/include/maxscale/externcmd.h +++ b/include/maxscale/externcmd.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_EXTERN_CMD_HG -#define _MAXSCALE_EXTERN_CMD_HG /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -42,5 +40,3 @@ bool externcmd_can_execute(const char* argstr); bool externcmd_matches(const EXTERNCMD* cmd, const char* match); MXS_END_DECLS - -#endif diff --git a/include/maxscale/filter.h b/include/maxscale/filter.h index ec837d8e9..1eabbe326 100644 --- a/include/maxscale/filter.h +++ b/include/maxscale/filter.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_FILTER_H -#define _MAXSCALE_FILTER_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -140,5 +138,3 @@ typedef enum filter_capability */ MXS_END_DECLS - -#endif diff --git a/include/maxscale/gw_authenticator.h b/include/maxscale/gw_authenticator.h index deafd14b7..b76ea0c59 100644 --- a/include/maxscale/gw_authenticator.h +++ b/include/maxscale/gw_authenticator.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_GW_AUTHENTICATOR_H -#define _MAXSCALE_GW_AUTHENTICATOR_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -140,6 +138,3 @@ bool authenticator_init(void **instance, const char *authenticator, const char * const char* get_default_authenticator(const char *protocol); MXS_END_DECLS - -#endif /* GW_AUTHENTICATOR_H */ - diff --git a/include/maxscale/gw_protocol.h b/include/maxscale/gw_protocol.h index aa5ad2abf..e0f8b774e 100644 --- a/include/maxscale/gw_protocol.h +++ b/include/maxscale/gw_protocol.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_GW_PROTOCOL_H -#define _MAXSCALE_GW_PROTOCOL_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -86,6 +84,3 @@ typedef struct gw_protocol #define GWPROTOCOL_VERSION {1, 1, 0} MXS_END_DECLS - -#endif /* GW_PROTOCOL_H */ - diff --git a/include/maxscale/gw_ssl.h b/include/maxscale/gw_ssl.h index 65ac9ca82..d15733e79 100644 --- a/include/maxscale/gw_ssl.h +++ b/include/maxscale/gw_ssl.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_GW_SSL_H -#define _MAXSCALE_GW_SSL_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -83,5 +81,3 @@ bool ssl_required_but_not_negotiated(struct dcb *dcb); const char* ssl_method_type_to_string(ssl_method_type_t method_type); MXS_END_DECLS - -#endif /* _GW_SSL_H */ diff --git a/include/maxscale/gwbitmask.h b/include/maxscale/gwbitmask.h index d5d041eea..1a47c26fd 100644 --- a/include/maxscale/gwbitmask.h +++ b/include/maxscale/gwbitmask.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_GWBITMASK_H -#define _MAXSCALE_GWBITMASK_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -60,5 +58,3 @@ extern void bitmask_copy(GWBITMASK *, GWBITMASK *); extern char *bitmask_render_readable(GWBITMASK *); MXS_END_DECLS - -#endif diff --git a/include/maxscale/gwdirs.h.in b/include/maxscale/gwdirs.h.in index a782c30d2..909d324f0 100644 --- a/include/maxscale/gwdirs.h.in +++ b/include/maxscale/gwdirs.h.in @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_GW_DIRS_HG -#define _MAXSCALE_GW_DIRS_HG /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -79,5 +77,3 @@ char* get_langdir(); char* get_execdir(); MXS_END_DECLS - -#endif diff --git a/include/maxscale/hashtable.h b/include/maxscale/hashtable.h index 185b195ab..6eabfa87b 100644 --- a/include/maxscale/hashtable.h +++ b/include/maxscale/hashtable.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_HASTABLE_H -#define _MAXSCALE_HASTABLE_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -153,5 +151,3 @@ extern void* hashtable_item_strdup(const void *str); extern int hashtable_item_strhash(const void *str); MXS_END_DECLS - -#endif diff --git a/include/maxscale/hint.h b/include/maxscale/hint.h index d1943b900..d79ba731b 100644 --- a/include/maxscale/hint.h +++ b/include/maxscale/hint.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_HINT_H -#define _MAXSCALE_HINT_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -68,5 +66,3 @@ extern HINT *hint_dup(HINT *); bool hint_exists(HINT **, HINT_TYPE); MXS_END_DECLS - -#endif diff --git a/include/maxscale/hk_heartbeat.h b/include/maxscale/hk_heartbeat.h index bdc2567ef..6ad90161d 100644 --- a/include/maxscale/hk_heartbeat.h +++ b/include/maxscale/hk_heartbeat.h @@ -1,7 +1,4 @@ #pragma once -#ifndef _MAXSCALE_HK_HEARTBEAT_H -#define _MAXSCALE_HK_HEARTBEAT_H - /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -27,5 +24,3 @@ MXS_BEGIN_DECLS extern long hkheartbeat; MXS_END_DECLS - -#endif diff --git a/include/maxscale/housekeeper.h b/include/maxscale/housekeeper.h index 131a0fbae..3a7922ceb 100644 --- a/include/maxscale/housekeeper.h +++ b/include/maxscale/housekeeper.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_HOUSEKEEPER_H -#define _MAXSCALE_HOUSEKEEPER_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -61,5 +59,3 @@ extern void hkshutdown(); extern void hkshow_tasks(DCB *pdcb); MXS_END_DECLS - -#endif diff --git a/include/maxscale/limits.h b/include/maxscale/limits.h index 43eab289f..548f7896f 100644 --- a/include/maxscale/limits.h +++ b/include/maxscale/limits.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_LIMITS_H -#define _MAXSCALE_LIMITS_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -74,5 +72,3 @@ MXS_BEGIN_DECLS #define MXS_MAX_THREADS 255 MXS_END_DECLS - -#endif diff --git a/include/maxscale/listener.h b/include/maxscale/listener.h index 0e8cb6097..0df0f5d8d 100644 --- a/include/maxscale/listener.h +++ b/include/maxscale/listener.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_LISTENER_H -#define _MAXSCALE_LISTENER_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -70,5 +68,3 @@ void listener_set_certificates(SSL_LISTENER *ssl_listener, char* cert, char* key int listener_init_SSL(SSL_LISTENER *ssl_listener); MXS_END_DECLS - -#endif diff --git a/include/maxscale/listmanager.h b/include/maxscale/listmanager.h index b35733847..eb582efed 100644 --- a/include/maxscale/listmanager.h +++ b/include/maxscale/listmanager.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_LISTMANAGER_H -#define _MAXSCALE_LISTMANAGER_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -120,5 +118,3 @@ list_entry_t *list_remove_first(LIST_CONFIG *list_config); list_entry_t *list_remove_last(LIST_CONFIG *list_config); MXS_END_DECLS - -#endif /* LISTMANAGER_H */ diff --git a/include/maxscale/log_manager.h b/include/maxscale/log_manager.h index e46369f5e..307fc6e89 100644 --- a/include/maxscale/log_manager.h +++ b/include/maxscale/log_manager.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_LOG_MANAGER_H -#define _MAXSCALE_LOG_MANAGER_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -203,5 +201,3 @@ enum }; MXS_END_DECLS - -#endif /** LOG_MANAGER_H */ diff --git a/include/maxscale/maxadmin.h b/include/maxscale/maxadmin.h index 8eb577b6d..ab8c0f4c6 100644 --- a/include/maxscale/maxadmin.h +++ b/include/maxscale/maxadmin.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_MAXADMIN_H -#define _MAXSCALE_MAXADMIN_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -34,5 +32,3 @@ MXS_BEGIN_DECLS #define MAXADMIN_AUTH_PASSWORD_PROMPT_LEN 8 MXS_END_DECLS - -#endif diff --git a/include/maxscale/maxscale.h b/include/maxscale/maxscale.h index 5263409cf..93d43bd19 100644 --- a/include/maxscale/maxscale.h +++ b/include/maxscale/maxscale.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_MAXSCALE_H -#define _MAXSCALE_MAXSCALE_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -47,5 +45,3 @@ time_t maxscale_started(void); int maxscale_uptime(void); MXS_END_DECLS - -#endif diff --git a/include/maxscale/memlog.h b/include/maxscale/memlog.h index 5c6fdfa6c..8d609af3d 100644 --- a/include/maxscale/memlog.h +++ b/include/maxscale/memlog.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_MEMLOG_H -#define _MAXSCALE_MEMLOG_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -65,5 +63,3 @@ extern void memlog_flush_all(); extern void memlog_flush(MEMLOG *); MXS_END_DECLS - -#endif diff --git a/include/maxscale/modinfo.h b/include/maxscale/modinfo.h index 99d68a37f..09e413bd0 100644 --- a/include/maxscale/modinfo.h +++ b/include/maxscale/modinfo.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_MODINFO_H -#define _MAXSCALE_MODINFO_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -90,5 +88,3 @@ typedef struct } MODULE_INFO; MXS_END_DECLS - -#endif diff --git a/include/maxscale/modules.h b/include/maxscale/modules.h index eb21810c9..1c8f5787d 100644 --- a/include/maxscale/modules.h +++ b/include/maxscale/modules.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_MODULES_H -#define _MAXSCALE_MODULES_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -75,5 +73,3 @@ extern void module_feedback_send(void*); extern void moduleShowFeedbackReport(DCB *dcb); MXS_END_DECLS - -#endif diff --git a/include/maxscale/modutil.h b/include/maxscale/modutil.h index 9f609f795..ad888894f 100644 --- a/include/maxscale/modutil.h +++ b/include/maxscale/modutil.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_MODUTIL_H -#define _MAXSCALE_MODUTIL_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -76,5 +74,3 @@ bool is_mysql_sp_end(const char* start, int len); char* modutil_get_canonical(GWBUF* querybuf); MXS_END_DECLS - -#endif diff --git a/include/maxscale/monitor.h b/include/maxscale/monitor.h index 9d0b9269b..106b17113 100644 --- a/include/maxscale/monitor.h +++ b/include/maxscale/monitor.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_MONITOR_H -#define _MAXSCALE_MONITOR_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -232,5 +230,3 @@ void mon_log_connect_error(MONITOR_SERVERS* database, connect_result_t rval); void mon_log_state_change(MONITOR_SERVERS *ptr); MXS_END_DECLS - -#endif diff --git a/include/maxscale/mysql_binlog.h b/include/maxscale/mysql_binlog.h index 2e7f4c5de..ecf2f3068 100644 --- a/include/maxscale/mysql_binlog.h +++ b/include/maxscale/mysql_binlog.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_MYSQL_BINLOG_H -#define _MAXSCALE_MYSQL_BINLOG_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -96,5 +94,3 @@ uint64_t unpack_bit(uint8_t *ptr, uint8_t *null_mask, uint32_t col_count, void format_temporal_value(char *str, size_t size, uint8_t type, struct tm *tm); MXS_END_DECLS - -#endif /* MYSQL_BINLOG_H */ diff --git a/include/maxscale/mysql_utils.h b/include/maxscale/mysql_utils.h index f5b4d79ce..35748bf1e 100644 --- a/include/maxscale/mysql_utils.h +++ b/include/maxscale/mysql_utils.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_MYSQL_UTILS_H -#define _MAXSCALE_MYSQL_UTILS_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -34,5 +32,3 @@ char* lestr_consume(uint8_t** c, size_t *size); MYSQL *mxs_mysql_real_connect(MYSQL *mysql, SERVER *server, const char *user, const char *passwd); MXS_END_DECLS - -#endif diff --git a/include/maxscale/notification.h b/include/maxscale/notification.h index db410910f..af695ebb4 100644 --- a/include/maxscale/notification.h +++ b/include/maxscale/notification.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_NOTIFICATION_H -#define _MAXSCALE_NOTIFICATION_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -64,5 +62,3 @@ extern void gw_sha1_str(const uint8_t *in, int in_len, uint8_t *out); extern FEEDBACK_CONF * config_get_feedback_data(); MXS_END_DECLS - -#endif diff --git a/include/maxscale/pcre2.h b/include/maxscale/pcre2.h index e2373cca4..77d7d6976 100644 --- a/include/maxscale/pcre2.h +++ b/include/maxscale/pcre2.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_PCRE2_H -#define _MAXSCALE_PCRE2_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -50,5 +48,3 @@ mxs_pcre2_result_t mxs_pcre2_simple_match(const char* pattern, const char* subje int options, int* error); MXS_END_DECLS - -#endif diff --git a/include/maxscale/platform.h b/include/maxscale/platform.h index 486898d0b..8223d4d57 100644 --- a/include/maxscale/platform.h +++ b/include/maxscale/platform.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_PLATFORM_H -#define _MAXSCALE_PLATFORM_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -54,5 +52,3 @@ MXS_BEGIN_DECLS #endif // __cplusplus MXS_END_DECLS - -#endif // _PLATFORM_H diff --git a/include/maxscale/poll.h b/include/maxscale/poll.h index ab0e6e385..315423cb2 100644 --- a/include/maxscale/poll.h +++ b/include/maxscale/poll.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_POLL_H -#define _MAXSCALE_POLL_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -75,5 +73,3 @@ extern void poll_fake_write_event(DCB *dcb); extern void poll_fake_read_event(DCB *dcb); MXS_END_DECLS - -#endif diff --git a/include/maxscale/protocol/mysql.h b/include/maxscale/protocol/mysql.h index 3fc66cc49..7731c3c30 100644 --- a/include/maxscale/protocol/mysql.h +++ b/include/maxscale/protocol/mysql.h @@ -1,5 +1,4 @@ -#ifndef _MAXSCALE_PROTOCOL_MYSQL_H -#define _MAXSCALE_PROTOCOL_MYSQL_H +#pragma once /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -388,5 +387,3 @@ int mxs_mysql_send_ok(DCB *dcb, int sequence, int affected_rows, const char* mes bool mxs_mysql_is_ok_packet(GWBUF *buffer); MXS_END_DECLS - -#endif /** _MYSQL_PROTOCOL_H */ diff --git a/include/maxscale/query_classifier.h b/include/maxscale/query_classifier.h index f53b6a1ca..2c26a5970 100644 --- a/include/maxscale/query_classifier.h +++ b/include/maxscale/query_classifier.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_QUERY_CLASSIFIER_HG -#define _MAXSCALE_QUERY_CLASSIFIER_HG /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -132,5 +130,3 @@ struct query_classifier #define QUERY_CLASSIFIER_VERSION {1, 0, 0} MXS_END_DECLS - -#endif diff --git a/include/maxscale/queuemanager.h b/include/maxscale/queuemanager.h index 15f9ac39f..f8f1ee118 100644 --- a/include/maxscale/queuemanager.h +++ b/include/maxscale/queuemanager.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_QUEUEMANAGER_H -#define _MAXSCALE_QUEUEMANAGER_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -72,5 +70,3 @@ mxs_queue_count(QUEUE_CONFIG *queue_config) } MXS_END_DECLS - -#endif /* QUEUEMANAGER_H */ diff --git a/include/maxscale/random_jkiss.h b/include/maxscale/random_jkiss.h index c1041ea8f..5f1e2bee9 100644 --- a/include/maxscale/random_jkiss.h +++ b/include/maxscale/random_jkiss.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_RANDOM_JKISS_H -#define _MAXSCALE_RANDOM_JKISS_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -28,5 +26,3 @@ MXS_BEGIN_DECLS extern unsigned int random_jkiss(void); MXS_END_DECLS - -#endif /* RANDOM_H */ diff --git a/include/maxscale/rdtsc.h b/include/maxscale/rdtsc.h index f928fd85b..c87f96129 100644 --- a/include/maxscale/rdtsc.h +++ b/include/maxscale/rdtsc.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_RDTSC_H -#define _MAXSCALE_RDTSC_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -60,5 +58,3 @@ static __inline__ CYCLES rdtsc(void) } MXS_END_DECLS - -#endif diff --git a/include/maxscale/resultset.h b/include/maxscale/resultset.h index 90e9c8042..52d533bbb 100644 --- a/include/maxscale/resultset.h +++ b/include/maxscale/resultset.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_RESULTSET_H -#define _MAXSCALE_RESULTSET_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -90,5 +88,3 @@ extern void resultset_stream_mysql(RESULTSET *, DCB *); extern void resultset_stream_json(RESULTSET *, DCB *); MXS_END_DECLS - -#endif diff --git a/include/maxscale/router.h b/include/maxscale/router.h index 7ae6e3f2a..90e8083d0 100644 --- a/include/maxscale/router.h +++ b/include/maxscale/router.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_ROUTER_H -#define _MAXSCALE_ROUTER_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -110,5 +108,3 @@ typedef enum router_capability } router_capability_t; MXS_END_DECLS - -#endif diff --git a/include/maxscale/secrets.h b/include/maxscale/secrets.h index 257718c6a..655687ea3 100644 --- a/include/maxscale/secrets.h +++ b/include/maxscale/secrets.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_SECRETS_H -#define _MAXSCALE_SECRETS_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -60,5 +58,3 @@ extern char *decryptPassword(const char *); extern char *encryptPassword(const char*, const char *); MXS_END_DECLS - -#endif diff --git a/include/maxscale/server.h b/include/maxscale/server.h index f06167568..8b85c2b13 100644 --- a/include/maxscale/server.h +++ b/include/maxscale/server.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_SERVER_H -#define _MAXSCALE_SERVER_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -228,5 +226,3 @@ extern unsigned int server_map_status(char *str); extern bool server_set_version_string(SERVER* server, const char* string); MXS_END_DECLS - -#endif diff --git a/include/maxscale/service.h b/include/maxscale/service.h index dfbdb5b8a..815e8cf62 100644 --- a/include/maxscale/service.h +++ b/include/maxscale/service.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_SERVICE_H -#define _MAXSCALE_SERVICE_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -252,5 +250,3 @@ static inline uint64_t service_get_capabilities(const SERVICE *service) } MXS_END_DECLS - -#endif diff --git a/include/maxscale/session.h b/include/maxscale/session.h index 1be219640..855e922ca 100644 --- a/include/maxscale/session.h +++ b/include/maxscale/session.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_SESSION_H -#define _MAXSCALE_SESSION_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -355,5 +353,3 @@ static inline bool session_set_autocommit(SESSION* ses, bool autocommit) } MXS_END_DECLS - -#endif diff --git a/include/maxscale/spinlock.h b/include/maxscale/spinlock.h index 72650f268..f7c844b06 100644 --- a/include/maxscale/spinlock.h +++ b/include/maxscale/spinlock.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_SPINLOCK_H -#define _MAXSCALE_SPINLOCK_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -78,5 +76,3 @@ extern void spinlock_release(const SPINLOCK *lock); extern void spinlock_stats(const SPINLOCK *lock, void (*reporter)(void *, char *, int), void *hdl); MXS_END_DECLS - -#endif diff --git a/include/maxscale/statistics.h b/include/maxscale/statistics.h index ffb70e808..851eb1c46 100644 --- a/include/maxscale/statistics.h +++ b/include/maxscale/statistics.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_STATISTICS_HG -#define _MAXSCALE_STATISTICS_HG /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -73,5 +71,3 @@ ts_stats_set(ts_stats_t stats, int value, int thread_id) } MXS_END_DECLS - -#endif diff --git a/include/maxscale/thread.h b/include/maxscale/thread.h index d775cfec2..166685bc1 100644 --- a/include/maxscale/thread.h +++ b/include/maxscale/thread.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_THREAD_H -#define _MAXSCALE_THREAD_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -39,5 +37,3 @@ extern void thread_wait(THREAD thd); extern void thread_millisleep(int ms); MXS_END_DECLS - -#endif diff --git a/include/maxscale/users.h b/include/maxscale/users.h index 1d95016cd..cdd919de4 100644 --- a/include/maxscale/users.h +++ b/include/maxscale/users.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_USERS_H -#define _MAXSCALE_USERS_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -76,5 +74,3 @@ extern void usersPrint(USERS *); /**< Print data about the user extern void dcb_usersPrint(DCB *, USERS *); /**< Print data about the users loaded */ MXS_END_DECLS - -#endif diff --git a/include/maxscale/utils.h b/include/maxscale/utils.h index 67f699af2..70fc97ab9 100644 --- a/include/maxscale/utils.h +++ b/include/maxscale/utils.h @@ -1,6 +1,4 @@ #pragma once -#ifndef _MAXSCALE_UTILS_H -#define _MAXSCALE_UTILS_H /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -79,5 +77,3 @@ bool mxs_mkdir_all(const char *path, int mask); long get_processor_count(); MXS_END_DECLS - -#endif