navit  0.5.1-trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups
navit_lfs.h
Go to the documentation of this file.
1 #ifndef __NAVIT_LFS_H__
2 
21 #ifdef BUFSIZ
22 #error "Don't #include stdio.h directly if you later #include navit_lfs.h"
23 #endif
24 #ifdef F_OK
25 #error "Don't #include unistd.h directly if you later #include navit_lfs.h"
26 #endif
27 #ifdef O_RDWR
28 #error "Don't #include unistd.h directly if you later #include navit_lfs.h"
29 #endif
30 
31 #define _LARGEFILE_SOURCE
32 #define _FILE_OFFSET_BITS 64
33 #ifdef __MSVCRT__
34 #define __USE_MINGW_FSEEK
35 #endif
36 
37 #include <stdio.h>
38 #include <unistd.h>
39 #include <fcntl.h>
40 
41 #ifdef __MSVCRT__
42 
43 #undef lseek
44 #define lseek(fd,offset,whence) _lseeki64(fd,offset,whence)
45 
46 #undef ftello
47 #define ftello(f) ftello64(f)
48 
49 #undef fseeko
50 #define fseeko(f,offset,whence) fseeko64(f,offset,whence)
51 
52 #undef off_t
53 #define off_t long long
54 
55 #endif
56 
57 #ifdef HAVE_API_ANDROID
58 #undef lseek
59 #define lseek lseek64
60 #endif
61 
62 #ifndef O_LARGEFILE
63 #define O_LARGEFILE 0
64 #endif
65 
66 #ifndef O_BINARY
67 #define O_BINARY 0
68 #endif
69 
70 #define __NAVIT_LFS_H__
71 #endif
72