Changeset 2299 for box/trunk/lib/intercept/intercept.cpp
- Timestamp:
- 26/09/2008 21:24:11 (4 years ago)
- File:
-
- 1 edited
-
box/trunk/lib/intercept/intercept.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
box/trunk/lib/intercept/intercept.cpp
r2183 r2299 23 23 24 24 #include <errno.h> 25 #include <stdarg.h> 25 26 26 27 #ifdef HAVE_DLFCN_H … … 233 234 234 235 extern "C" int 235 open(const char *path, int flags, mode_t mode) 236 #ifdef DEFINE_ONLY_OPEN64 237 open64(const char *path, int flags, ...) 238 #else 239 open(const char *path, int flags, ...) 240 #endif // DEFINE_ONLY_OPEN64 236 241 { 237 242 if(intercept_count > 0) … … 246 251 } 247 252 253 mode_t mode = 0; 254 if (flags & O_CREAT) 255 { 256 va_list ap; 257 va_start(ap, flags); 258 mode = va_arg(ap, mode_t); 259 va_end(ap); 260 } 261 248 262 #ifdef PLATFORM_NO_SYSCALL 249 263 int r = TEST_open(path, flags, mode); … … 267 281 } 268 282 283 #ifndef DEFINE_ONLY_OPEN64 269 284 extern "C" int 270 open64(const char *path, int flags, mode_t mode) 271 { 285 // open64(const char *path, int flags, mode_t mode) 286 // open64(const char *path, int flags, ...) 287 open64 (__const char *path, int flags, ...) 288 { 289 mode_t mode = 0; 290 if (flags & O_CREAT) 291 { 292 va_list ap; 293 va_start(ap, flags); 294 mode = va_arg(ap, mode_t); 295 va_end(ap); 296 } 297 272 298 // With _FILE_OFFSET_BITS set to 64 this should really use (flags | 273 299 // O_LARGEFILE) here, but not actually necessary for the tests and not … … 275 301 return open(path, flags, mode); 276 302 } 303 #endif // !DEFINE_ONLY_OPEN64 277 304 278 305 extern "C" int
Note: See TracChangeset
for help on using the changeset viewer.
