19#if defined (__SUNPPRO_CC) && !defined (_STLP_NO_NEW_C_HEADERS)
27# define __int64 long long
31#if !defined(__ISCPP__)
42# include <c_locale_is/filestat.h>
45#if defined(__BEOS__) && defined(__INTEL__)
50#if defined (_STLP_MSVC) || defined (__MINGW32__)
52# define S_IREAD _S_IREAD
53# define S_IWRITE _S_IWRITE
54# define S_IFREG _S_IFREG
57# define S_IRUSR _S_IREAD
58# define S_IWUSR _S_IWRITE
61# define S_IRGRP _S_IREAD
62# define S_IWGRP _S_IWRITE
65# define S_IROTH _S_IREAD
66# define S_IWOTH _S_IWRITE
70# define O_RDONLY _O_RDONLY
71# define O_WRONLY _O_WRONLY
72# define O_RDWR _O_RDWR
73# define O_APPEND _O_APPEND
74# define O_CREAT _O_CREAT
75# define O_TRUNC _O_TRUNC
76# define O_TEXT _O_TEXT
77# define O_BINARY _O_BINARY
81# define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
90# if !defined( O_TEXT )
91# define O_TEXT _O_TEXT
93# define _S_IFREG S_IFREG
94# define S_IREAD S_IRUSR
95# define S_IWRITE S_IWUSR
96# define S_IEXEC S_IXUSR
97# define _S_IWRITE S_IWRITE
98# define _S_IREAD S_IREAD
109#if defined (_STLP_USE_DEFAULT_FILE_OFFSET) || \
110 (!defined(_LARGEFILE_SOURCE) && !defined(_LARGEFILE64_SOURCE))
117# define FOPEN fopen64
118# define FSEEK fseeko64
119# define FSTAT fstat64
121# define FTELL ftello64
157 _M_should_close(
false)
183 switch (openmode & (~ios_base::ate)) {
185 case ios_base::out | ios_base::trunc:
189 case ios_base::out | ios_base::binary:
190 case ios_base::out | ios_base::trunc | ios_base::binary:
194 case ios_base::out | ios_base::app:
198 case ios_base::out | ios_base::app | ios_base::binary:
206 case ios_base::in | ios_base::binary:
210 case ios_base::in | ios_base::out:
214 case ios_base::in | ios_base::out | ios_base::binary:
218 case ios_base::in | ios_base::out | ios_base::trunc:
222 case ios_base::in | ios_base::out | ios_base::trunc | ios_base::binary:
235 file_no =
fileno(_M_file);
245 if (openmode & ios_base::ate) {
313 file_no =
fileno(_M_file);
323 if (openmode & ios_base::ate) {
367 if (written > 0 && written <
n) {
400 return FTELL(_M_file);
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
const _STLP_fd INVALID_STLP_FD
static streamoff __file_size(_STLP_fd fd)
static _STLP_MOVE_TO_PRIV_NAMESPACE bool __is_regular_file(_STLP_fd fd)
GLenum GLuint GLenum GLsizei const GLchar * buf
_Check_return_opt_ _CRTIMP size_t __cdecl fread(_Out_writes_bytes_(_ElementSize *_Count) void *_DstBuf, _In_ size_t _ElementSize, _In_ size_t _Count, _Inout_ FILE *_File)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
_Check_return_opt_ _CRTIMP size_t __cdecl fwrite(_In_reads_bytes_(_Size *_Count) const void *_Str, _In_ size_t _Size, _In_ size_t _Count, _Inout_ FILE *_File)
_CRTIMP void __cdecl setbuf(_Inout_ FILE *_File, _Inout_updates_opt_(BUFSIZ) _Post_readable_size_(0) char *_Buffer)