mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-29 07:58:21 +08:00
mdbx: ban the compilers older than GCC 4.2 or incompatible with it.
Change-Id: I30cfc04b086116652b3c40d76e1def8428b0dcd7
This commit is contained in:
parent
ba943fcff2
commit
4cbbb64e21
1
Makefile
1
Makefile
@ -1,4 +1,5 @@
|
||||
# GNU Makefile for libmdbx (reliable lightning memory-mapped DB library for Linux).
|
||||
# https://github.com/ReOpen/libmdbx
|
||||
|
||||
########################################################################
|
||||
# Configuration. The compiler options must enable threaded compilation.
|
||||
|
19
reopen.h
19
reopen.h
@ -21,7 +21,16 @@
|
||||
/* LY: Please do not ask us for Windows support, just never!
|
||||
* But you can make a fork for Windows, or become maintainer for FreeBSD... */
|
||||
#ifndef __gnu_linux__
|
||||
# error "ReOpenLDAP branch supports only GNU Linux"
|
||||
# error "MDBX supports only GNU Linux"
|
||||
#endif
|
||||
|
||||
#if !defined(__GNUC__) || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2)
|
||||
/* LY: Actualy MDBX was not tested with compilers
|
||||
* older than GCC 4.4 from RHEL6, and clang 3.6 from Ubuntu.
|
||||
* But you could remove this #error and try to continue at your own risk.
|
||||
* In such case please don't rise up an issues related ONLY to old compilers.
|
||||
*/
|
||||
# error "MDBX required at least GCC 4.2 compatible C/C++ compiler."
|
||||
#endif
|
||||
|
||||
#ifndef _REOPEN_H
|
||||
@ -31,14 +40,14 @@
|
||||
# define _GNU_SOURCE
|
||||
#endif
|
||||
|
||||
#if !defined(GCC_VERSION) && defined(__GNUC__)
|
||||
# define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
|
||||
#endif /* GCC_VERSION */
|
||||
|
||||
#ifndef __has_attribute
|
||||
# define __has_attribute(x) (0)
|
||||
#endif
|
||||
|
||||
#if !defined(GCC_VERSION) && defined(__GNUC__)
|
||||
# define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
|
||||
#endif /* GCC_VERSION */
|
||||
|
||||
#if !defined(__thread) && (defined(_MSC_VER) || defined(__DMC__))
|
||||
# define __thread __declspec(thread)
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user