Ticket #8305: os_file_functions.hpp.patch
File os_file_functions.hpp.patch, 1.5 KB (added by , 10 years ago) |
---|
-
detail/os_file_functions.hpp
25 25 # include <boost/interprocess/detail/win32_api.hpp> 26 26 #else 27 27 # ifdef BOOST_HAS_UNISTD_H 28 # include <features.h> // _LARGEFILE64_SOURCE 28 29 # include <fcntl.h> 29 30 # include <unistd.h> 30 31 # include <sys/types.h> … … 367 368 bool is_xsi; 368 369 } mapping_handle_t; 369 370 371 372 // You need to define -D_FILE_OFFSET_BITS=64 373 // for accessing large files on x32. 374 #if defined(_LARGEFILE64_SOURCE) && defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS==64 375 typedef enum { read_only = O_RDONLY | O_LARGEFILE 376 , read_write = O_RDWR | O_LARGEFILE 377 , copy_on_write 378 , read_private 379 , invalid_mode = 0xffff 380 } mode_t; 381 #else 370 382 typedef enum { read_only = O_RDONLY 371 383 , read_write = O_RDWR 372 384 , copy_on_write 373 385 , read_private 374 386 , invalid_mode = 0xffff 375 387 } mode_t; 388 #endif 376 389 377 390 typedef enum { file_begin = SEEK_SET 378 391 , file_end = SEEK_END … … 444 457 return ret; 445 458 } 446 459 460 // You need to define -D_FILE_OFFSET_BITS=64 461 // for accessing large files on x32 462 // (requires _LARGEFILE64_SOURCE defined by system libraries). 447 463 inline file_handle_t open_existing_file 448 464 (const char *name, mode_t mode, bool temporary = false) 449 465 {