mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 01:04:13 +08:00
mdbx-windows: fix mdbx_strdup() usage.
Fix commit e229dbe9dca1ff117a714007cc3811c01ba98b8b (12 of 17 for https://github.com/leo-yuriev/libmdbx/issues/43). Change-Id: Ic63864d736319ccba37518a50590f4e21282a451
This commit is contained in:
parent
ae83982811
commit
582adda628
@ -430,7 +430,7 @@ static __inline size_t mdbx_syspagesize(void) {
|
||||
}
|
||||
|
||||
#ifndef mdbx_strdup
|
||||
char *mdbx_strdup(const char *str);
|
||||
LIBMDBX_API char *mdbx_strdup(const char *str);
|
||||
#endif
|
||||
|
||||
static __inline int mdbx_get_errno(void) {
|
||||
|
@ -164,7 +164,7 @@ static walk_dbi_t *pagemap_lookup_dbi(const char *dbi_name, bool silent) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
dbi->name = strdup(dbi_name);
|
||||
dbi->name = mdbx_strdup(dbi_name);
|
||||
if (verbose > 1 && !silent) {
|
||||
print(" - found '%s' area\n", dbi_name);
|
||||
fflush(NULL);
|
||||
|
@ -111,7 +111,7 @@ static void readhdr(void) {
|
||||
*ptr = '\0';
|
||||
if (subname)
|
||||
mdbx_free(subname);
|
||||
subname = strdup((char *)dbuf.iov_base + STRLENOF("database="));
|
||||
subname = mdbx_strdup((char *)dbuf.iov_base + STRLENOF("database="));
|
||||
} else if (!strncmp(dbuf.iov_base, "type=", STRLENOF("type="))) {
|
||||
if (strncmp((char *)dbuf.iov_base + STRLENOF("type="), "btree",
|
||||
STRLENOF("btree"))) {
|
||||
@ -349,7 +349,7 @@ int main(int argc, char *argv[]) {
|
||||
envflags |= MDBX_NOSUBDIR;
|
||||
break;
|
||||
case 's':
|
||||
subname = strdup(optarg);
|
||||
subname = mdbx_strdup(optarg);
|
||||
break;
|
||||
case 'N':
|
||||
putflags = MDBX_NOOVERWRITE | MDBX_NODUPDATA;
|
||||
|
Loading…
x
Reference in New Issue
Block a user