mdbx-windows: avoid use strerror() from CRT.

9 of 17 for https://github.com/leo-yuriev/libmdbx/issues/43

Change-Id: I53b770e911ff8e7d4e084a323a374d09ea516986
This commit is contained in:
Leonid Yuriev
2018-10-14 10:32:37 +03:00
parent 4dea5c2719
commit 80ccb31008
3 changed files with 7 additions and 5 deletions

View File

@@ -203,7 +203,8 @@ int main(int argc, char *argv[]) {
break;
case 'f':
if (freopen(optarg, "w", stdout) == NULL) {
fprintf(stderr, "%s: %s: reopen: %s\n", prog, optarg, strerror(errno));
fprintf(stderr, "%s: %s: reopen: %s\n", prog, optarg,
mdbx_strerror(errno));
exit(EXIT_FAILURE);
}
break;

View File

@@ -340,7 +340,8 @@ int main(int argc, char *argv[]) {
break;
case 'f':
if (freopen(optarg, "r", stdin) == NULL) {
fprintf(stderr, "%s: %s: reopen: %s\n", prog, optarg, strerror(errno));
fprintf(stderr, "%s: %s: reopen: %s\n", prog, optarg,
mdbx_strerror(errno));
exit(EXIT_FAILURE);
}
break;