repositories
/
deb_libcec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sharp: check whether the 'auto power on' option is disabled and tell the user how...
[deb_libcec.git]
/
src
/
lib
/
platform
/
windows
/
os-socket.h
diff --git
a/src/lib/platform/windows/os-socket.h
b/src/lib/platform/windows/os-socket.h
index 86750c50b9bc4e51d5abe56d8ee8a09f253a4341..1ce8912475a7645bbfe7cf01aa5e853565f2bdbb 100644
(file)
--- a/
src/lib/platform/windows/os-socket.h
+++ b/
src/lib/platform/windows/os-socket.h
@@
-2,7
+2,7
@@
/*
* This file is part of the libCEC(R) library.
*
/*
* This file is part of the libCEC(R) library.
*
- * libCEC(R) is Copyright (C) 2011-201
2
Pulse-Eight Limited. All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-201
3
Pulse-Eight Limited. All rights reserved.
* libCEC(R) is an original work, containing original code.
*
* libCEC(R) is a trademark of Pulse-Eight Limited.
* libCEC(R) is an original work, containing original code.
*
* libCEC(R) is a trademark of Pulse-Eight Limited.
@@
-31,8
+31,8
@@
* http://www.pulse-eight.net/
*/
* http://www.pulse-eight.net/
*/
-#include "
..
/os.h"
-#include "
..
/util/timeutils.h"
+#include "
lib/platform
/os.h"
+#include "
lib/platform
/util/timeutils.h"
#include <ws2spi.h>
#include <ws2ipdef.h>
#include <ws2spi.h>
#include <ws2ipdef.h>
@@
-95,8
+95,6
@@
namespace PLATFORM
inline ssize_t SerialSocketRead(serial_socket_t socket, int *iError, void* data, size_t len, uint64_t iTimeoutMs /*= 0*/)
{
inline ssize_t SerialSocketRead(serial_socket_t socket, int *iError, void* data, size_t len, uint64_t iTimeoutMs /*= 0*/)
{
- *iError = 0;
-
if (len != (DWORD)len)
{
*iError = EINVAL;
if (len != (DWORD)len)
{
*iError = EINVAL;
@@
-183,7
+181,9
@@
namespace PLATFORM
tv.tv_usec = 1000 * (long)(iTimeoutMs % 1000);
FD_ZERO(&fd_read);
tv.tv_usec = 1000 * (long)(iTimeoutMs % 1000);
FD_ZERO(&fd_read);
+ #pragma warning(disable:4127) /* disable 'conditional expression is constant' */
FD_SET(socket, &fd_read);
FD_SET(socket, &fd_read);
+ #pragma warning(default:4127)
if (select((int)socket + 1, &fd_read, NULL, NULL, &tv) == 0)
{
if (select((int)socket + 1, &fd_read, NULL, NULL, &tv) == 0)
{
@@
-272,8
+272,10
@@
namespace PLATFORM
FD_ZERO(&fd_write);
FD_ZERO(&fd_except);
FD_ZERO(&fd_write);
FD_ZERO(&fd_except);
+ #pragma warning(disable:4127) /* disable 'conditional expression is constant' */
FD_SET(socket, &fd_write);
FD_SET(socket, &fd_except);
FD_SET(socket, &fd_write);
FD_SET(socket, &fd_except);
+ #pragma warning(default:4127)
int iPollResult = select(sizeof(socket)*8, NULL, &fd_write, &fd_except, &tv);
if (iPollResult == 0)
int iPollResult = select(sizeof(socket)*8, NULL, &fd_write, &fd_except, &tv);
if (iPollResult == 0)