improving MS Windows builds (msvc)

This commit is contained in:
Karel Miko
2017-03-14 23:09:14 +01:00
parent 783cbc7917
commit 7bb7bdde1d
12 changed files with 325 additions and 1709 deletions
+1 -1
View File
@@ -188,7 +188,7 @@ int crypt_list_all_constants(char *names_list, unsigned int *names_list_size) {
/* calculate amount of memory required for the list */
for (i=0; i<count; i++) {
total_len += strlen(_crypt_constants[i].name) + 1;
total_len += (unsigned int)strlen(_crypt_constants[i].name) + 1;
/* the above +1 is for the commas */
number_len = snprintf(number, sizeof(number), "%d", _crypt_constants[i].value);
if ((number_len < 0) ||
+2 -2
View File
@@ -275,13 +275,13 @@ int crypt_list_all_sizes(char *names_list, unsigned int *names_list_size) {
/* calculate amount of memory required for the list */
for (i=0; i<count; i++) {
total_len += strlen(_crypt_sizes[i].name) + 1;
total_len += (unsigned int)strlen(_crypt_sizes[i].name) + 1;
/* the above +1 is for the commas */
number_len = snprintf(number, sizeof(number), "%u", _crypt_sizes[i].size);
if ((number_len < 0) ||
((unsigned int)number_len >= sizeof(number)))
return -1;
total_len += strlen(number) + 1;
total_len += (unsigned int)strlen(number) + 1;
/* this last +1 is for newlines (and ending NULL) */
}