Add compatibility shim for MSVC

This commit is contained in:
Marius Greuel
2021-12-28 11:26:09 +01:00
parent 8c4c9d0090
commit c035c91db5
18 changed files with 1086 additions and 38 deletions

View File

@@ -308,8 +308,8 @@ static int serbb_open(PROGRAMMER *pgm, char *port)
progname, port);
return -1;
}
avrdude_message(MSG_DEBUG, "%s: ser_open(): opened comm port \"%s\", handle 0x%x\n",
progname, port, (int)hComPort);
avrdude_message(MSG_DEBUG, "%s: ser_open(): opened comm port \"%s\", handle 0x%zx\n",
progname, port, (INT_PTR)hComPort);
pgm->fd.pfd = (void *)hComPort;
@@ -326,8 +326,8 @@ static void serbb_close(PROGRAMMER *pgm)
pgm->setpin(pgm, PIN_AVR_RESET, 1);
CloseHandle (hComPort);
}
avrdude_message(MSG_DEBUG, "%s: ser_close(): closed comm port handle 0x%x\n",
progname, (int)hComPort);
avrdude_message(MSG_DEBUG, "%s: ser_close(): closed comm port handle 0x%zx\n",
progname, (INT_PTR)hComPort);
hComPort = INVALID_HANDLE_VALUE;
}