trabucayre/openFPGALoader#38 minor adjustments for MinGW build - use memset instead of bzero, errno_t may be replaced by int, provide ad-hoc ntohs on windows (alternative is link against winsock)

This commit is contained in:
Ed Bordin
2020-07-25 12:55:41 +10:00
parent 3f4086ec89
commit d24c63ec8a
10 changed files with 24 additions and 17 deletions
+3 -3
View File
@@ -185,9 +185,9 @@ int main(int argc, char **argv)
delete(jtag);
}
// parse double from string in enginerring notation
// parse double from string in engineering notation
// can deal with postfixes k and m, add more when required
static error_t parse_eng(string arg, double *dst) {
static int parse_eng(string arg, double *dst) {
try {
size_t end;
double base = stod(arg, &end);
@@ -209,7 +209,7 @@ static error_t parse_eng(string arg, double *dst) {
return EINVAL;
}
} catch (...) {
cerr << "error : speed: invaild format" << endl;
cerr << "error : speed: invalid format" << endl;
return EINVAL;
}
}