Fix Windows build: add default_CSPRNG and improve build.sh error handling

- Add Windows implementation of default_CSPRNG() using CryptGenRandom
- Add fallback stub for platforms without CSPRNG support
- Fix build.sh to properly detect build failures (use PIPESTATUS)
- Show proper error message instead of "Build completed successfully" on failure
This commit is contained in:
Evgeny committed 2026-02-15 04:34:05 +03:00
1 parent 27f2edca40
commit f5faa7c834
16 files changed
+83 -252

No files matched your search

Binary file not shown.
+1 -1
View File
@@ -76,7 +76,7 @@ static int create_temp_directory(void) {
}
return -1; // Failed after 100 attempts
#else
return (test_mkdtemp(temp_dir) == NULL) ? -1 : 0;
return (test_mkdtemp(temp_dir) != 0) ? -1 : 0;
#endif
}
Binary file not shown.
+1 -1
View File
@@ -44,7 +44,7 @@ static const char* config_content =
// Create temp config file
static int create_temp_config(void) {
if (test_mkdtemp(temp_dir) == NULL) {
if (test_mkdtemp(temp_dir) != 0) {
fprintf(stderr, "Failed to create temp directory\n");
return -1;
}
Binary file not shown.
+1 -1
View File
@@ -70,7 +70,7 @@ static const char* client_config_content =
// Create temp config files
static int create_temp_configs(void) {
if (test_mkdtemp(temp_dir) == NULL) {
if (test_mkdtemp(temp_dir) != 0) {
fprintf(stderr, "Failed to create temp directory\n");
return -1;
}
Binary file not shown.
+1 -1
View File
@@ -77,7 +77,7 @@ static const char* client_config_content =
// Create temp config files
static int create_temp_configs(void) {
if (test_mkdtemp(temp_dir) == NULL) {
if (test_mkdtemp(temp_dir) != 0) {
fprintf(stderr, "Failed to create temp directory\n");
return -1;
}
Binary file not shown.
+1 -1
View File
@@ -68,7 +68,7 @@ static const char* client_config_content =
// Create temp config files
static int create_temp_configs(void) {
if (test_mkdtemp(temp_dir) == NULL) {
if (test_mkdtemp(temp_dir) != 0) {
fprintf(stderr, "Failed to create temp directory\n");
return -1;
}
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -71,7 +71,7 @@ static const char* client_config_content =
// Create temp config files
static int create_temp_configs(void) {
if (test_mkdtemp(temp_dir) == NULL) {
if (test_mkdtemp(temp_dir) != 0) {
fprintf(stderr, "Failed to create temp directory\n");
return -1;
}