Add maxscale/cdefs.h
The purpose of this file is to provide a header that *must* be included first (that is, also before any system headers) by all other headers. On the one hand this file provides a place where compilation environment dependent things can be defined, and, on the other hand, a place where things can be redefined globally, should that be necessary for whatever reason. It further provides a place where constants applicable across the line can be defined.
This commit is contained in:
38
include/maxscale/cdefs.h
Normal file
38
include/maxscale/cdefs.h
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
#pragma once
|
||||||
|
#ifndef _MAXSCALE_CDEFS_H
|
||||||
|
#define _MAXSCALE_CDEFS_H
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2016 MariaDB Corporation Ab
|
||||||
|
*
|
||||||
|
* Use of this software is governed by the Business Source License included
|
||||||
|
* in the LICENSE.TXT file and at www.mariadb.com/bsl.
|
||||||
|
*
|
||||||
|
* Change Date: 2019-07-01
|
||||||
|
*
|
||||||
|
* On the date above, in accordance with the Business Source License, use
|
||||||
|
* of this software will be governed by version 2 or later of the General
|
||||||
|
* Public License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file cdefs.h
|
||||||
|
*
|
||||||
|
* This file has several purposes.
|
||||||
|
*
|
||||||
|
* - Its purpose is the same as that of x86_64-linux-gnu/sys/cdefs.h, that is,
|
||||||
|
* it defines things that are dependent upon the compilation environment.
|
||||||
|
* - Since this *must* be included as the very first header by all other MaxScale
|
||||||
|
* headers, it allows you to redfine things globally, should that be necessary,
|
||||||
|
* for instance, when debugging something.
|
||||||
|
* - Global constants applicable across the line can be defined here.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
# define MXS_BEGIN_DECLS extern "C" {
|
||||||
|
# define MXS_END_DECLS }
|
||||||
|
#else
|
||||||
|
# define MXS_BEGIN_DECLS
|
||||||
|
# define MXS_END_DECLS
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
Reference in New Issue
Block a user