Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mdbx fix assert #61

Merged
merged 1 commit into from
Apr 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions mdbx/mdbx.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,8 @@ typedef mode_t mdbx_mode_t;
#endif /* MDBX_DEPRECATED */

#ifndef __dll_export
#if defined(_WIN32) || defined(__CYGWIN__)
#if defined(_WIN32) || defined(_WIN64) || defined(__CYGWIN__) || \
defined(__MINGW__) || defined(__MINGW32__) || defined(__MINGW64__)
#if defined(__GNUC__) || __has_attribute(__dllexport__)
#define __dll_export __attribute__((__dllexport__))
#elif defined(_MSC_VER)
Expand All @@ -340,7 +341,8 @@ typedef mode_t mdbx_mode_t;
#endif /* __dll_export */

#ifndef __dll_import
#if defined(_WIN32) || defined(__CYGWIN__)
#if defined(_WIN32) || defined(_WIN64) || defined(__CYGWIN__) || \
defined(__MINGW__) || defined(__MINGW32__) || defined(__MINGW64__)
#if defined(__GNUC__) || __has_attribute(__dllimport__)
#define __dll_import __attribute__((__dllimport__))
#elif defined(_MSC_VER)
Expand Down Expand Up @@ -457,8 +459,13 @@ typedef mode_t mdbx_mode_t;

#ifndef MDBX_PRINTF_ARGS
#if defined(__GNUC__) || __has_attribute(__format__)
#if defined(__MINGW__) || defined(__MINGW32__) || defined(__MINGW64__)
#define MDBX_PRINTF_ARGS(format_index, first_arg) \
__attribute__((__format__(__gnu_printf__, format_index, first_arg)))
#else
#define MDBX_PRINTF_ARGS(format_index, first_arg) \
__attribute__((__format__(__printf__, format_index, first_arg)))
#endif /* MinGW */
#else
#define MDBX_PRINTF_ARGS(format_index, first_arg)
#endif
Expand Down Expand Up @@ -2880,10 +2887,15 @@ LIBMDBX_API int mdbx_env_get_fd(const MDBX_env *env, mdbx_filehandle_t *fd);
* some possible errors are:
* \retval MDBX_EINVAL An invalid parameter was specified,
* or the environment has an active write transaction.
* \retval MDBX_EPERM Specific for Windows: Shrinking was disabled before
* and now it wanna be enabled, but there are reading
* threads that don't use the additional `SRWL` (that
* is required to avoid Windows issues).
* \retval MDBX_EPERM Two specific cases for Windows:
* 1) Shrinking was disabled before via geometry settings
* and now it enabled, but there are reading threads that
* don't use the additional `SRWL` (which is required to
* avoid Windows issues).
* 2) Temporary close memory mapped is required to change
* geometry, but there read transaction(s) is running
* and no corresponding thread(s) could be suspended
* since the \ref MDBX_NOTLS mode is used.
* \retval MDBX_EACCESS The environment opened in read-only.
* \retval MDBX_MAP_FULL Specified size smaller than the space already
* consumed by the environment.
Expand Down