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,5 +1,6 @@
#ifndef _MYSQL_UTILS_H
#define _MYSQL_UTILS_H
#pragma once
#ifndef _MAXSCALE_MYSQL_UTILS_H
#define _MAXSCALE_MYSQL_UTILS_H
/*
* Copyright (c) 2016 MariaDB Corporation Ab
*
@ -13,11 +14,14 @@
* Public License.
*/
#include <maxscale/cdefs.h>
#include <stdlib.h>
#include <stdint.h>
#include <mysql.h>
#include <maxscale/server.h>
MXS_BEGIN_DECLS
/** Length-encoded integers */
size_t leint_bytes(uint8_t* ptr);
uint64_t leint_value(uint8_t* c);
@ -27,7 +31,8 @@ uint64_t leint_consume(uint8_t ** c);
char* lestr_consume_dup(uint8_t** c);
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