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 e3781117c624a584f7afe035bfcb31d5ad72fc30..c49da7fbca0138eac8f1ab05a2d3fa3b77b0f862 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 fa70001eeb71f9d3657191f2da4dd4bd46d9b4a0..42424535831794dcdc3c7fd29a97e79a89dfadd9 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 780a6d67b52f131be89b161724b72b8b364f98f6..47b6a7d4a638adbaf7e8dea86e624e7b369efbee 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 c5522a0567455507930a41c5207f48df2626fa3a..7813f2f4e557007dc8bbc2b7f3091e2b21c3df8e 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)