HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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  return _fseeki64(stream, offset, whence);
24 #else
25  // fseeko uses 64-bit offsets even on 32-bit platforms when
26  // _FILE_OFFSET_BITS is defined as 64.
27  return fseeko(stream, offset, whence);
28 #endif
29 }
30 
31 static inline int64
32 SYSftell(FILE *stream)
33 {
34 #ifdef _WIN32
35  return _ftelli64(stream);
36 #else
37  // ftello uses 64-bit offsets even on 32-bit platforms when
38  // _FILE_OFFSET_BITS is defined as 64.
39  return ftello(stream);
40 #endif
41 }
42 
43 #endif // __SYS_STDIO_H_INCLUDED__
GLuint GLuint stream
Definition: glcorearb.h:1831
long long int64
Definition: SYS_Types.h:107
GLintptr offset
Definition: glcorearb.h:664