2012-06-01 15:23:19 +00:00
|
|
|
// VFSDefines.h - compile config and basic setup
|
|
|
|
// For conditions of distribution and use, see copyright notice in VFS.h
|
|
|
|
|
|
|
|
#ifndef VFS_DEFINES_H
|
|
|
|
#define VFS_DEFINES_H
|
|
|
|
|
|
|
|
/* --- Config section -- modify as needed --- */
|
|
|
|
|
|
|
|
// Define this to allow dealing with files > 4 GB, using non-standard functions.
|
|
|
|
// This may or may not work with your platform/compiler, good luck.
|
2014-04-07 00:25:58 +00:00
|
|
|
//#define VFS_LARGEFILE_SUPPORT
|
2012-06-01 15:23:19 +00:00
|
|
|
|
|
|
|
// Define this to make all operations case insensitive.
|
|
|
|
// Windows systems generally don't care much, but for Linux and Mac this can be used
|
|
|
|
// to get the same behavior as on windows.
|
|
|
|
// Additionally, this achieves full case insensitivity within the library,
|
|
|
|
// if the the same files are accessed multiple times by the program, but with not-uniform case.
|
|
|
|
// (no sane programmer should do this, anyway).
|
|
|
|
// However, on non-windows systems this will decrease performance when checking for files
|
|
|
|
// on disk (see VFSLoader.cpp).
|
2014-04-15 13:04:33 +00:00
|
|
|
//#define VFS_IGNORE_CASE
|
2012-06-01 15:23:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* --- End of config section --- */
|
|
|
|
|
|
|
|
|
2014-04-06 17:19:33 +00:00
|
|
|
#define VFS_NAMESPACE_START namespace ttvfs {
|
|
|
|
#define VFS_NAMESPACE_END }
|
2012-06-01 15:23:19 +00:00
|
|
|
|
2014-04-07 02:16:15 +00:00
|
|
|
|
|
|
|
#if !defined(_MSC_VER)
|
|
|
|
# include <stdint.h>
|
|
|
|
#endif
|
|
|
|
|
2012-06-01 15:23:19 +00:00
|
|
|
VFS_NAMESPACE_START
|
|
|
|
|
|
|
|
#ifdef VFS_LARGEFILE_SUPPORT
|
|
|
|
# if defined(_MSC_VER)
|
|
|
|
typedef __int64 vfspos;
|
|
|
|
# else
|
2014-04-06 17:19:33 +00:00
|
|
|
# include <stdint.h>
|
|
|
|
typedef int64_t vfspos;
|
2012-06-01 15:23:19 +00:00
|
|
|
# endif
|
|
|
|
#else
|
|
|
|
typedef unsigned int vfspos;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(_MSC_VER) || defined(__MINGW32__) || defined(__MINGW64__)
|
2014-04-06 17:19:33 +00:00
|
|
|
# define VFS_STRICMP _stricmp
|
|
|
|
static const vfspos npos = vfspos(-1i64);
|
2012-06-01 15:23:19 +00:00
|
|
|
#else
|
|
|
|
# define VFS_STRICMP strcasecmp
|
2014-04-06 17:19:33 +00:00
|
|
|
static const vfspos npos = vfspos(-1LL);
|
2012-06-01 15:23:19 +00:00
|
|
|
#endif
|
|
|
|
|
2014-04-06 17:19:33 +00:00
|
|
|
typedef void (*delete_func)(void *);
|
|
|
|
|
|
|
|
struct _AbiCheck
|
|
|
|
{
|
|
|
|
int structSize;
|
|
|
|
int vfsposSize;
|
|
|
|
int largefile;
|
|
|
|
int nocase;
|
|
|
|
};
|
2012-06-01 15:23:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
VFS_NAMESPACE_END
|
|
|
|
|
|
|
|
#endif
|