зеркало из https://github.com/mozilla/pjs.git
r=dougt, sr=blizzard, a=asa OS/2 only - up the numbre of file handles when starting Moz, and handle specific error with DosCopy
This commit is contained in:
Родитель
d949ef645c
Коммит
eb39c86819
|
@ -916,7 +916,19 @@ nsLocalFile::CopySingleFile(nsIFile *sourceFile, nsIFile *destParent, const nsAC
|
|||
* same drive. "MoveFile()" on Windows will go ahead and move the
|
||||
* file without error, so we need to do the same IBM-AKR
|
||||
*/
|
||||
rc = DosCopy(filePath.get(), (PSZ)NS_CONST_CAST(char*, destPath.get()), DCPY_EXISTING);
|
||||
do {
|
||||
rc = DosCopy(filePath.get(), (PSZ)NS_CONST_CAST(char*, destPath.get()), DCPY_EXISTING);
|
||||
if (rc == ERROR_TOO_MANY_OPEN_FILES) {
|
||||
ULONG CurMaxFH = 0;
|
||||
LONG ReqCount = 20;
|
||||
APIRET rc2;
|
||||
rc2 = DosSetRelMaxFH(&ReqCount, &CurMaxFH);
|
||||
if (rc2 != NO_ERROR) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} while (rc == ERROR_TOO_MANY_OPEN_FILES);
|
||||
|
||||
/* WSOD2 HACK */
|
||||
if (rc == 65) { // NETWORK_ACCESS_DENIED
|
||||
CHAR achProgram[CCHMAXPATH]; // buffer for program name, parameters
|
||||
|
|
|
@ -180,6 +180,7 @@ and to ensure that no more events will be delivered for that owner.
|
|||
#elif defined(XP_OS2)
|
||||
#define INCL_DOSMISC
|
||||
#define INCL_DOSPROCESS
|
||||
#define INCL_DOSERRORS
|
||||
#include <os2.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIGenericFactory.h"
|
||||
|
@ -1768,6 +1769,17 @@ int main(int argc, char* argv[])
|
|||
#if defined(XP_OS2)
|
||||
__argc = argc;
|
||||
__argv = argv;
|
||||
|
||||
ULONG ulMaxFH = 0;
|
||||
LONG ulReqCount = 0;
|
||||
APIRET rc = NO_ERROR;
|
||||
|
||||
DosSetRelMaxFH(&ulReqCount,
|
||||
&ulMaxFH);
|
||||
|
||||
if (ulMaxFH < 256) {
|
||||
DosSetMaxFH(256);
|
||||
}
|
||||
#endif /* XP_OS2 */
|
||||
|
||||
#if defined(XP_BEOS)
|
||||
|
|
Загрузка…
Ссылка в новой задаче