1 // VFSDefines.h - compile config and basic setup
2 // For conditions of distribution and use, see copyright notice in VFS.h
3 
4 #ifndef VFS_DEFINES_H
5 #define VFS_DEFINES_H
6 
7 /* --- Config section -- modify as needed --- */
8 
9 // Define this to allow dealing with files > 4 GB, using non-standard functions.
10 // This may or may not work with your platform/compiler, good luck.
11 //#define VFS_LARGEFILE_SUPPORT
12 
13 // Define this to make all operations case insensitive.
14 // Windows systems generally don't care much, but for Linux and Mac this can be used
15 // to get the same behavior as on windows.
16 // Additionally, this achieves full case insensitivity within the library,
17 // if the the same files are accessed multiple times by the program, but with not-uniform case.
18 // (no sane programmer should do this, anyway).
19 // However, on non-windows systems this will decrease performance when checking for files
20 // on disk (see VFSLoader.cpp).
21 #define VFS_IGNORE_CASE
22 
23 
24 /* --- End of config section --- */
25 
26 
27 #define VFS_NAMESPACE_START namespace ttvfs {
28 #define VFS_NAMESPACE_END }
29 
30 
31 #if !defined(_MSC_VER)
32 #  include <stdint.h>
33 #endif
34 
35 VFS_NAMESPACE_START
36 
37 #ifdef VFS_LARGEFILE_SUPPORT
38 #    if defined(_MSC_VER)
39          typedef __int64           vfspos;
40 #    else
41 #        include <stdint.h>
42          typedef int64_t           vfspos;
43 #    endif
44 #else
45     typedef unsigned int           vfspos;
46 #endif
47 
48 #if defined(_MSC_VER) || defined(__MINGW32__) || defined(__MINGW64__)
49 #    define VFS_STRICMP _stricmp
50      static const vfspos npos = vfspos(-1i64);
51 #else
52 #    define VFS_STRICMP strcasecmp
53      static const vfspos npos = vfspos(-1LL);
54 #endif
55 
56 typedef void (*delete_func)(void *);
57 
58 struct _AbiCheck
59 {
60     int structSize;
61     int vfsposSize;
62     int largefile;
63     int nocase;
64 };
65 
66 
67 VFS_NAMESPACE_END
68 
69 #endif
70