mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
win32: initialize Windows Sockets in NSObject only
And update to Windows Socket version 2.2. Also clean up the DllMain initialization to handle CRT init errors and call _CRT_INIT also on DLL/thread detach, and remove uneeded .idata section after removing WSAStartup() import. WSAStartup() should not be called from DllMain according to MS documentation. Fixes #186.
This commit is contained in:
parent
b2f2a3a429
commit
f67c99dbcc
5 changed files with 26 additions and 82 deletions
|
@ -987,21 +987,6 @@ int main(int argc, char *argv[], char *env[])
|
|||
sizeof(_NSConstantStringClassReference));
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
WSADATA lpWSAData;
|
||||
|
||||
// Initialize Windows Sockets
|
||||
if (WSAStartup(MAKEWORD(1,1), &lpWSAData))
|
||||
{
|
||||
printf("Could not startup Windows Sockets\n");
|
||||
exit(1);
|
||||
}
|
||||
#endif /* _WIN32 */
|
||||
|
||||
#ifdef __MS_WIN__
|
||||
_MB_init_runtime();
|
||||
#endif /* __MS_WIN__ */
|
||||
|
||||
_gnu_process_args(argc, argv, env);
|
||||
|
||||
/* Call the user defined main function */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue