Changeset 2943
- Timestamp:
- Jan 8, 2007, 10:09:25 AM (19 years ago)
- Location:
- trunk/libc/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libc/src/kNIX/filehandles.c
r2929 r2943 583 583 584 584 /* 585 * If it's a request for a native handle, grant it without further ado. 586 */ 587 /** @todo need a better way of flagging that it's a native pOps. */ 588 if (fh != -1 && pFH->pOps->enmType == enmFH_File) 589 { 590 pFH->fh = fh; 591 return 0; 592 } 593 594 /* 585 595 * Open the NUL device. 586 596 * If we're out of handle space, try increase it. … … 1080 1090 */ 1081 1091 FS_VAR_SAVE_LOAD(); 1082 rc2 = DosClose(pFH->fh);1092 int rc2 = DosClose(pFH->fh); (void)rc2; 1083 1093 FS_RESTORE(); 1084 1094 LIBC_ASSERTM(!rc2, "DosClose(%d) -> rc2=%d (rc=%d)\n", pFH->fh, rc2, rc); … … 1360 1370 FS_VAR_SAVE_LOAD(); 1361 1371 ULONG fulState; 1362 int rc = DosQueryFHState( fh, &fulState);1372 int rc = DosQueryFHState(pFH->fh, &fulState); 1363 1373 if (!rc) 1364 1374 { … … 1368 1378 == (O_NOINHERIT | (FD_CLOEXEC << __LIBC_FH_FDFLAGS_SHIFT)) ), 1369 1379 "Inherit flags are out of sync for file hFile %d (%#x)! fulState=%08lx fFlags=%08x\n", 1370 fh,fh, fulState, pFH->fFlags);1380 pFH->fh, pFH->fh, fulState, pFH->fFlags); 1371 1381 if (fFlags & (FD_CLOEXEC << __LIBC_FH_FDFLAGS_SHIFT)) 1372 1382 fulNewState = fulState | OPEN_FLAGS_NOINHERIT; … … 1376 1386 { 1377 1387 fulNewState &= OPEN_FLAGS_WRITE_THROUGH | OPEN_FLAGS_FAIL_ON_ERROR | OPEN_FLAGS_NO_CACHE | OPEN_FLAGS_NOINHERIT; /* Turn off non-participating bits. */ 1378 rc = DosSetFHState( fh, fulNewState);1388 rc = DosSetFHState(pFH->fh, fulNewState); 1379 1389 } 1380 1390 } -
trunk/libc/src/kNIX/os2/kNIXConfig.h
r2929 r2943 1 /* $Id :$ */1 /* $Id$ */ 2 2 /** @file 3 3 * … … 33 33 * selves during allcation. 34 34 */ 35 #define CFG_KNIX_FH_NATIVE_ALLOCATION 035 #define CFG_KNIX_FH_NATIVE_ALLOCATION 1 36 36 /** Maximum number of file handles. */ 37 37 #define CFG_KNIX_MAX_FHS 10000 -
trunk/libc/src/libc/io/read.c
r2739 r2943 105 105 int la; 106 106 size_t i = 0; 107 char *pbDst = (char *)p bDst;107 char *pbDst = (char *)pvBuf; 108 108 if ( cbToRead > 0 109 109 && (la = __lxchg(&pFH->iLookAhead, -1)) != -1)
Note:
See TracChangeset
for help on using the changeset viewer.