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:
Johan Wikman
2016-10-14 11:51:44 +03:00
parent dc1f599b49
commit 1a978be6b6
86 changed files with 647 additions and 206 deletions

View File

@ -1,3 +1,4 @@
#pragma once
#ifndef _GALERAMON_H
#define _GALERAMON_H
/*
@ -13,6 +14,7 @@
* Public License.
*/
#include <maxscale/cdefs.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -29,6 +31,8 @@
#include <maxscale/modinfo.h>
#include <maxscale/config.h>
MXS_BEGIN_DECLS
/**
* @file galeramon.h - The Galera cluster monitor
*
@ -59,4 +63,6 @@ typedef struct
bool events[MAX_MONITOR_EVENT]; /*< enabled events */
} GALERA_MONITOR;
MXS_END_DECLS
#endif

View File

@ -1,3 +1,4 @@
#pragma once
#ifndef _MMMON_H
#define _MMMON_H
/*
@ -13,6 +14,7 @@
* Public License.
*/
#include <maxscale/cdefs.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -33,6 +35,8 @@
* @file mmmon.h - The Multi-Master monitor
*/
MXS_BEGIN_DECLS
/**
* The handle for an instance of a Multi-Master Monitor module
*/
@ -49,4 +53,6 @@ typedef struct
bool events[MAX_MONITOR_EVENT]; /*< enabled events */
} MM_MONITOR;
MXS_END_DECLS
#endif

View File

@ -1,3 +1,4 @@
#pragma once
#ifndef _MYSQLMON_H
#define _MYSQLMON_H
/*
@ -13,6 +14,7 @@
* Public License.
*/
#include <maxscale/cdefs.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -30,6 +32,8 @@
#include <maxscale/externcmd.h>
#include <maxscale/hashtable.h>
MXS_BEGIN_DECLS
/**
* @file mysqlmon.h - The MySQL monitor
*
@ -80,4 +84,6 @@ typedef struct
bool warn_failover; /**< Log a warning when failover happens */
} MYSQL_MONITOR;
MXS_END_DECLS
#endif