From 38e4c3f09deeb8dd59c2cd09072a4c3cd79d7b5a Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 28 Jul 2011 15:34:33 +0000 Subject: [PATCH] Fix for VS2010 build (no whatsnew) --- src/emu/cpu/i86/instr286.c | 2 +- src/emu/machine/ctronics.c | 2 +- src/osd/windows/winsocket.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/emu/cpu/i86/instr286.c b/src/emu/cpu/i86/instr286.c index e188cfd8371..ce841a0fa89 100644 --- a/src/emu/cpu/i86/instr286.c +++ b/src/emu/cpu/i86/instr286.c @@ -452,7 +452,7 @@ static void i80286_interrupt_descriptor(i80286_state *cpustate,UINT16 number, in if (!CODE(r) || !SEGDESC(r)) throw TRAP(GENERAL_PROTECTION_FAULT,(IDXTBL(gatesel)+(hwint&&1))); if (DPL(r)>CPL) throw TRAP(GENERAL_PROTECTION_FAULT,(IDXTBL(gatesel)+(hwint&&1))); if (!PRES(r)) throw TRAP(SEG_NOT_PRESENT,(IDXTBL(gatesel)+(hwint&&1))); - if (GATEOFF(desc) > LIMIT(gatedesc)) throw TRAP(GENERAL_PROTECTION_FAULT,(hwint&&1)); + if (GATEOFF(desc) > LIMIT(gatedesc)) throw TRAP(GENERAL_PROTECTION_FAULT,(int)(hwint&&1)); if (!CONF(r)&&(DPL(r)strobe = TRUE; /* get printer device */ - centronics->printer = device->subdevice("printer"); + centronics->printer = downcast(device->subdevice("printer")); /* resolve callbacks */ centronics->out_ack_func.resolve(intf->out_ack_func, *device); diff --git a/src/osd/windows/winsocket.c b/src/osd/windows/winsocket.c index 661bba4145b..2b132a69b0b 100644 --- a/src/osd/windows/winsocket.c +++ b/src/osd/windows/winsocket.c @@ -105,7 +105,7 @@ file_error win_open_socket(const char *path, UINT32 openflags, osd_file **file, file_error win_read_socket(osd_file *file, void *buffer, UINT64 offset, UINT32 count, UINT32 *actual) { - ssize_t result; + int result; char line[80]; struct timeval timeout; fd_set readfds; @@ -116,7 +116,7 @@ file_error win_read_socket(osd_file *file, void *buffer, UINT64 offset, UINT32 c if (select(file->socket + 1, &readfds, NULL, NULL, &timeout) < 0) { - sprintf(line, "%s : %s : %d ", __func__, __FILE__, __LINE__); + sprintf(line, "win_read_socket : %s : %d ", __FILE__, __LINE__); perror(line); return win_error_to_mame_file_error(errno); } @@ -143,7 +143,7 @@ file_error win_read_socket(osd_file *file, void *buffer, UINT64 offset, UINT32 c file_error win_write_socket(osd_file *file, const void *buffer, UINT64 offset, UINT32 count, UINT32 *actual) { - ssize_t result; + int result; result = send(file->socket, (const char*)buffer, count, 0); if (result < 0) {