diff options
author | George Hazan <ghazan@miranda.im> | 2018-10-04 14:07:48 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-10-04 14:07:48 +0300 |
commit | ad4549295d8eb1be238d36c008acbd28f6203eef (patch) | |
tree | 1efb72dba70c55572d94073ffc53f17afc051cc5 /libs/libmdbx | |
parent | 2859081c36402ea7fcbbe4e52799b62e7537ffbf (diff) |
mdbx_dump & mdbx_load utilities adapted for Miranda
Diffstat (limited to 'libs/libmdbx')
-rw-r--r-- | libs/libmdbx/src/src/osal.h | 4 | ||||
-rw-r--r-- | libs/libmdbx/src/src/tools/wingetopt.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libs/libmdbx/src/src/osal.h b/libs/libmdbx/src/src/osal.h index a1feb998d2..065128103e 100644 --- a/libs/libmdbx/src/src/osal.h +++ b/libs/libmdbx/src/src/osal.h @@ -652,7 +652,7 @@ static __inline uint32_t mdbx_atomic_add32(volatile uint32_t *p, uint32_t v) { return __sync_fetch_and_add(p, v); #else #ifdef _MSC_VER - return _InterlockedExchangeAdd(p, v); + return _InterlockedExchangeAdd((volatile long *)p, v); #endif #ifdef __APPLE__ return OSAtomicAdd32(v, (volatile int32_t *)p); @@ -692,7 +692,7 @@ static __inline bool mdbx_atomic_compare_and_swap32(volatile uint32_t *p, return __sync_bool_compare_and_swap(p, c, v); #else #ifdef _MSC_VER - return c == _InterlockedCompareExchange(p, v, c); + return c == _InterlockedCompareExchange((volatile long*)p, v, c); #endif #ifdef __APPLE__ return c == OSAtomicCompareAndSwap32Barrier(c, v, (volatile int32_t *)p); diff --git a/libs/libmdbx/src/src/tools/wingetopt.c b/libs/libmdbx/src/src/tools/wingetopt.c index 1dd0d069fb..6ed6dc3cc8 100644 --- a/libs/libmdbx/src/src/tools/wingetopt.c +++ b/libs/libmdbx/src/src/tools/wingetopt.c @@ -66,7 +66,7 @@ int getopt(int argc, char *const argv[], const char *opts) { } } optopt = c = argv[optind][sp]; - if (c == ':' || (cp = strchr(opts, c)) == NULL) { + if (c == ':' || (cp = (char *)strchr(opts, c)) == NULL) { ERR(": illegal option -- ", c); if (argv[optind][++sp] == '\0') { optind++; |