Two spaces indentation for macros
This commit is contained in:
parent
ae25e86825
commit
97923e2dfe
@ -19,22 +19,22 @@
|
|||||||
#define GMIO_GLOBAL_H
|
#define GMIO_GLOBAL_H
|
||||||
|
|
||||||
#if defined(WIN64) || defined(_WIN64) || defined(__WIN64__) \
|
#if defined(WIN64) || defined(_WIN64) || defined(__WIN64__) \
|
||||||
|| defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
|
|| defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
|
||||||
# define GMIO_DECL_EXPORT __declspec(dllexport)
|
# define GMIO_DECL_EXPORT __declspec(dllexport)
|
||||||
# define GMIO_DECL_IMPORT __declspec(dllimport)
|
# define GMIO_DECL_IMPORT __declspec(dllimport)
|
||||||
#else
|
#else
|
||||||
# define GMIO_DECL_EXPORT
|
# define GMIO_DECL_EXPORT
|
||||||
# define GMIO_DECL_IMPORT
|
# define GMIO_DECL_IMPORT
|
||||||
#endif /* WIN */
|
#endif /* WIN */
|
||||||
|
|
||||||
#ifdef GMIO_LIB_DLL
|
#ifdef GMIO_LIB_DLL
|
||||||
# ifdef GMIO_LIB_MAKE_DLL
|
# ifdef GMIO_LIB_MAKE_DLL
|
||||||
# define GMIO_LIB_EXPORT GMIO_DECL_EXPORT
|
# define GMIO_LIB_EXPORT GMIO_DECL_EXPORT
|
||||||
# else
|
# else
|
||||||
# define GMIO_LIB_EXPORT GMIO_DECL_IMPORT
|
# define GMIO_LIB_EXPORT GMIO_DECL_IMPORT
|
||||||
# endif /* GMIO_LIB_MAKE_DLL */
|
# endif /* GMIO_LIB_MAKE_DLL */
|
||||||
#else
|
#else
|
||||||
# define GMIO_LIB_EXPORT
|
# define GMIO_LIB_EXPORT
|
||||||
#endif /* GMIO_LIB_DLL */
|
#endif /* GMIO_LIB_DLL */
|
||||||
|
|
||||||
/* "config.h" is generated by cmake, it should reside in the out-of-source build dir.
|
/* "config.h" is generated by cmake, it should reside in the out-of-source build dir.
|
||||||
@ -43,7 +43,7 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#ifdef GMIO_HAVE_STDINT_H
|
#ifdef GMIO_HAVE_STDINT_H
|
||||||
# include <stdint.h>
|
# include <stdint.h>
|
||||||
#else
|
#else
|
||||||
typedef char int8_t;
|
typedef char int8_t;
|
||||||
typedef unsigned char uint8_t;
|
typedef unsigned char uint8_t;
|
||||||
@ -65,13 +65,13 @@ typedef unsigned long long uint64_t;
|
|||||||
#endif /* GMIO_USE_STDINT_H */
|
#endif /* GMIO_USE_STDINT_H */
|
||||||
|
|
||||||
#ifdef GMIO_HAVE_STDBOOL_H
|
#ifdef GMIO_HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
|
|
||||||
/*! Typedef for boolean type */
|
/*! Typedef for boolean type */
|
||||||
typedef bool gmio_bool_t;
|
typedef bool gmio_bool_t;
|
||||||
|
|
||||||
#define GMIO_FALSE false
|
# define GMIO_FALSE false
|
||||||
#define GMIO_TRUE true
|
# define GMIO_TRUE true
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/*! Typedef for boolean type */
|
/*! Typedef for boolean type */
|
||||||
@ -96,21 +96,21 @@ typedef double gmio_real64_t;
|
|||||||
#define GMIO_UNUSED(x) (void)x;
|
#define GMIO_UNUSED(x) (void)x;
|
||||||
|
|
||||||
#ifndef GMIO_INLINE
|
#ifndef GMIO_INLINE
|
||||||
# if defined(__GNUC__)
|
# if defined(__GNUC__)
|
||||||
# define GMIO_INLINE __inline__ /* Compatible with C90 */
|
# define GMIO_INLINE __inline__ /* Compatible with C90 */
|
||||||
# elif defined(_MSC_VER)
|
# elif defined(_MSC_VER)
|
||||||
# define GMIO_INLINE __inline
|
# define GMIO_INLINE __inline
|
||||||
# else
|
# else
|
||||||
# define GMIO_INLINE
|
# define GMIO_INLINE
|
||||||
# endif
|
# endif
|
||||||
#endif /* !GMIO_INLINE */
|
#endif /* !GMIO_INLINE */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
# define GMIO_C_LINKAGE_BEGIN extern "C" {
|
# define GMIO_C_LINKAGE_BEGIN extern "C" {
|
||||||
# define GMIO_C_LINKAGE_END }
|
# define GMIO_C_LINKAGE_END }
|
||||||
#else
|
#else
|
||||||
# define GMIO_C_LINKAGE_BEGIN
|
# define GMIO_C_LINKAGE_BEGIN
|
||||||
# define GMIO_C_LINKAGE_END
|
# define GMIO_C_LINKAGE_END
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
#endif /* GMIO_GLOBAL_H */
|
#endif /* GMIO_GLOBAL_H */
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include "../global.h"
|
#include "../global.h"
|
||||||
|
|
||||||
#ifdef GMIO_HAVE_MSVC_BUILTIN_BSWAP_FUNC
|
#ifdef GMIO_HAVE_MSVC_BUILTIN_BSWAP_FUNC
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*! Returns \p val with the order of bytes reversed, uses compiler builtin functions if available */
|
/*! Returns \p val with the order of bytes reversed, uses compiler builtin functions if available */
|
||||||
|
Loading…
Reference in New Issue
Block a user