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:
Timo Kreuzer
2008-07-24 00:58:16 +00:00
parent 267c44c1b1
commit 318a837c35
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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,
+2 -2
View File
@@ -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;
}