-/* select - Module containing unix select(2) call.\r
- Under Unix, the file descriptors are small integers.\r
- Under Win32, select only exists for sockets, and sockets may\r
- have any value except INVALID_SOCKET.\r
- Under BeOS, we suffer the same dichotomy as Win32; sockets can be anything\r
- >= 0.\r
+/* @file\r
+ select - Module containing unix select(2) call.\r
+ Under Unix, the file descriptors are small integers.\r
+ Under Win32, select only exists for sockets, and sockets may\r
+ have any value except INVALID_SOCKET.\r
+ Under BeOS, we suffer the same dichotomy as Win32; sockets can be anything\r
+ >= 0.\r
+\r
+ Copyright (c) 2015, Daryl McDaniel. All rights reserved.<BR>\r
+ Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
+ This program and the accompanying materials are licensed and made available under\r
+ the terms and conditions of the BSD License that accompanies this distribution.\r
+ The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
*/\r
\r
#include "Python.h"\r
v = PyObject_AsFileDescriptor( o );\r
if (v == -1) goto finally;\r
\r
-#if defined(_MSC_VER)\r
+#if defined(_MSC_VER) && !defined(UEFI_C_SOURCE)\r
max = 0; /* not used for Win32 */\r
#else /* !_MSC_VER */\r
if (!_PyIsSelectable_fd(v)) {\r
* kevent is not standard and its members vary across BSDs.\r
*/\r
#if !defined(__OpenBSD__)\r
-# define IDENT_TYPE T_UINTPTRT\r
-# define IDENT_CAST Py_intptr_t\r
-# define DATA_TYPE T_INTPTRT\r
+# define IDENT_TYPE T_UINTPTRT\r
+# define IDENT_CAST Py_intptr_t\r
+# define DATA_TYPE T_INTPTRT\r
# define DATA_FMT_UNIT INTPTRT_FMT_UNIT\r
-# define IDENT_AsType PyLong_AsUintptr_t\r
+# define IDENT_AsType PyLong_AsUintptr_t\r
#else\r
-# define IDENT_TYPE T_UINT\r
-# define IDENT_CAST int\r
-# define DATA_TYPE T_INT\r
+# define IDENT_TYPE T_UINT\r
+# define IDENT_CAST int\r
+# define DATA_TYPE T_INT\r
# define DATA_FMT_UNIT "i"\r
-# define IDENT_AsType PyLong_AsUnsignedLong\r
+# define IDENT_AsType PyLong_AsUnsignedLong\r
#endif\r
\r
/* Unfortunately, we can't store python objects in udata, because\r
\r
if (PyLong_Check(pfd)\r
#if IDENT_TYPE == T_UINT\r
- && PyLong_AsUnsignedLong(pfd) <= UINT_MAX\r
+ && PyLong_AsUnsignedLong(pfd) <= UINT_MAX\r
#endif\r
) {\r
self->e.ident = IDENT_AsType(pfd);\r