Mercurial > pidgin
comparison src/core.c @ 3906:eb1d58c2d6af
[gaim-migrate @ 4059]
Winsock init and cleanup now done in win32dep.c
committer: Tailor Script <tailor@pidgin.im>
author | Herman Bloggs <hermanator12002@yahoo.com> |
---|---|
date | Tue, 05 Nov 2002 22:59:53 +0000 |
parents | b5dbc9d49939 |
children | b188b93ebf48 |
comparison
equal
deleted
inserted
replaced
3905:3e508dd31b76 | 3906:eb1d58c2d6af |
---|---|
483 channel = g_io_channel_unix_new(UI_fd); | 483 channel = g_io_channel_unix_new(UI_fd); |
484 g_io_add_watch(channel, G_IO_IN, socket_readable, NULL); | 484 g_io_add_watch(channel, G_IO_IN, socket_readable, NULL); |
485 g_io_channel_unref(channel); | 485 g_io_channel_unref(channel); |
486 #endif | 486 #endif |
487 | 487 |
488 #ifdef _WIN32 | |
489 WORD wVersionRequested; | |
490 WSADATA wsaData; | |
491 int err; | |
492 | |
493 wVersionRequested = MAKEWORD( 2, 2 ); | |
494 | |
495 err = WSAStartup( wVersionRequested, &wsaData ); | |
496 if ( err != 0 ) { | |
497 return 1; | |
498 } | |
499 | |
500 /* Confirm that the winsock DLL supports 2.2 */ | |
501 /* Note that if the DLL supports versions greater than | |
502 2.2 in addition to 2.2, it will still return 2.2 in | |
503 wVersion since that is the version we requested. */ | |
504 | |
505 if ( LOBYTE( wsaData.wVersion ) != 2 || | |
506 HIBYTE( wsaData.wVersion ) != 2 ) { | |
507 debug_printf("Could not find a usable WinSock DLL. Oh well.\n"); | |
508 WSACleanup( ); | |
509 return 1; | |
510 } | |
511 #endif /* _WIN32 */ | |
512 | |
513 /* | 488 /* |
514 loop = g_main_new(TRUE); | 489 loop = g_main_new(TRUE); |
515 g_main_run(loop); | 490 g_main_run(loop); |
516 */ | 491 */ |
517 | 492 |
524 char buf[1024]; | 499 char buf[1024]; |
525 close(UI_fd); | 500 close(UI_fd); |
526 sprintf(buf, "%s" G_DIR_SEPARATOR_S "gaim_%s.%d", g_get_tmp_dir(), g_get_user_name(), gaim_session); | 501 sprintf(buf, "%s" G_DIR_SEPARATOR_S "gaim_%s.%d", g_get_tmp_dir(), g_get_user_name(), gaim_session); |
527 unlink(buf); | 502 unlink(buf); |
528 debug_printf("Removed core\n"); | 503 debug_printf("Removed core\n"); |
529 #else | 504 #endif |
530 WSACleanup( ); | 505 } |
531 #endif | |
532 } |