Replace include guards with #pragma once

This commit is contained in:
Johan Wikman 2016-10-26 08:23:15 +03:00
parent f2bee763f8
commit d7ce3ad75b
52 changed files with 1 additions and 211 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#endif

View File

@ -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

View File

@ -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 */

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 */

View File

@ -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 */

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 */

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 */

View File

@ -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

View File

@ -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 */

View File

@ -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 */

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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