changeset 16324:a37e8d313ade

select, poll, isatty: Avoid warnings on x86_64 mingw64. * lib/select.c (IsConsoleHandle): Use intptr_t to convert handle pointer to an integer. * lib/poll.c (IsConsoleHandle): Likewise. * lib/isatty.c (IsConsoleHandle): Likewise.
author Marc-André Lureau <marcandre.lureau@redhat.com>
date Sat, 28 Jan 2012 12:39:43 +0100
parents 73e22dd042f1
children 67d40006deab
files ChangeLog lib/isatty.c lib/poll.c lib/select.c
diffstat 4 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-01-28  Marc-André Lureau  <marcandre.lureau@redhat.com>  (tiny change)
+
+	select, poll, isatty: Avoid warnings on x86_64 mingw64.
+	* lib/select.c (IsConsoleHandle): Use intptr_t to convert handle
+	pointer to an integer.
+	* lib/poll.c (IsConsoleHandle): Likewise.
+	* lib/isatty.c (IsConsoleHandle): Likewise.
+
 2012-01-28  Jim Meyering  <meyering@redhat.com>
 
 	doc: clarify README-release
--- a/lib/isatty.c
+++ b/lib/isatty.c
@@ -34,7 +34,7 @@
 
 /* Optimized test whether a HANDLE refers to a console.
    See <http://lists.gnu.org/archive/html/bug-gnulib/2009-08/msg00065.html>.  */
-#define IsConsoleHandle(h) (((long) (h) & 3) == 3)
+#define IsConsoleHandle(h) (((intptr_t) (h) & 3) == 3)
 
 #if HAVE_MSVC_INVALID_PARAMETER_HANDLER
 static inline int
--- a/lib/poll.c
+++ b/lib/poll.c
@@ -73,7 +73,7 @@
 
 /* Optimized test whether a HANDLE refers to a console.
    See <http://lists.gnu.org/archive/html/bug-gnulib/2009-08/msg00065.html>.  */
-#define IsConsoleHandle(h) (((long) (h) & 3) == 3)
+#define IsConsoleHandle(h) (((intptr_t) (h) & 3) == 3)
 
 static BOOL
 IsSocketHandle (HANDLE h)
--- a/lib/select.c
+++ b/lib/select.c
@@ -80,7 +80,7 @@
 
 /* Optimized test whether a HANDLE refers to a console.
    See <http://lists.gnu.org/archive/html/bug-gnulib/2009-08/msg00065.html>.  */
-#define IsConsoleHandle(h) (((long) (h) & 3) == 3)
+#define IsConsoleHandle(h) (((intptr_t) (h) & 3) == 3)
 
 static BOOL
 IsSocketHandle (HANDLE h)