Chris@16: /* Chris@16: * Distributed under the Boost Software License, Version 1.0.(See accompanying Chris@16: * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) Chris@16: * Chris@16: * See http://www.boost.org/libs/iostreams for documentation. Chris@16: * Chris@16: * Defines preprocessor symbols expanding to the names of functions in the Chris@16: * C runtime library used to access file descriptors and to the type used Chris@16: * to store file offsets for seeking. Chris@16: * Chris@16: * File: boost/iostreams/detail/config/rtl.hpp Chris@16: * Date: Wed Dec 26 11:58:11 MST 2007 Chris@16: * Chris@16: * Copyright: 2007-2008 CodeRage, LLC Chris@16: * Author: Jonathan Turkanis Chris@16: * Contact: turkanis at coderage dot com Chris@16: */ Chris@16: Chris@16: #ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_RTL_HPP_INCLUDED Chris@16: #define BOOST_IOSTREAMS_DETAIL_CONFIG_RTL_HPP_INCLUDED Chris@16: Chris@16: #include Chris@16: #include Chris@16: Chris@16: // Handle open, close, read, and write Chris@16: #ifdef __BORLANDC__ Chris@16: # define BOOST_IOSTREAMS_RTL(x) BOOST_JOIN(_rtl_, x) Chris@16: #elif defined BOOST_IOSTREAMS_WINDOWS Chris@16: # define BOOST_IOSTREAMS_RTL(x) BOOST_JOIN(_, x) Chris@16: #else Chris@16: # define BOOST_IOSTREAMS_RTL(x) ::x // Distinguish from member function named x Chris@16: #endif Chris@16: #define BOOST_IOSTREAMS_FD_OPEN BOOST_IOSTREAMS_RTL(open) Chris@16: #define BOOST_IOSTREAMS_FD_CLOSE BOOST_IOSTREAMS_RTL(close) Chris@16: #define BOOST_IOSTREAMS_FD_READ BOOST_IOSTREAMS_RTL(read) Chris@16: #define BOOST_IOSTREAMS_FD_WRITE BOOST_IOSTREAMS_RTL(write) Chris@16: Chris@16: // Handle lseek, off_t, ftruncate, and stat Chris@16: #ifdef BOOST_IOSTREAMS_WINDOWS Chris@16: # if defined(BOOST_MSVC) || defined(__MSVCRT__) // MSVC, MinGW Chris@16: # define BOOST_IOSTREAMS_FD_SEEK _lseeki64 Chris@16: # define BOOST_IOSTREAMS_FD_OFFSET __int64 Chris@16: # else // Borland, Metrowerks, ... Chris@16: # define BOOST_IOSTREAMS_FD_SEEK lseek Chris@16: # define BOOST_IOSTREAMS_FD_OFFSET long Chris@16: # endif Chris@16: #else // Non-windows Chris@16: # if defined(_LARGEFILE64_SOURCE) && !defined(__APPLE__) && \ Chris@16: (!defined(_FILE_OFFSET_BITS) || _FILE_OFFSET_BITS != 64) || \ Chris@16: defined(_AIX) && !defined(_LARGE_FILES) || \ Chris@16: defined(BOOST_IOSTREAMS_HAS_LARGE_FILE_EXTENSIONS) Chris@16: /**/ Chris@16: Chris@16: /* Systems with transitional extensions for large file support */ Chris@16: Chris@16: # define BOOST_IOSTREAMS_FD_SEEK lseek64 Chris@16: # define BOOST_IOSTREAMS_FD_TRUNCATE ftruncate64 Chris@16: # define BOOST_IOSTREAMS_FD_MMAP mmap64 Chris@16: # define BOOST_IOSTREAMS_FD_STAT stat64 Chris@16: # define BOOST_IOSTREAMS_FD_FSTAT fstat64 Chris@16: # define BOOST_IOSTREAMS_FD_OFFSET off64_t Chris@16: # else Chris@16: # define BOOST_IOSTREAMS_FD_SEEK lseek Chris@16: # define BOOST_IOSTREAMS_FD_TRUNCATE ftruncate Chris@16: # define BOOST_IOSTREAMS_FD_MMAP mmap Chris@16: # define BOOST_IOSTREAMS_FD_STAT stat Chris@16: # define BOOST_IOSTREAMS_FD_FSTAT fstat Chris@16: # define BOOST_IOSTREAMS_FD_OFFSET off_t Chris@16: # endif Chris@16: #endif Chris@16: Chris@16: #endif // #ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_RTL_HPP_INCLUDED