mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-31 11:18:21 +08:00
mdbx-test: fix snprintf/vsnprintf redefinition for MSVC.
Change-Id: I4be3a4f71782d395035ff4d5b9e3a1af9ee70bb9
This commit is contained in:
parent
092156ee4f
commit
d634336e1f
11
test/base.h
11
test/base.h
@ -1,4 +1,4 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2017 Leonid Yuriev <leo@yuriev.ru>
|
* Copyright 2017 Leonid Yuriev <leo@yuriev.ru>
|
||||||
* and other libmdbx authors: please see AUTHORS file.
|
* and other libmdbx authors: please see AUTHORS file.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
@ -99,7 +99,14 @@
|
|||||||
#pragma warning(disable : 4512) /* assignment operator could \
|
#pragma warning(disable : 4512) /* assignment operator could \
|
||||||
not be generated */
|
not be generated */
|
||||||
#pragma warning(disable : 4610) /* user-defined constructor required */
|
#pragma warning(disable : 4610) /* user-defined constructor required */
|
||||||
#define snprintf _snprintf
|
#ifndef snprintf
|
||||||
|
#define snprintf(buffer, buffer_size, format, ...) \
|
||||||
|
_snprintf_s(buffer, buffer_size, _TRUNCATE, format, __VA_ARGS__)
|
||||||
|
#endif
|
||||||
|
#ifndef vsnprintf
|
||||||
|
#define vsnprintf(buffer, buffer_size, format, args) \
|
||||||
|
_vsnprintf_s(buffer, buffer_size, _TRUNCATE, format, args)
|
||||||
|
#endif
|
||||||
#pragma warning(disable : 4996) /* 'vsnprintf': This function or variable \
|
#pragma warning(disable : 4996) /* 'vsnprintf': This function or variable \
|
||||||
may be unsafe */
|
may be unsafe */
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user