Author: tkreuzer
Date: Wed Jul 23 19:58:16 2008
New Revision: 34719
URL:
http://svn.reactos.org/svn/reactos?rev=34719&view=rev
Log:
last fixes for crt. Those are messing with handles and casting between 32 and 64 bit.
I'm not sure if it's correct, probably not...
crt and libcntpr now compile warning free on amd64
Modified:
branches/ros-amd64-bringup/reactos/lib/sdk/crt/conio/getch.c
branches/ros-amd64-bringup/reactos/lib/sdk/crt/stdio/file.c
Modified: branches/ros-amd64-bringup/reactos/lib/sdk/crt/conio/getch.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/s…
==============================================================================
--- branches/ros-amd64-bringup/reactos/lib/sdk/crt/conio/getch.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/lib/sdk/crt/conio/getch.c [iso-8859-1] Wed Jul 23
19:58:16 2008
@@ -31,7 +31,7 @@
* ENABLE_ECHO_INPUT and ENABLE_LINE_INPUT if they're currently
* switched on.
*/
- ConsoleHandle = (HANDLE) _get_osfhandle(stdin->_file);
+ ConsoleHandle = (HANDLE)(ULONG_PTR) _get_osfhandle(stdin->_file);
RestoreMode = GetConsoleMode(ConsoleHandle, &ConsoleMode) &&
(0 != (ConsoleMode &
(ENABLE_ECHO_INPUT | ENABLE_LINE_INPUT)));
@@ -39,7 +39,7 @@
SetConsoleMode(ConsoleHandle,
ConsoleMode & (~ (ENABLE_ECHO_INPUT |
ENABLE_LINE_INPUT)));
}
- ReadConsoleA((HANDLE)_get_osfhandle(stdin->_file),
+ ReadConsoleA((HANDLE)(ULONG_PTR)_get_osfhandle(stdin->_file),
&c,
1,
&NumberOfCharsRead,
Modified: branches/ros-amd64-bringup/reactos/lib/sdk/crt/stdio/file.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/s…
==============================================================================
--- branches/ros-amd64-bringup/reactos/lib/sdk/crt/stdio/file.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/lib/sdk/crt/stdio/file.c [iso-8859-1] Wed Jul 23
19:58:16 2008
@@ -1291,7 +1291,7 @@
HANDLE hand = fdtoh(fd);
TRACE(":fd (%d) handle (%p)\n",fd,hand);
- return (long)hand;
+ return (long)(LONG_PTR)hand;
}
/*********************************************************************
@@ -1654,7 +1654,7 @@
if (!(oflags & (_O_BINARY | _O_TEXT)))
oflags |= _O_BINARY;
- fd = alloc_fd((HANDLE)handle, split_oflags(oflags));
+ fd = alloc_fd((HANDLE)(LONG_PTR)handle, split_oflags(oflags));
TRACE(":handle (%ld) fd (%d) flags 0x%08x\n", handle, fd, oflags);
return fd;
}