1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-10-10 08:23:22 +00:00

Update inlcuded ttvfs

This commit is contained in:
fgenesis 2017-01-12 23:52:59 +01:00
commit ffa26e4105
22 changed files with 327 additions and 153 deletions

View file

@ -28,30 +28,39 @@
#define VFS_NAMESPACE_END }
#if !defined(_MSC_VER)
# include <stdint.h>
// Important that this is included outside of the namespace.
// Note that stdint.h is intentionally NOT included if possible,
// because on gcc it pulls in features.h, which in turn checks for
// _FILE_OFFSET_BITS presence. That means to enable 64bit file I/O,
// _FILE_OFFSET_BITS would have to be defined here.
// For the sake of not polluting the includer, use other means to define
// a 64 bit type.
#if !defined(_MSC_VER) && !defined(__GNUC__)
# include <stdint.h> // Hope it works.
#endif
VFS_NAMESPACE_START
#ifdef VFS_LARGEFILE_SUPPORT
# if defined(_MSC_VER)
typedef __int64 vfspos;
# else
# include <stdint.h>
typedef int64_t vfspos;
# endif
// vfspos type (signed 64bit integer if possible, 32bit otherwise)
#if defined(_MSC_VER)
typedef __int64 vfspos;
#elif defined(__GNUC__)
__extension__ // suppress warnings about long long
typedef long long int vfspos;
#elif defined(VFS_LARGEFILE_SUPPORT)
// fallback using stdint. h, but only if necessary
typedef int64_t vfspos;
#else
typedef unsigned int vfspos;
// If all else fails
typedef long int vfspos; // what fseek() uses, no guarantees whether 64 or 32 bits
#endif
#if defined(_MSC_VER) || defined(__MINGW32__) || defined(__MINGW64__)
# define VFS_STRICMP _stricmp
static const vfspos npos = vfspos(-1i64);
#else
# define VFS_STRICMP strcasecmp
static const vfspos npos = vfspos(-1LL);
#endif
static const vfspos npos = ~vfspos(0);
typedef void (*delete_func)(void *);
@ -63,6 +72,12 @@ struct _AbiCheck
int nocase;
};
class File;
class DirBase;
typedef void (*FileEnumCallback)(File *vf, void *user);
typedef void (*DirEnumCallback)(DirBase *vd, void *user);
VFS_NAMESPACE_END