diff options
author | Anatol Belski <ab@php.net> | 2017-02-11 18:55:32 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2017-02-11 18:55:32 +0100 |
commit | 02991f75ce429390314ef183c6a77af7aa000c39 (patch) | |
tree | fbad6ce961c5f0f05ddc0e9183a5090b129598b1 /win32/dllmain.c | |
parent | d94c2c796a1b032d53b382681f8413cc3d02d2da (diff) | |
download | php-git-02991f75ce429390314ef183c6a77af7aa000c39.tar.gz |
Revert "move winsock specific stuff into dllmain"
This reverts commit d94c2c796a1b032d53b382681f8413cc3d02d2da.
WSA functions are documented explicitly as unsafe for dllmain
Diffstat (limited to 'win32/dllmain.c')
-rw-r--r-- | win32/dllmain.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/win32/dllmain.c b/win32/dllmain.c index 2e5151dcf9..1c34fb1b26 100644 --- a/win32/dllmain.c +++ b/win32/dllmain.c @@ -40,9 +40,6 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID dummy) switch (reason) { case DLL_PROCESS_ATTACH: - WORD wVersionRequested = MAKEWORD(2, 0); - WSADATA wsaData; - /* * We do not need to check the return value of php_win32_init_gettimeofday() * because the symbol bare minimum symbol we need is always available on our @@ -62,18 +59,12 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID dummy) fprintf(stderr, "ioutil initialization failed"); return ret; } - - ret = ret && (0 == WSAStartup(wVersionRequested, &wsaData)); - if (!ret) { - fprintf(stderr, "winsock initialization failed %d", WSAGetLastError()); - return ret; - } break; +#if 0 /* prepared */ case DLL_PROCESS_DETACH: - WSACleanup(); + /* pass */ break; -#if 0 /* prepared */ case DLL_THREAD_ATTACH: /* pass */ break; |