[project @ 2004-06-02 12:35:11 by simonmar] The lock arrays are too small on Windows, leading to buffer overruns and crashes when a program opens too many files.
[project @ 2004-06-02 12:35:11 by simonmar]
The lock arrays are too small on Windows, leading to buffer overruns
and crashes when a program opens too many files.

The problem is that on Windows, we shouldn't use FD_SETSIZE to get the
max number of file descriptors: this is set to 64 in the mingw
includes.  The real maximum is 2048 (according to the crt sources), so
we now hardwire that in.

Also, put in a runtime check that we aren't overruning this array.

MERGE TO STABLE

frantisekfarka/ghc-dsi,sdiehl/ghc,ezyang/ghc,gridaphobe/ghc,frantisekfarka/ghc-dsi,da-x/ghc,christiaanb/ghc,wxwxwwxxx/ghc,green-haskell/ghc,jstolarek/ghc,snoyberg/ghc,forked-upstream-packages-for-ghcjs/ghc,AlexanderPankiv/ghc,oldmanmike/ghc,shlevy/ghc,sdiehl/ghc,mfine/ghc,tibbe/ghc,lukexi/ghc,nushio3/ghc,siddhanathan/ghc,mcschroeder/ghc,jstolarek/ghc,snoyberg/ghc,spacekitteh/smcghc,tjakway/ghcjvm,urbanslug/ghc,tjakway/ghcjvm,christiaanb/ghc,anton-dessiatov/ghc,elieux/ghc,anton-dessiatov/ghc,oldmanmike/ghc,frantisekfarka/ghc-dsi,AlexanderPankiv/ghc,nkaretnikov/ghc,siddhanathan/ghc,sgillespie/ghc,tjakway/ghcjvm,mfine/ghc,vTurbine/ghc,anton-dessiatov/ghc,mcschroeder/ghc,oldmanmike/ghc,nkaretnikov/ghc,oldmanmike/ghc,nathyong/microghc-ghc,ryantm/ghc,spacekitteh/smcghc,GaloisInc/halvm-ghc,sdiehl/ghc,ezyang/ghc,olsner/ghc,fmthoma/ghc,vTurbine/ghc,holzensp/ghc,gridaphobe/ghc,fmthoma/ghc,gcampax/ghc,mfine/ghc,jstolarek/ghc,nushio3/ghc,snoyberg/ghc,mettekou/ghc,fmthoma/ghc,acowley/ghc,holzensp/ghc,ml9951/ghc,elieux/ghc,snoyberg/ghc,GaloisInc/halvm-ghc,acowley/ghc,shlevy/ghc,holzensp/ghc,ghc-android/ghc,urbanslug/ghc,tibbe/ghc,bitemyapp/ghc,forked-upstream-packages-for-ghcjs/ghc,nathyong/microghc-ghc,nushio3/ghc,tibbe/ghc,nkaretnikov/ghc,forked-upstream-packages-for-ghcjs/ghc,oldmanmike/ghc,olsner/ghc,siddhanathan/ghc,nushio3/ghc,gridaphobe/ghc,gcampax/ghc,AlexanderPankiv/ghc,GaloisInc/halvm-ghc,ml9951/ghc,vTurbine/ghc,oldmanmike/ghc,mcschroeder/ghc,lukexi/ghc,mettekou/ghc,AlexanderPankiv/ghc,mfine/ghc,christiaanb/ghc,vikraman/ghc,spacekitteh/smcghc,TomMD/ghc,nathyong/microghc-ghc,lukexi/ghc,acowley/ghc,snoyberg/ghc,shlevy/ghc,mettekou/ghc,ezyang/ghc,sdiehl/ghc,frantisekfarka/ghc-dsi,ml9951/ghc,elieux/ghc,bitemyapp/ghc,elieux/ghc,urbanslug/ghc,sgillespie/ghc,da-x/ghc,anton-dessiatov/ghc,sgillespie/ghc,forked-upstream-packages-for-ghcjs/ghc,sgillespie/ghc,da-x/ghc,wxwxwwxxx/ghc,tibbe/ghc,gridaphobe/ghc,TomMD/ghc,ml9951/ghc,TomMD/ghc,da-x/ghc,vikraman/ghc,bitemyapp/ghc,ml9951/ghc,elieux/ghc,nkaretnikov/ghc,gcampax/ghc,wxwxwwxxx/ghc,olsner/ghc,vTurbine/ghc,snoyberg/ghc,urbanslug/ghc,frantisekfarka/ghc-dsi,urbanslug/ghc,ezyang/ghc,nathyong/microghc-ghc,ghc-android/ghc,sgillespie/ghc,TomMD/ghc,shlevy/ghc,olsner/ghc,bitemyapp/ghc,nkaretnikov/ghc,da-x/ghc,urbanslug/ghc,spacekitteh/smcghc,GaloisInc/halvm-ghc,da-x/ghc,TomMD/ghc,ezyang/ghc,mfine/ghc,tjakway/ghcjvm,ghc-android/ghc,nathyong/microghc-ghc,wxwxwwxxx/ghc,urbanslug/ghc,sdiehl/ghc,ghc-android/ghc,shlevy/ghc,wxwxwwxxx/ghc,mettekou/ghc,christiaanb/ghc,ghc-android/ghc,fmthoma/ghc,green-haskell/ghc,siddhanathan/ghc,spacekitteh/smcghc,mfine/ghc,siddhanathan/ghc,mettekou/ghc,bitemyapp/ghc,nushio3/ghc,fmthoma/ghc,ghc-android/ghc,nathyong/microghc-ghc,forked-upstream-packages-for-ghcjs/ghc,nushio3/ghc,tjakway/ghcjvm,ml9951/ghc,mfine/ghc,anton-dessiatov/ghc,olsner/ghc,oldmanmike/ghc,acowley/ghc,mcschroeder/ghc,snoyberg/ghc,sdiehl/ghc,forked-upstream-packages-for-ghcjs/ghc,fmthoma/ghc,elieux/ghc,siddhanathan/ghc,mcschroeder/ghc,TomMD/ghc,acowley/ghc,jstolarek/ghc,gridaphobe/ghc,sgillespie/ghc,green-haskell/ghc,wxwxwwxxx/ghc,ryantm/ghc,tjakway/ghcjvm,ryantm/ghc,shlevy/ghc,forked-upstream-packages-for-ghcjs/ghc,nathyong/microghc-ghc,nkaretnikov/ghc,gcampax/ghc,green-haskell/ghc,jstolarek/ghc,lukexi/ghc,nkaretnikov/ghc,AlexanderPankiv/ghc,vikraman/ghc,mcschroeder/ghc,gcampax/ghc,ryantm/ghc,siddhanathan/ghc,ml9951/ghc,TomMD/ghc,ryantm/ghc,christiaanb/ghc,mettekou/ghc,vikraman/ghc,da-x/ghc,olsner/ghc,acowley/ghc,gcampax/ghc,fmthoma/ghc,ghc-android/ghc,acowley/ghc,christiaanb/ghc,holzensp/ghc,wxwxwwxxx/ghc,mcschroeder/ghc,sdiehl/ghc,vikraman/ghc,christiaanb/ghc,gridaphobe/ghc,gridaphobe/ghc,anton-dessiatov/ghc,vikraman/ghc,GaloisInc/halvm-ghc,olsner/ghc,nushio3/ghc,holzensp/ghc,vTurbine/ghc,vTurbine/ghc,GaloisInc/halvm-ghc,AlexanderPankiv/ghc,anton-dessiatov/ghc,green-haskell/ghc,vikraman/ghc,shlevy/ghc,elieux/ghc,ezyang/ghc,gcampax/ghc,tibbe/ghc,ml9951/ghc,GaloisInc/halvm-ghc,lukexi/ghc,tjakway/ghcjvm,vTurbine/ghc,sgillespie/ghc,ezyang/ghc,AlexanderPankiv/ghc,mettekou/ghc