Fix some cygwin portability issues

Cygwin's headers seem to be rather out of date with respect to linux
with regards to signed types, especially ctype.
This commit is contained in:
Bill Currie 2022-09-19 16:31:08 +01:00
parent fb5477e0ab
commit 08328f4076
3 changed files with 3 additions and 3 deletions

View file

@ -1629,7 +1629,7 @@ PR_PrintStatement (progs_t *pr, dstatement_t *s, int contents)
goto err;
}
if (mode == 'M' || mode == 'm') {
if (!isxdigit (fmt[3])) {
if (!isxdigit ((byte) fmt[3])) {
goto err;
}
shift = fmt[3];

View file

@ -537,7 +537,7 @@ UDP_Read (int socket, byte *buf, int len, netadr_t *from)
}
SockadrToNetadr (&addr, from);
Sys_MaskPrintf (SYS_net, "got %d bytes from %s on iface %d (%s)\n", ret,
UDP_AddrToString (from), info ? info->ipi_ifindex - 1 : -1,
UDP_AddrToString (from), info ? (int) info->ipi_ifindex - 1 : -1,
last_iface ? inet_ntoa (info->ipi_addr) : "?");
#else
socklen_t addrlen = sizeof (AF_address_t);

View file

@ -494,7 +494,7 @@ dagnode_set_edges (dag_t *dag, dagnode_t *n, statement_t *s)
set_remove (gn->edges, n->number);
}
}
if (num_params && isdigit (*num_params)) {
if (num_params && isdigit ((byte) *num_params)) {
for (i = first_param; i < *num_params - '0'; i++) {
flowvar_t *var = flowvars[i + 1];
def_t *param_def = var->op->def;