summaryrefslogtreecommitdiff
path: root/src/fs/physfs
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-03-02 00:36:59 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-02 00:36:59 +0300
commit38846eb9dda3b1656a0b36acb2945edf7b314fa0 (patch)
treeaaf3030d5448468680e053337fd8e5070b4130cc /src/fs/physfs
parent32061bfe63fce77accf1657a6631700c859fa541 (diff)
downloadplus-38846eb9dda3b1656a0b36acb2945edf7b314fa0.tar.gz
plus-38846eb9dda3b1656a0b36acb2945edf7b314fa0.tar.bz2
plus-38846eb9dda3b1656a0b36acb2945edf7b314fa0.tar.xz
plus-38846eb9dda3b1656a0b36acb2945edf7b314fa0.zip
Add ifdefs for prevent compilation by any scripts virtfs/physfs files if should be disabled.
Diffstat (limited to 'src/fs/physfs')
-rw-r--r--src/fs/physfs/virtfileprivate.cpp2
-rw-r--r--src/fs/physfs/virtfileprivate.h2
-rw-r--r--src/fs/physfs/virtfs.cpp3
-rw-r--r--src/fs/physfs/virtfsphys.cpp3
-rw-r--r--src/fs/physfs/virtfsphys.h2
-rw-r--r--src/fs/physfs/virtfsphys_unittest.cc2
6 files changed, 14 insertions, 0 deletions
diff --git a/src/fs/physfs/virtfileprivate.cpp b/src/fs/physfs/virtfileprivate.cpp
index 4fcc0968e..6e6cd7dd6 100644
--- a/src/fs/physfs/virtfileprivate.cpp
+++ b/src/fs/physfs/virtfileprivate.cpp
@@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifdef USE_PHYSFS
#include "fs/physfs/virtfileprivate.h"
#include "debug.h"
@@ -32,3 +33,4 @@ VirtFilePrivate::~VirtFilePrivate()
if (mFile != nullptr)
PHYSFS_close(mFile);
}
+#endif // USE_PHYSFS
diff --git a/src/fs/physfs/virtfileprivate.h b/src/fs/physfs/virtfileprivate.h
index 75ad6a337..1067cfda0 100644
--- a/src/fs/physfs/virtfileprivate.h
+++ b/src/fs/physfs/virtfileprivate.h
@@ -20,6 +20,7 @@
#ifndef UTILS_VIRTFILEPRIVATE_H
#define UTILS_VIRTFILEPRIVATE_H
+#ifdef USE_PHYSFS
#include "localconsts.h"
@@ -40,4 +41,5 @@ struct VirtFilePrivate final
PHYSFS_file *mFile;
};
+#endif // USE_PHYSFS
#endif // UTILS_VIRTFILEPRIVATE_H
diff --git a/src/fs/physfs/virtfs.cpp b/src/fs/physfs/virtfs.cpp
index 7a1484081..d19d112a3 100644
--- a/src/fs/physfs/virtfs.cpp
+++ b/src/fs/physfs/virtfs.cpp
@@ -18,6 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifdef USE_PHYSFS
+
#include "fs/virtfs.h"
#include "fs/physfs/virtfsphys.h"
@@ -205,3 +207,4 @@ namespace VirtFs
return file->funcs->eof(file);
}
} // namespace VirtFs
+#endif // USE_PHYSFS
diff --git a/src/fs/physfs/virtfsphys.cpp b/src/fs/physfs/virtfsphys.cpp
index 0d474b161..439ed2890 100644
--- a/src/fs/physfs/virtfsphys.cpp
+++ b/src/fs/physfs/virtfsphys.cpp
@@ -18,6 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifdef USE_PHYSFS
+
#include "fs/physfs/virtfsphys.h"
#include "fs/virtfile.h"
@@ -349,3 +351,4 @@ namespace VirtFsPhys
return PHYSFS_eof(file->mPrivate->mFile);
}
} // namespace VirtFsPhys
+#endif // USE_PHYSFS
diff --git a/src/fs/physfs/virtfsphys.h b/src/fs/physfs/virtfsphys.h
index 743530c6c..42394b56b 100644
--- a/src/fs/physfs/virtfsphys.h
+++ b/src/fs/physfs/virtfsphys.h
@@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifdef USE_PHYSFS
#ifndef UTILS_VIRTFSPHYS_H
#define UTILS_VIRTFSPHYS_H
@@ -78,3 +79,4 @@ namespace VirtFsPhys
} // namespace VirtFsPhys
#endif // UTILS_VIRTFSPHYS_H
+#endif // USE_PHYSFS
diff --git a/src/fs/physfs/virtfsphys_unittest.cc b/src/fs/physfs/virtfsphys_unittest.cc
index 8e81cfe2b..7eeb01143 100644
--- a/src/fs/physfs/virtfsphys_unittest.cc
+++ b/src/fs/physfs/virtfsphys_unittest.cc
@@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifdef USE_PHYSFS
#include "catch.hpp"
#include "fs/paths.h"
@@ -537,3 +538,4 @@ TEST_CASE("VirtFsPhys read")
VirtFsPhys::removeDirFromSearchPath("../data");
delete2(logger);
}
+#endif // USE_PHYSFS