mirror of
https://github.com/isar/libmdbx.git
synced 2024-10-29 23:19:20 +08:00
mdbx: use underscores for GNU-attributes.
Change-Id: Iefd371dd91da1db8ee86554208536b3004535317
This commit is contained in:
parent
2db93efb14
commit
2356f3281b
8
mdbx.h
8
mdbx.h
@ -623,8 +623,8 @@ typedef pthread_t mdbx_tid_t;
|
|||||||
|
|
||||||
#ifndef __dll_export
|
#ifndef __dll_export
|
||||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||||
#if defined(__GNUC__) || __has_attribute(dllexport)
|
#if defined(__GNUC__) || __has_attribute(__dllexport__)
|
||||||
#define __dll_export __attribute__((dllexport))
|
#define __dll_export __attribute__((__dllexport__))
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER)
|
||||||
#define __dll_export __declspec(dllexport)
|
#define __dll_export __declspec(dllexport)
|
||||||
#else
|
#else
|
||||||
@ -639,8 +639,8 @@ typedef pthread_t mdbx_tid_t;
|
|||||||
|
|
||||||
#ifndef __dll_import
|
#ifndef __dll_import
|
||||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||||
#if defined(__GNUC__) || __has_attribute(dllimport)
|
#if defined(__GNUC__) || __has_attribute(__dllimport__)
|
||||||
#define __dll_import __attribute__((dllimport))
|
#define __dll_import __attribute__((__dllimport__))
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER)
|
||||||
#define __dll_import __declspec(dllimport)
|
#define __dll_import __declspec(dllimport)
|
||||||
#else
|
#else
|
||||||
|
@ -118,10 +118,8 @@
|
|||||||
# define __noinline __attribute__((__noinline__))
|
# define __noinline __attribute__((__noinline__))
|
||||||
# elif defined(_MSC_VER)
|
# elif defined(_MSC_VER)
|
||||||
# define __noinline __declspec(noinline)
|
# define __noinline __declspec(noinline)
|
||||||
# elif defined(__SUNPRO_C) || defined(__sun) || defined(sun)
|
# else
|
||||||
# define __noinline inline
|
# define __noinline
|
||||||
# elif !defined(__INTEL_COMPILER)
|
|
||||||
# define __noinline /* FIXME ? */
|
|
||||||
# endif
|
# endif
|
||||||
#endif /* __noinline */
|
#endif /* __noinline */
|
||||||
|
|
||||||
@ -164,7 +162,7 @@
|
|||||||
#endif /* __unreachable */
|
#endif /* __unreachable */
|
||||||
|
|
||||||
#ifndef __prefetch
|
#ifndef __prefetch
|
||||||
# if defined(__GNUC__) || defined(__clang__)
|
# if defined(__GNUC__) || defined(__clang__) || __has_builtin(__builtin_prefetch)
|
||||||
# define __prefetch(ptr) __builtin_prefetch(ptr)
|
# define __prefetch(ptr) __builtin_prefetch(ptr)
|
||||||
# else
|
# else
|
||||||
# define __prefetch(ptr) __noop(ptr)
|
# define __prefetch(ptr) __noop(ptr)
|
||||||
@ -237,15 +235,13 @@
|
|||||||
|
|
||||||
#ifndef __optimize
|
#ifndef __optimize
|
||||||
# if defined(__OPTIMIZE__)
|
# if defined(__OPTIMIZE__)
|
||||||
# if defined(__clang__) && !__has_attribute(__optimize__)
|
# if (defined(__GNUC__) && !defined(__clang__)) || __has_attribute(__optimize__)
|
||||||
# define __optimize(ops)
|
|
||||||
# elif defined(__GNUC__) || __has_attribute(__optimize__)
|
|
||||||
# define __optimize(ops) __attribute__((__optimize__(ops)))
|
# define __optimize(ops) __attribute__((__optimize__(ops)))
|
||||||
# else
|
# else
|
||||||
# define __optimize(ops)
|
# define __optimize(ops)
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
# define __optimize(ops)
|
# define __optimize(ops)
|
||||||
# endif
|
# endif
|
||||||
#endif /* __optimize */
|
#endif /* __optimize */
|
||||||
|
|
||||||
@ -312,7 +308,7 @@
|
|||||||
#ifndef __printf_args
|
#ifndef __printf_args
|
||||||
# if defined(__GNUC__) || __has_attribute(__format__)
|
# if defined(__GNUC__) || __has_attribute(__format__)
|
||||||
# define __printf_args(format_index, first_arg) \
|
# define __printf_args(format_index, first_arg) \
|
||||||
__attribute__((__format__(printf, format_index, first_arg)))
|
__attribute__((__format__(__printf__, format_index, first_arg)))
|
||||||
# else
|
# else
|
||||||
# define __printf_args(format_index, first_arg)
|
# define __printf_args(format_index, first_arg)
|
||||||
# endif
|
# endif
|
||||||
|
Loading…
Reference in New Issue
Block a user