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:
mkaply%us.ibm.com 2002-07-17 05:46:34 +00:00
Родитель d949ef645c
Коммит eb39c86819
3 изменённых файлов: 27 добавлений и 2 удалений

Просмотреть файл

@ -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
@ -1489,7 +1501,7 @@ nsLocalFile::SetFileSize(PRInt64 aFileSize)
OPEN_ACTION_FAIL_IF_NEW | OPEN_ACTION_OPEN_IF_EXISTS,
OPEN_SHARE_DENYREADWRITE | OPEN_ACCESS_READWRITE,
NULL);
if (rc != NO_ERROR)
{
MakeDirty();

Просмотреть файл

@ -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)