Changeset 826 for trunk/dll/wrappers.c
- Timestamp:
- Sep 1, 2007, 11:50:33 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/dll/wrappers.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/wrappers.c
r794 r826 12 12 18 Aug 06 SHL Correct Runtime_Error line number report 13 13 20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat 14 01 Sep 07 GKY Add xDosSetPathInfo to fix case where FS3 buffer crosses 64k boundry 14 15 15 16 ***********************************************************************/ 16 17 17 18 #define INCL_WIN 19 #define INCL_DOS 20 #define INCL_DOSERRORS 18 21 #include <os2.h> 19 22 … … 25 28 #include "fm3str.h" 26 29 30 APIRET APIENTRY xDosSetPathInfo(PSZ pszPathName, 31 ULONG ulInfoLevel, 32 PVOID pInfoBuf, 33 ULONG cbInfoBuf, 34 ULONG flOptions) 35 { 36 APIRET rc; 37 38 rc = DosSetPathInfo(pszPathName, ulInfoLevel, pInfoBuf, cbInfoBuf, flOptions); 39 if (rc) 40 /* Some kernels to do not handle fs3 buffers that cross 64K boundaries 41 and return ERROR_INVALID_NAME 42 If code works around the problem because if fs3 crosses the boundary 43 fsa2 will not because we don't have enough data on the stack for this 44 to occur 25 Aug 07 SHL 45 */ 46 if (rc == ERROR_INVALID_NAME){ 47 if (ulInfoLevel == FIL_STANDARD){ 48 FILESTATUS3 fs3x; 49 fs3x = *(PFILESTATUS3) pInfoBuf; 50 rc = DosSetPathInfo(pszPathName, ulInfoLevel, &fs3x, sizeof(fs3x), flOptions); 51 } 52 else { 53 EAOP2 eaop2x; 54 eaop2x = *(PEAOP2) pInfoBuf; 55 rc = DosSetPathInfo(pszPathName, ulInfoLevel, &eaop2x, sizeof(eaop2x), flOptions); 56 } 57 } 58 return rc; 59 } 27 60 28 61 PSZ xfgets(PSZ pszBuf, size_t cMaxBytes, FILE * fp, PCSZ pszSrcFile,
Note:
See TracChangeset
for help on using the changeset viewer.
