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:
@ -1,3 +1,6 @@
|
||||
#pragma once
|
||||
#ifndef _HTTPD_H
|
||||
#define _HTTPD_H
|
||||
/*
|
||||
* Copyright (c) 2016 MariaDB Corporation Ab
|
||||
*
|
||||
@ -18,6 +21,7 @@
|
||||
* 08-07-2013 Massimiliano Pinto Added HTTPD protocol header file
|
||||
*/
|
||||
|
||||
#include <maxscale/cdefs.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -35,6 +39,8 @@
|
||||
#include <maxscale/atomic.h>
|
||||
#include <maxscale/gw.h>
|
||||
|
||||
MXS_BEGIN_DECLS
|
||||
|
||||
#define HTTPD_SMALL_BUFFER 1024
|
||||
#define HTTPD_METHOD_MAXLEN 128
|
||||
#define HTTPD_USER_MAXLEN 128
|
||||
@ -59,3 +65,7 @@ typedef struct httpd_session
|
||||
char *query_string; /*< the Query string, starts with ?, after path_info and document name */
|
||||
int headers_received; /*< All the headers has been received, if 1 */
|
||||
} HTTPD_session;
|
||||
|
||||
MXS_END_DECLS
|
||||
|
||||
#endif
|
||||
|
@ -1,3 +1,4 @@
|
||||
#pragma once
|
||||
#ifndef _MAXSCALED_H
|
||||
#define _MAXSCALED_H
|
||||
/*
|
||||
@ -27,6 +28,9 @@
|
||||
#include <maxscale/dcb.h>
|
||||
#include <maxscale/spinlock.h>
|
||||
#include <maxscale/housekeeper.h>
|
||||
|
||||
MXS_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* The maxscaled specific protocol structure to put in the DCB.
|
||||
*/
|
||||
@ -41,4 +45,6 @@ typedef struct maxscaled
|
||||
#define MAXSCALED_STATE_PASSWD 2 /**< Waiting for password */
|
||||
#define MAXSCALED_STATE_DATA 3 /**< User logged in */
|
||||
|
||||
MXS_END_DECLS
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user