select, poll, isatty: Avoid warnings on x86_64 mingw64.
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Sat, 28 Jan 2012 11:39:43 +0000 (12:39 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 28 Jan 2012 11:39:43 +0000 (12:39 +0100)
* lib/select.c (IsConsoleHandle): Use intptr_t to convert handle
pointer to an integer.
* lib/poll.c (IsConsoleHandle): Likewise.
* lib/isatty.c (IsConsoleHandle): Likewise.

ChangeLog
lib/isatty.c
lib/poll.c
lib/select.c

index e378111..c49da7f 100644 (file)
--- 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
index fa70001..4242453 100644 (file)
@@ -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
index 780a6d6..47b6a7d 100644 (file)
@@ -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)
index c5522a0..7813f2f 100644 (file)
@@ -80,7 +80,7 @@ typedef DWORD (WINAPI *PNtQueryInformationFile)
 
 /* 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)