aboutsummaryrefslogtreecommitdiff
path: root/lib/config_global.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2020-04-19 16:31:45 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2020-04-19 16:31:45 -0400
commit6d04ff98c4bfc21ad3fa779237a16ba760080fac (patch)
treee5cdaf218d7fc563899eb44292225fca7f051363 /lib/config_global.c
parent57c9489b28a481abc078ad3a2dd197079f9c414b (diff)
downloadspmc-6d04ff98c4bfc21ad3fa779237a16ba760080fac.tar.gz
Better reporting when a package does not exist
* Add additional errors * Fix user_input function missing an error return value * spmbuild sources a temporary file instead of output from a sub-shell * Fix indentation problem * A reason can be attached to spmerrno using spmerrno_cause()
Diffstat (limited to 'lib/config_global.c')
-rw-r--r--lib/config_global.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/config_global.c b/lib/config_global.c
index e97cddb..52589d4 100644
--- a/lib/config_global.c
+++ b/lib/config_global.c
@@ -3,6 +3,10 @@
*/
#include "spm.h"
+// GLOBAL
+spm_vars SPM_GLOBAL;
+
+
/**
* Get path to user's local configuration directory
* (The path will be created if it doesn't exist)
@@ -125,7 +129,13 @@ void check_runtime_environment(void) {
int bad_rt = 0;
char *required[] = {
"file",
+#if defined(__linux) || defined(__linux__)
"patchelf",
+#elif defined(__APPLE__) && defined(__MACH__)
+ "install_name_tool",
+#elif defined(__WIN32__)
+ // TODO: Does windows provide some kind of equivalent?
+#endif
"objdump",
"rsync",
"tar",