summaryrefslogtreecommitdiff
path: root/src/fs/virtfs
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/virtfs')
-rw-r--r--src/fs/virtfs/virtdirentry.cpp2
-rw-r--r--src/fs/virtfs/virtdirentry.h2
-rw-r--r--src/fs/virtfs/virtfileprivate.cpp2
-rw-r--r--src/fs/virtfs/virtfileprivate.h2
-rw-r--r--src/fs/virtfs/virtfs.cpp3
-rw-r--r--src/fs/virtfs/virtfsdir.cpp3
-rw-r--r--src/fs/virtfs/virtfsdir.h2
-rw-r--r--src/fs/virtfs/virtfsdir_unittest.cc3
-rw-r--r--src/fs/virtfs/virtfszip.cpp3
-rw-r--r--src/fs/virtfs/virtfszip.h2
-rw-r--r--src/fs/virtfs/virtfszip_unittest.cc3
-rw-r--r--src/fs/virtfs/virtzipentry.cpp3
-rw-r--r--src/fs/virtfs/virtzipentry.h2
-rw-r--r--src/fs/virtfs/zip.cpp3
-rw-r--r--src/fs/virtfs/zip.h2
-rw-r--r--src/fs/virtfs/zip_unittest.cc3
-rw-r--r--src/fs/virtfs/ziplocalheader.cpp3
-rw-r--r--src/fs/virtfs/ziplocalheader.h2
18 files changed, 45 insertions, 0 deletions
diff --git a/src/fs/virtfs/virtdirentry.cpp b/src/fs/virtfs/virtdirentry.cpp
index 73d2dc175..1364bca8a 100644
--- a/src/fs/virtfs/virtdirentry.cpp
+++ b/src/fs/virtfs/virtdirentry.cpp
@@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef USE_PHYSFS
#include "fs/virtfs/virtdirentry.h"
#include "debug.h"
@@ -32,3 +33,4 @@ VirtDirEntry::VirtDirEntry(const std::string &userDir,
VirtDirEntry::~VirtDirEntry()
{
}
+#endif // USE_PHYSFS
diff --git a/src/fs/virtfs/virtdirentry.h b/src/fs/virtfs/virtdirentry.h
index b3d3faff6..88ab89366 100644
--- a/src/fs/virtfs/virtdirentry.h
+++ b/src/fs/virtfs/virtdirentry.h
@@ -20,6 +20,7 @@
#ifndef UTILS_VIRTDIRENTRY_H
#define UTILS_VIRTDIRENTRY_H
+#ifndef USE_PHYSFS
#include <string>
@@ -38,4 +39,5 @@ struct VirtDirEntry final
std::string mRootDir;
};
+#endif // USE_PHYSFS
#endif // UTILS_VIRTDIRENTRY_H
diff --git a/src/fs/virtfs/virtfileprivate.cpp b/src/fs/virtfs/virtfileprivate.cpp
index 06e0418bb..459a17ca9 100644
--- a/src/fs/virtfs/virtfileprivate.cpp
+++ b/src/fs/virtfs/virtfileprivate.cpp
@@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef USE_PHYSFS
#include "fs/virtfs/virtfileprivate.h"
#include <unistd.h>
@@ -57,3 +58,4 @@ VirtFilePrivate::~VirtFilePrivate()
if (mBuf)
delete [] mBuf;
}
+#endif // USE_PHYSFS
diff --git a/src/fs/virtfs/virtfileprivate.h b/src/fs/virtfs/virtfileprivate.h
index 0af9f66e8..d074d13bc 100644
--- a/src/fs/virtfs/virtfileprivate.h
+++ b/src/fs/virtfs/virtfileprivate.h
@@ -20,6 +20,7 @@
#ifndef UTILS_VIRTFILEPRIVATE_H
#define UTILS_VIRTFILEPRIVATE_H
+#ifndef USE_PHYSFS
#include "localconsts.h"
@@ -47,4 +48,5 @@ struct VirtFilePrivate final
int mFd;
};
+#endif // USE_PHYSFS
#endif // UTILS_VIRTFILEPRIVATE_H
diff --git a/src/fs/virtfs/virtfs.cpp b/src/fs/virtfs/virtfs.cpp
index f9fcdcf8b..efa50922a 100644
--- a/src/fs/virtfs/virtfs.cpp
+++ b/src/fs/virtfs/virtfs.cpp
@@ -18,6 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef USE_PHYSFS
+
#include "fs/virtfs.h"
#include "fs/paths.h"
@@ -273,3 +275,4 @@ namespace VirtFs
return file->funcs->eof(file);
}
} // namespace VirtFs
+#endif // USE_PHYSFS
diff --git a/src/fs/virtfs/virtfsdir.cpp b/src/fs/virtfs/virtfsdir.cpp
index 13c2f9ba4..fcb433d64 100644
--- a/src/fs/virtfs/virtfsdir.cpp
+++ b/src/fs/virtfs/virtfsdir.cpp
@@ -18,6 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef USE_PHYSFS
+
#include "fs/virtfs/virtfsdir.h"
#include "fs/files.h"
@@ -649,3 +651,4 @@ namespace VirtFsDir
return pos < 0 || len < 0 || pos >= len;
}
} // namespace VirtFs
+#endif // USE_PHYSFS
diff --git a/src/fs/virtfs/virtfsdir.h b/src/fs/virtfs/virtfsdir.h
index 75df7fb18..6ae3ec9f1 100644
--- a/src/fs/virtfs/virtfsdir.h
+++ b/src/fs/virtfs/virtfsdir.h
@@ -20,6 +20,7 @@
#ifndef UTILS_VIRTFSDIR_H
#define UTILS_VIRTFSDIR_H
+#ifndef USE_PHYSFS
#include "enums/simpletypes/append.h"
#include "enums/simpletypes/skiperror.h"
@@ -86,4 +87,5 @@ namespace VirtFsDir
int eof(VirtFile *restrict const file);
} // namespace VirtFsDir
+#endif // USE_PHYSFS
#endif // UTILS_VIRTFSDIR_H
diff --git a/src/fs/virtfs/virtfsdir_unittest.cc b/src/fs/virtfs/virtfsdir_unittest.cc
index 0a39dbdb4..c70d9cc52 100644
--- a/src/fs/virtfs/virtfsdir_unittest.cc
+++ b/src/fs/virtfs/virtfsdir_unittest.cc
@@ -18,6 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef USE_PHYSFS
+
#include "catch.hpp"
#include "fs/virtfs/virtdirentry.h"
@@ -729,3 +731,4 @@ TEST_CASE("VirtFsDir read")
VirtFsDir::deinit();
delete2(logger);
}
+#endif // USE_PHYSFS
diff --git a/src/fs/virtfs/virtfszip.cpp b/src/fs/virtfs/virtfszip.cpp
index 425883f6d..437a81466 100644
--- a/src/fs/virtfs/virtfszip.cpp
+++ b/src/fs/virtfs/virtfszip.cpp
@@ -18,6 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef USE_PHYSFS
+
#include "fs/virtfs/virtfszip.h"
#include "fs/files.h"
@@ -580,3 +582,4 @@ namespace VirtFsZip
return file->mPrivate->mPos >= file->mPrivate->mSize;
}
} // namespace VirtFsZip
+#endif // USE_PHYSFS
diff --git a/src/fs/virtfs/virtfszip.h b/src/fs/virtfs/virtfszip.h
index 3048e9d0d..a8af1a449 100644
--- a/src/fs/virtfs/virtfszip.h
+++ b/src/fs/virtfs/virtfszip.h
@@ -20,6 +20,7 @@
#ifndef UTILS_VIRTFSZIP_H
#define UTILS_VIRTFSZIP_H
+#ifndef USE_PHYSFS
#include "enums/simpletypes/append.h"
#include "enums/simpletypes/skiperror.h"
@@ -87,4 +88,5 @@ namespace VirtFsZip
int eof(VirtFile *restrict const file);
} // namespace VirtFsZip
+#endif // USE_PHYSFS
#endif // UTILS_VIRTFSZIP_H
diff --git a/src/fs/virtfs/virtfszip_unittest.cc b/src/fs/virtfs/virtfszip_unittest.cc
index 0cde2c80f..59974e32e 100644
--- a/src/fs/virtfs/virtfszip_unittest.cc
+++ b/src/fs/virtfs/virtfszip_unittest.cc
@@ -18,6 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef USE_PHYSFS
+
#include "catch.hpp"
#include "fs/files.h"
@@ -747,3 +749,4 @@ TEST_CASE("VirtFsZip read")
VirtFsZip::deinit();
delete2(logger);
}
+#endif // USE_PHYSFS
diff --git a/src/fs/virtfs/virtzipentry.cpp b/src/fs/virtfs/virtzipentry.cpp
index bed925d2f..fffe4fc5f 100644
--- a/src/fs/virtfs/virtzipentry.cpp
+++ b/src/fs/virtfs/virtzipentry.cpp
@@ -18,6 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef USE_PHYSFS
+
#include "fs/virtfs/virtzipentry.h"
#include "fs/virtfs/ziplocalheader.h"
@@ -36,3 +38,4 @@ VirtZipEntry::~VirtZipEntry()
{
delete_all(mHeaders);
}
+#endif // USE_PHYSFS
diff --git a/src/fs/virtfs/virtzipentry.h b/src/fs/virtfs/virtzipentry.h
index fac36cc2d..6cd29f76e 100644
--- a/src/fs/virtfs/virtzipentry.h
+++ b/src/fs/virtfs/virtzipentry.h
@@ -20,6 +20,7 @@
#ifndef UTILS_VIRTZIPENTRY_H
#define UTILS_VIRTZIPENTRY_H
+#ifndef USE_PHYSFS
#include <string>
#include <vector>
@@ -42,4 +43,5 @@ struct VirtZipEntry final
std::vector<std::string> mDirs;
};
+#endif // USE_PHYSFS
#endif // UTILS_VIRTZIPENTRY_H
diff --git a/src/fs/virtfs/zip.cpp b/src/fs/virtfs/zip.cpp
index f27dd05d0..b1bc45439 100644
--- a/src/fs/virtfs/zip.cpp
+++ b/src/fs/virtfs/zip.cpp
@@ -18,6 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef USE_PHYSFS
+
#include "fs/virtfs/zip.h"
#include "fs/paths.h"
@@ -289,3 +291,4 @@ namespace Zip
return out;
}
} // namespace Zip
+#endif // USE_PHYSFS
diff --git a/src/fs/virtfs/zip.h b/src/fs/virtfs/zip.h
index 412dbcef9..ddb5d7508 100644
--- a/src/fs/virtfs/zip.h
+++ b/src/fs/virtfs/zip.h
@@ -20,6 +20,7 @@
#ifndef UTILS_ZIP_H
#define UTILS_ZIP_H
+#ifndef USE_PHYSFS
#include "localconsts.h"
@@ -39,4 +40,5 @@ namespace Zip
uint8_t *readFile(const ZipLocalHeader *restrict const header);
} // namespace Zip
+#endif // USE_PHYSFS
#endif // UTILS_ZIP_H
diff --git a/src/fs/virtfs/zip_unittest.cc b/src/fs/virtfs/zip_unittest.cc
index 7ac74f66b..763bcc2bd 100644
--- a/src/fs/virtfs/zip_unittest.cc
+++ b/src/fs/virtfs/zip_unittest.cc
@@ -18,6 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef USE_PHYSFS
+
#include "catch.hpp"
#include "logger.h"
@@ -278,3 +280,4 @@ TEST_CASE("Zip readFile")
delete2(logger);
}
+#endif // USE_PHYSFS
diff --git a/src/fs/virtfs/ziplocalheader.cpp b/src/fs/virtfs/ziplocalheader.cpp
index 1fed2afd8..eb8ba3e78 100644
--- a/src/fs/virtfs/ziplocalheader.cpp
+++ b/src/fs/virtfs/ziplocalheader.cpp
@@ -18,6 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef USE_PHYSFS
+
#include "fs/virtfs/ziplocalheader.h"
#include "fs/virtfs/virtzipentry.h"
@@ -37,3 +39,4 @@ ZipLocalHeader::ZipLocalHeader() :
compressed(false)
{
}
+#endif // USE_PHYSFS
diff --git a/src/fs/virtfs/ziplocalheader.h b/src/fs/virtfs/ziplocalheader.h
index f3a1894ce..2ec781858 100644
--- a/src/fs/virtfs/ziplocalheader.h
+++ b/src/fs/virtfs/ziplocalheader.h
@@ -20,6 +20,7 @@
#ifndef UTILS_ZIPLOCALHEADER_H
#define UTILS_ZIPLOCALHEADER_H
+#ifndef USE_PHYSFS
#include "localconsts.h"
@@ -41,4 +42,5 @@ struct ZipLocalHeader final
bool compressed;
};
+#endif // USE_PHYSFS
#endif // UTILS_ZIPLOCALHEADER_H