- Timestamp:
- Jul 3, 2005, 5:40:02 AM (20 years ago)
- Location:
- trunk/src/emx
- Files:
-
- 7 edited
-
ChangeLog.LIBC (modified) (1 diff, 1 prop)
-
include/emx/io.h (modified) (1 diff, 1 prop)
-
src/lib/libc.def (modified) (1 diff, 1 prop)
-
src/lib/sys/__dup.c (modified) (2 diffs, 1 prop)
-
src/lib/sys/__dup2.c (modified) (2 diffs, 1 prop)
-
src/lib/sys/__fcntl.c (modified) (1 diff, 1 prop)
-
src/lib/sys/filehandles.c (modified) (1 diff, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/ChangeLog.LIBC
-
Property cvs2svn:cvs-rev
changed from
1.86to1.87
r2172 r2173 13 13 o Fixed mixup in fts.c port. 14 14 o Replaced the EMX ftw with the BSD one so we implement the SuS specs. 15 15 16 16 17 2005-07-01: knut st. osmundsen <[email protected]> -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/emx/io.h
-
Property cvs2svn:cvs-rev
changed from
1.17to1.18
r2172 r2173 496 496 PLIBCFH __libc_FH(int fh); 497 497 int __libc_FHEx(int fh, __LIBC_PFH *ppFH); 498 498 499 499 500 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/libc.def
-
Property cvs2svn:cvs-rev
changed from
1.128to1.129
r2172 r2173 1891 1891 "__obstack_newchunk" @1891 1892 1892 "__std_nftw" @1892 1893 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/__dup.c
-
Property cvs2svn:cvs-rev
changed from
1.8to1.9
r2172 r2173 9 9 #include <emx/io.h> 10 10 #include <emx/syscalls.h> 11 11 12 #include "syscalls.h" 12 13 #include "b_fs.h" … … 61 62 pFHNew->Dev = pFH->Dev; 62 63 pFHNew->pFsInfo = __libc_back_fsInfoObjAddRef(pFH->pFsInfo); 64 65 66 67 68 69 70 71 72 73 63 74 } 64 75 else -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/__dup2.c
-
Property cvs2svn:cvs-rev
changed from
1.7to1.8
r2172 r2173 8 8 #include <emx/syscalls.h> 9 9 #include <emx/io.h> 10 10 11 #include "syscalls.h" 11 12 #include "b_fs.h" … … 94 95 pFHNew->Dev = pFH->Dev; 95 96 pFHNew->pFsInfo = __libc_back_fsInfoObjAddRef(pFH->pFsInfo); 97 98 99 100 101 102 103 104 105 106 96 107 } 97 108 else -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/__fcntl.c
-
Property cvs2svn:cvs-rev
changed from
1.12to1.13
r2172 r2173 193 193 { 194 194 LIBCLOG_ENTER("pFH=%p hFile=%d arg=%#x\n", (void *)pFH, hFile, arg); 195 int rc; 196 ULONG fulState; 197 FS_VAR(); 198 199 FS_SAVE_LOAD(); 200 rc = DosQueryFHState(hFile, &fulState); 195 196 /* 197 * Calc new flags. 198 */ 199 unsigned fFlags = pFH->fFlags; 200 fFlags = (fFlags & ~__LIBC_FH_FDFLAGS_MASK) | (arg << __LIBC_FH_FDFLAGS_SHIFT); 201 if (arg & FD_CLOEXEC) 202 fFlags |= O_NOINHERIT; 203 else 204 fFlags &= ~O_NOINHERIT; 205 206 /* 207 * Update the flags. 208 */ 209 int rc = __libc_FHSetFlags(pFH, hFile, fFlags); 201 210 if (!rc) 202 {203 ULONG fulNewState;204 LIBC_ASSERTM( ( (fulState & OPEN_FLAGS_NOINHERIT) != 0 )205 == ( (pFH->fFlags & (O_NOINHERIT | (FD_CLOEXEC << __LIBC_FH_FDFLAGS_SHIFT)))206 == (O_NOINHERIT | (FD_CLOEXEC << __LIBC_FH_FDFLAGS_SHIFT)) ),207 "Inherit flags are out of sync for file hFile %d (%#x)! fulState=%08lx fFlags=%08x\n",208 hFile, hFile, fulState, pFH->fFlags);209 if (arg & FD_CLOEXEC)210 fulNewState = fulState | OPEN_FLAGS_NOINHERIT;211 else212 fulNewState = fulState & ~OPEN_FLAGS_NOINHERIT;213 if (fulNewState != fulState)214 {215 fulNewState &= 0x7f88; /* Mask the flags accepted the API. */216 rc = DosSetFHState(hFile, fulNewState);217 }218 }219 FS_RESTORE();220 221 if (!rc)222 {223 unsigned fFlags = pFH->fFlags;224 fFlags = (fFlags & ~__LIBC_FH_FDFLAGS_MASK) | (arg << __LIBC_FH_FDFLAGS_SHIFT);225 if (arg & FD_CLOEXEC)226 fFlags |= O_NOINHERIT;227 else228 fFlags &= ~O_NOINHERIT;229 __atomic_xchg(&pFH->fFlags, fFlags);230 211 LIBCLOG_RETURN_INT(0); 231 } 232 233 /* error! */ 234 _sys_set_errno(rc); 212 errno = -rc; 235 213 LIBCLOG_RETURN_INT(-1); 236 214 } -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/filehandles.c
-
Property cvs2svn:cvs-rev
changed from
1.20to1.21
r2172 r2173 1143 1143 return rc; 1144 1144 } 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1145 1201 1146 1202 -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.
