aboutsummaryrefslogtreecommitdiff
path: root/libwinmain/winmain.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-09-19 09:04:42 +0200
committermarha <marha@users.sourceforge.net>2013-09-19 09:04:42 +0200
commitb4243f1f7515f1a0e4b954b867b8571172cd7838 (patch)
tree040c24f5a5156ef4ac6b5be28d645846535ad5fe /libwinmain/winmain.c
parent1e8490bdbb42bb358a2d58526c0e21bc665989e4 (diff)
downloadvcxsrv-b4243f1f7515f1a0e4b954b867b8571172cd7838.tar.gz
vcxsrv-b4243f1f7515f1a0e4b954b867b8571172cd7838.tar.bz2
vcxsrv-b4243f1f7515f1a0e4b954b867b8571172cd7838.zip
Solved 64-bit compile warnings (runtime errors?)
Diffstat (limited to 'libwinmain/winmain.c')
-rw-r--r--libwinmain/winmain.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libwinmain/winmain.c b/libwinmain/winmain.c
index a4ffc1102..a91ad26ab 100644
--- a/libwinmain/winmain.c
+++ b/libwinmain/winmain.c
@@ -22,7 +22,7 @@ static void CreateConsole(void)
if (!ConsoleCreated)
{
int hConHandle;
- long lStdHandle;
+ HANDLE lStdHandle;
CONSOLE_SCREEN_BUFFER_INFO coninfo;
FILE *fp;
@@ -42,25 +42,25 @@ static void CreateConsole(void)
}
// redirect unbuffered STDOUT to the console
- lStdHandle = (long)GetStdHandle(STD_OUTPUT_HANDLE);
+ lStdHandle = GetStdHandle(STD_OUTPUT_HANDLE);
hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
if (hConHandle==-1) // error occured, so return
return;
- fp = _fdopen( hConHandle, "w" );
+ fp = fdopen( hConHandle, "w" );
*stdout = *fp;
setvbuf( stdout, NULL, _IONBF, 0 );
// redirect unbuffered STDIN to the console
- lStdHandle = (long)GetStdHandle(STD_INPUT_HANDLE);
+ lStdHandle = GetStdHandle(STD_INPUT_HANDLE);
hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
- fp = _fdopen( hConHandle, "r" );
+ fp = fdopen( hConHandle, "r" );
*stdin = *fp;
setvbuf( stdin, NULL, _IONBF, 0 );
// redirect unbuffered STDERR to the console
- lStdHandle = (long)GetStdHandle(STD_ERROR_HANDLE);
+ lStdHandle = GetStdHandle(STD_ERROR_HANDLE);
hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
- fp = _fdopen( hConHandle, "w" );
+ fp = fdopen( hConHandle, "w" );
*stderr = *fp;
setvbuf( stderr, NULL, _IONBF, 0 );
}