summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-11-25 13:14:44 +0100
committerCarl Hetherington <cth@carlh.net>2020-11-25 13:14:44 +0100
commit9276310e6c9be6148ea8b465b44af55413dc0dc0 (patch)
tree84a4265b1e928b2ba36bcbabbdd3c0fae0df6aef
parente43dababfc7aaf1429d3552e91b24e4e51979111 (diff)
Remove unused method.
-rw-r--r--src/lib/cross.h1
-rw-r--r--src/lib/cross_linux.cc23
-rw-r--r--src/lib/cross_osx.cc6
-rw-r--r--src/lib/cross_windows.cc6
4 files changed, 0 insertions, 36 deletions
diff --git a/src/lib/cross.h b/src/lib/cross.h
index a53e85a2d..8b594177e 100644
--- a/src/lib/cross.h
+++ b/src/lib/cross.h
@@ -63,7 +63,6 @@ extern void start_player ();
extern uint64_t thread_id ();
extern int avio_open_boost (AVIOContext** s, boost::filesystem::path file, int flags);
extern boost::filesystem::path home_directory ();
-extern std::string command_and_read (std::string cmd);
extern bool running_32_on_64 ();
extern void unprivileged ();
extern boost::filesystem::path config_path ();
diff --git a/src/lib/cross_linux.cc b/src/lib/cross_linux.cc
index 2d43d3801..b6241ec1a 100644
--- a/src/lib/cross_linux.cc
+++ b/src/lib/cross_linux.cc
@@ -268,29 +268,6 @@ home_directory ()
return getenv("HOME");
}
-string
-command_and_read (string cmd)
-{
- FILE* pipe = popen (cmd.c_str(), "r");
- if (!pipe) {
- throw runtime_error ("popen failed");
- }
-
- string result;
- char buffer[128];
- try {
- while (fgets(buffer, sizeof(buffer), pipe)) {
- result += buffer;
- }
- } catch (...) {
- pclose (pipe);
- throw;
- }
-
- pclose (pipe);
- return result;
-}
-
/** @return true if this process is a 32-bit one running on a 64-bit-capable OS */
bool
running_32_on_64 ()
diff --git a/src/lib/cross_osx.cc b/src/lib/cross_osx.cc
index dcee2a345..29ef283e6 100644
--- a/src/lib/cross_osx.cc
+++ b/src/lib/cross_osx.cc
@@ -260,12 +260,6 @@ home_directory ()
return getenv("HOME");
}
-string
-command_and_read (string)
-{
- return "";
-}
-
/** @return true if this process is a 32-bit one running on a 64-bit-capable OS */
bool
running_32_on_64 ()
diff --git a/src/lib/cross_windows.cc b/src/lib/cross_windows.cc
index 2072ffd4c..2070459de 100644
--- a/src/lib/cross_windows.cc
+++ b/src/lib/cross_windows.cc
@@ -345,12 +345,6 @@ home_directory ()
return boost::filesystem::path(getenv("HOMEDRIVE")) / boost::filesystem::path(getenv("HOMEPATH"));
}
-string
-command_and_read (string)
-{
- return "";
-}
-
/** @return true if this process is a 32-bit one running on a 64-bit-capable OS */
bool
running_32_on_64 ()