mdbx: use underscores for GNU-attributes.

Change-Id: Iefd371dd91da1db8ee86554208536b3004535317
This commit is contained in:
Leonid Yuriev 2020-02-08 12:41:41 +03:00 committed by Leo Yuriev
parent 2db93efb14
commit 2356f3281b
2 changed files with 10 additions and 14 deletions

8
mdbx.h
View File

@ -623,8 +623,8 @@ typedef pthread_t mdbx_tid_t;
#ifndef __dll_export
#if defined(_WIN32) || defined(__CYGWIN__)
#if defined(__GNUC__) || __has_attribute(dllexport)
#define __dll_export __attribute__((dllexport))
#if defined(__GNUC__) || __has_attribute(__dllexport__)
#define __dll_export __attribute__((__dllexport__))
#elif defined(_MSC_VER)
#define __dll_export __declspec(dllexport)
#else
@ -639,8 +639,8 @@ typedef pthread_t mdbx_tid_t;
#ifndef __dll_import
#if defined(_WIN32) || defined(__CYGWIN__)
#if defined(__GNUC__) || __has_attribute(dllimport)
#define __dll_import __attribute__((dllimport))
#if defined(__GNUC__) || __has_attribute(__dllimport__)
#define __dll_import __attribute__((__dllimport__))
#elif defined(_MSC_VER)
#define __dll_import __declspec(dllimport)
#else

View File

@ -118,10 +118,8 @@
# define __noinline __attribute__((__noinline__))
# elif defined(_MSC_VER)
# define __noinline __declspec(noinline)
# elif defined(__SUNPRO_C) || defined(__sun) || defined(sun)
# define __noinline inline
# elif !defined(__INTEL_COMPILER)
# define __noinline /* FIXME ? */
# else
# define __noinline
# endif
#endif /* __noinline */
@ -164,7 +162,7 @@
#endif /* __unreachable */
#ifndef __prefetch
# if defined(__GNUC__) || defined(__clang__)
# if defined(__GNUC__) || defined(__clang__) || __has_builtin(__builtin_prefetch)
# define __prefetch(ptr) __builtin_prefetch(ptr)
# else
# define __prefetch(ptr) __noop(ptr)
@ -237,15 +235,13 @@
#ifndef __optimize
# if defined(__OPTIMIZE__)
# if defined(__clang__) && !__has_attribute(__optimize__)
# define __optimize(ops)
# elif defined(__GNUC__) || __has_attribute(__optimize__)
# if (defined(__GNUC__) && !defined(__clang__)) || __has_attribute(__optimize__)
# define __optimize(ops) __attribute__((__optimize__(ops)))
# else
# define __optimize(ops)
# endif
# else
# define __optimize(ops)
# define __optimize(ops)
# endif
#endif /* __optimize */
@ -312,7 +308,7 @@
#ifndef __printf_args
# if defined(__GNUC__) || __has_attribute(__format__)
# define __printf_args(format_index, first_arg) \
__attribute__((__format__(printf, format_index, first_arg)))
__attribute__((__format__(__printf__, format_index, first_arg)))
# else
# define __printf_args(format_index, first_arg)
# endif