Changeset 13586
- Timestamp:
- Mar 4, 2000, 8:53:34 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified tags/trunk/src/opengl/glide/swlibs/pcilib/fxos2.cpp ¶
r13547 r13586 22 22 #define INCL_DOSDEVIOCTL 23 23 #define INCL_DOSPROCESS 24 #define INCL_DOSERRORS 24 25 #define INCL_DOSMODULEMGR 25 26 #define INCL_DOSDEVICES … … 43 44 #ifdef __WIN32OS2__ 44 45 #define FX_CSTYLE __stdcall 46 #include <misc.h> 45 47 #else 46 48 #define FX_CSTYLE _System … … 753 755 io_init1(); 754 756 757 tryopen1: 755 758 rc = DosOpen("OEMHLP$", &hOemHlp, &ulAction, 0, FILE_NORMAL, OPEN_ACTION_OPEN_IF_EXISTS, OPEN_ACCESS_READWRITE|OPEN_SHARE_DENYREADWRITE, 0L); 759 if(rc == ERROR_TOO_MANY_OPEN_FILES) { 760 ULONG CurMaxFH; 761 LONG ReqCount = 32; 762 763 rc = DosSetRelMaxFH(&ReqCount, &CurMaxFH); 764 if(rc) { 765 dprintf(("DosSetRelMaxFH returned %d", rc)); 766 pciErrorCode = PCI_ERR_NO_IO_PERM; 767 return FXFALSE; 768 } 769 dprintf(("DosOpen failed -> increased nr open files to %d", CurMaxFH)); 770 goto tryopen1; 771 } 772 else 756 773 if(rc) { 757 774 pciErrorCode = PCI_ERR_NO_IO_PERM; 758 775 return FXFALSE; 759 776 } 777 tryopen2: 760 778 rc = DosOpen("TESTCFG$", &hTestCfg, &ulAction, 0, FILE_NORMAL, OPEN_ACTION_OPEN_IF_EXISTS, OPEN_ACCESS_READWRITE|OPEN_SHARE_DENYNONE, 0L ); 779 if(rc == ERROR_TOO_MANY_OPEN_FILES) { 780 ULONG CurMaxFH; 781 LONG ReqCount = 32; 782 783 rc = DosSetRelMaxFH(&ReqCount, &CurMaxFH); 784 if(rc) { 785 dprintf(("DosSetRelMaxFH returned %d", rc)); 786 pciErrorCode = PCI_ERR_NO_IO_PERM; 787 return FXFALSE; 788 } 789 dprintf(("DosOpen failed -> increased nr open files to %d", CurMaxFH)); 790 goto tryopen2; 791 } 792 else 761 793 if(rc) { 762 794 pciErrorCode = PCI_ERR_NO_IO_PERM; 763 795 return FXFALSE; 764 796 } 797 tryopen3: 765 798 rc = DosOpen("SCREEN$", &hScreenDD, &ulAction, 0, FILE_NORMAL, OPEN_ACTION_OPEN_IF_EXISTS, OPEN_ACCESS_READWRITE|OPEN_SHARE_DENYNONE, 0L ); 799 if(rc == ERROR_TOO_MANY_OPEN_FILES) { 800 ULONG CurMaxFH; 801 LONG ReqCount = 32; 802 803 rc = DosSetRelMaxFH(&ReqCount, &CurMaxFH); 804 if(rc) { 805 dprintf(("DosSetRelMaxFH returned %d", rc)); 806 pciErrorCode = PCI_ERR_NO_IO_PERM; 807 return FXFALSE; 808 } 809 dprintf(("DosOpen failed -> increased nr open files to %d", CurMaxFH)); 810 goto tryopen3; 811 } 812 else 766 813 if(rc) { 767 814 pciErrorCode = PCI_ERR_NO_IO_PERM;
Note:
See TracChangeset
for help on using the changeset viewer.