mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 19:26:32 +00:00
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 svn path=/branches/ros-amd64-bringup/; revision=34719
This commit is contained in:
@@ -31,7 +31,7 @@ int _getch(void)
|
||||
* 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 @@ int _getch(void)
|
||||
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,
|
||||
|
||||
@@ -1291,7 +1291,7 @@ long CDECL _get_osfhandle(int fd)
|
||||
HANDLE hand = fdtoh(fd);
|
||||
TRACE(":fd (%d) handle (%p)\n",fd,hand);
|
||||
|
||||
return (long)hand;
|
||||
return (long)(LONG_PTR)hand;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
@@ -1654,7 +1654,7 @@ int CDECL _open_osfhandle(long handle, int oflags)
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user