summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2015-11-12 02:02:03 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2015-11-12 02:02:03 -0800
commit0326ab110caad0e364c7dd52443c33049be0a274 (patch)
treecdde62492bb05d70983ff5d6c2d0aa8e2a1ea6f3
parent56f0487d8d14839f877618dee2ebc0ae63b82f7b (diff)
downloadldid-0326ab110caad0e364c7dd52443c33049be0a274.tar.gz
ldid-0326ab110caad0e364c7dd52443c33049be0a274.tar.zst
ldid-0326ab110caad0e364c7dd52443c33049be0a274.zip
Add another hastily and poorly-thought-out #ifdef.
-rw-r--r--ldid.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/ldid.cpp b/ldid.cpp
index 0d240c2..0854474 100644
--- a/ldid.cpp
+++ b/ldid.cpp
@@ -907,6 +907,7 @@ struct CodesignAllocation {
}
};
+#ifndef LDID_NOTOOLS
class File {
private:
int file_;
@@ -1005,6 +1006,7 @@ class Map {
return std::string(static_cast<char *>(data_), size_);
}
};
+#endif
namespace ldid {
@@ -1408,6 +1410,7 @@ class HashProxy :
}
};
+#ifndef LDID_NOTOOLS
static bool Starts(const std::string &lhs, const std::string &rhs) {
return lhs.size() >= rhs.size() && lhs.compare(0, rhs.size(), rhs) == 0;
}
@@ -1462,6 +1465,7 @@ static void Commit(const std::string &path, const std::string &temp) {
_syscall(rename(temp.c_str(), path.c_str()));
}
+#endif
namespace ldid {
@@ -1593,6 +1597,7 @@ void Sign(const void *idata, size_t isize, std::streambuf &output, const std::st
}));
}
+#ifndef LDID_NOTOOLS
static void Unsign(void *idata, size_t isize, std::streambuf &output) {
Allocate(idata, isize, output, fun([](size_t size) -> size_t {
return 0;
@@ -1688,6 +1693,7 @@ bool DiskFolder::Open(const std::string &path, const Functor<void (std::streambu
void DiskFolder::Find(const std::string &path, const Functor<void (const std::string &, const Functor<void (const Functor<void (std::streambuf &, std::streambuf &)> &)> &)>&code) {
Find(path, "", code);
}
+#endif
SubFolder::SubFolder(Folder &parent, const std::string &path) :
parent_(parent),
@@ -1742,6 +1748,7 @@ void UnionFolder::Find(const std::string &path, const Functor<void (const std::s
}));
}
+#ifndef LDID_NOTOOLS
static size_t copy(std::streambuf &source, std::streambuf &target) {
size_t total(0);
for (;;) {
@@ -2038,8 +2045,10 @@ std::string Bundle(const std::string &root, Folder &folder, const std::string &k
}
#endif
+#endif
}
+#ifndef LDID_NOTOOLS
int main(int argc, char *argv[]) {
#ifndef LDID_NOSMIME
OpenSSL_add_all_algorithms();
@@ -2344,3 +2353,4 @@ int main(int argc, char *argv[]) {
return filee;
}
+#endif