19#if defined (__SUNPPRO_CC) && !defined (_STLP_NO_NEW_C_HEADERS)
27# define __int64 long long
33#if !defined (_CRAY) && ! defined (__EMX__)
38#if defined (__hpux) && defined (__GNUC__)
39# undef _INCLUDE_POSIX1C_SOURCE
47# include <sys/sysctl.h>
53# define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
57#if defined (_STLP_USE_DEFAULT_FILE_OFFSET) || \
58 (!defined(_LARGEFILE_SOURCE) && !defined (_LARGEFILE64_SOURCE))
90 ret = ios_base::in | ios_base::out;
128 _M_should_close(
false)
133#if defined (__APPLE__)
135 size_t pagesize,
len;
137 mib[1] = HW_PAGESIZE;
138 len =
sizeof(pagesize);
139 sysctl(mib, 2, &pagesize, &
len,
NULL, 0);
141#elif defined (__DJGPP) && defined (_CRAY)
166 switch ( openmode & (~ios_base::ate & ~ios_base::binary) ) {
168 case ios_base::out | ios_base::trunc:
172 case ios_base::out | ios_base::app:
179 case ios_base::in | ios_base::out:
182 case ios_base::in | ios_base::out | ios_base::trunc:
185 case ios_base::in | ios_base::app:
186 case ios_base::in | ios_base::out | ios_base::app:
200 if ((openmode & (ios_base::ate | ios_base::app)) && (
LSEEK(file_no, 0,
SEEK_END) == -1)) {
232 int mode = fcntl(file_no, F_GETFL);
276 if (written > 0 && written <
n) {
319#if !defined (__DJGPP) && !defined (_CRAY)
339#if !defined (__DJGPP) && !defined (_CRAY)
#define _STLP_MARK_PARAMETER_AS_UNUSED(X)
bool _M_write(char *__buf, ptrdiff_t __n)
void _M_unmap(void *__mmap_base, streamoff __len)
ios_base::openmode _M_openmode
void * _M_mmap(streamoff __offset, streamoff __len)
unsigned char _M_regular_file
static size_t _M_page_size
static void _S_initialize()
unsigned char _M_should_close
streamoff _M_seek(streamoff __offset, ios_base::seekdir __dir)
bool _M_open(const char *, ios_base::openmode, long __protection)
ptrdiff_t _M_read(char *__buf, ptrdiff_t __n)
__kernel_ptrdiff_t ptrdiff_t
#define _STLP_MOVE_TO_STD_NAMESPACE
#define _STLP_BEGIN_NAMESPACE
#define _STLP_END_NAMESPACE
#define _STLP_MOVE_TO_PRIV_NAMESPACE
static streamoff __file_size(_STLP_fd fd)
static _STLP_MOVE_TO_PRIV_NAMESPACE bool __is_regular_file(_STLP_fd fd)
const _STLP_fd INVALID_STLP_FD
static streamoff __file_size(_STLP_fd fd)
static _STLP_BEGIN_NAMESPACE ios_base::openmode flag_to_openmode(int mode)
static _STLP_MOVE_TO_PRIV_NAMESPACE bool __is_regular_file(_STLP_fd fd)
GLenum GLuint GLenum GLsizei const GLchar * buf