|
@@ -11,7 +11,7 @@
|
11
|
11
|
#include <string.h>
|
12
|
12
|
#include <assert.h>
|
13
|
13
|
|
14
|
|
-#if defined(unix) || defined(__APPLE__)
|
|
14
|
+#if defined(unix) || defined(__APPLE__) || defined(__linux__)
|
15
|
15
|
#include <wordexp.h>
|
16
|
16
|
#endif
|
17
|
17
|
|
|
@@ -31,7 +31,7 @@ char *stringRemoveQuotes(const char *s) {
|
31
|
31
|
}
|
32
|
32
|
|
33
|
33
|
char *stringReplace(const char *s, const char *search, const char *replace) {
|
34
|
|
- char *tmp = strstr(s, search);
|
|
34
|
+ char *tmp = strstr((char *)s, search);
|
35
|
35
|
if (tmp == NULL)
|
36
|
36
|
return NULL;
|
37
|
37
|
size_t offset = tmp - s;
|
|
@@ -130,7 +130,7 @@ char *fullPath(const char *path, char end) {
|
130
|
130
|
assert(path[0] != '\0');
|
131
|
131
|
|
132
|
132
|
if (path[0] == '~') {
|
133
|
|
-#if defined(unix) || defined(__APPLE__)
|
|
133
|
+#if defined(unix) || defined(__APPLE__) || defined(__linux__)
|
134
|
134
|
|
135
|
135
|
#ifdef __APPLE__
|
136
|
136
|
// Workaround for Mac OS X. See:
|