WSACleanup() evades with *nix.
authorHiroshi Saito <hiroshi@winpg.jp>
Tue, 3 Apr 2007 15:43:14 +0000 (15:43 +0000)
committerHiroshi Saito <hiroshi@winpg.jp>
Tue, 3 Apr 2007 15:43:14 +0000 (15:43 +0000)
environ.c

index d8dbc30578183b76be7a74a43802ab518d3d5461..9077f206f85ff22f442b114d6907a9f2754e196c 100644 (file)
--- a/environ.c
+++ b/environ.c
@@ -528,10 +528,12 @@ cleanup:
        rv->flag = 0;
        INIT_ENV_CS(rv);
    }
+#ifdef WIN32
 #ifndef    _WSASTARTUP_IN_DLLMAIN_
    else
        WSACleanup();
 #endif /* _WSASTARTUP_IN_DLLMAIN_ */
+#endif
 
    return rv;
 }
@@ -566,9 +568,11 @@ EN_Destructor(EnvironmentClass *self)
    DELETE_ENV_CS(self);
    free(self);
 
+#ifdef WIN32
 #ifndef    _WSASTARTUP_IN_DLLMAIN_
    WSACleanup();
 #endif /* _WSASTARTUP_IN_DLLMAIN_ */
+#endif
    mylog("exit EN_Destructor: rv = %d\n", rv);
 #ifdef _MEMORY_DEBUG_
    debug_memory_check();