HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SYS_Stdio.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: SYS_Stdio.h (SYS Library, C++)
7  *
8  * COMMENTS: Platform-independent wrappers for functions in <stdio.h>
9  */
10 
11 #ifndef __SYS_STDIO_H_INCLUDED__
12 #define __SYS_STDIO_H_INCLUDED__
13 
14 #include "SYS_API.h"
15 #include "SYS_Types.h"
16 
17 #include <stdio.h>
18 
19 static inline int
20 SYSfseek(FILE *stream, int64 offset, int whence)
21 {
22 #ifdef _WIN32
23  #if _MSC_VER >= 1400
24  return _fseeki64(stream, offset, whence);
25  #else
26  return fseek(stream, offset, whence);
27  #endif
28 #else
29  // fseeko uses 64-bit offsets even on 32-bit platforms when
30  // _FILE_OFFSET_BITS is defined as 64.
31  return fseeko(stream, offset, whence);
32 #endif
33 }
34 
35 static inline int64
36 SYSftell(FILE *stream)
37 {
38 #ifdef _WIN32
39  #if _MSC_VER >= 1400
40  return _ftelli64(stream);
41  #else
42  return ftell(stream);
43  #endif
44 #else
45  // ftello uses 64-bit offsets even on 32-bit platforms when
46  // _FILE_OFFSET_BITS is defined as 64.
47  return ftello(stream);
48 #endif
49 }
50 
51 #endif // __SYS_STDIO_H_INCLUDED__
GLuint GLuint stream
Definition: glcorearb.h:1831
long long int64
Definition: SYS_Types.h:106
GLintptr offset
Definition: glcorearb.h:664