diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/CMakeLists.txt | 1 | ||||
-rw-r--r-- | include/checksum.h | 1 | ||||
-rw-r--r-- | include/error_handler.h | 1 | ||||
-rw-r--r-- | include/rpath.h | 1 | ||||
-rw-r--r-- | include/shlib.h | 4 | ||||
-rw-r--r-- | include/spm.h | 21 |
6 files changed, 20 insertions, 9 deletions
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 68ca824..1009b96 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -6,6 +6,7 @@ install( compat.h conf.h environment.h + error_handler.h find.h fs.h install.h diff --git a/include/checksum.h b/include/checksum.h index 780ee97..5309527 100644 --- a/include/checksum.h +++ b/include/checksum.h @@ -4,7 +4,6 @@ #ifndef SPM_CHECKSUM_H #define SPM_CHECKSUM_H -char *md5sum(const char *filename); char *sha256sum(const char *filename); #endif //SPM_CHECKSUM_H diff --git a/include/error_handler.h b/include/error_handler.h index e58698e..eaf6420 100644 --- a/include/error_handler.h +++ b/include/error_handler.h @@ -17,6 +17,7 @@ #define SPM_ERR_MANIFEST_INVALID _SPM_ERR(7) // manifest file is invalid (no header) #define SPM_ERR_MANIFEST_EMPTY _SPM_ERR(8) // manifest file has no data #define SPM_ERR_PARSE _SPM_ERR(9) // general parsing error +#define SPM_ERR_NOT_IMPLEMENTED _SPM_ERR(10) // not implemented (does exist on this platform) extern int spmerrno; extern const char *SPM_ERR_STRING[]; diff --git a/include/rpath.h b/include/rpath.h index 46bdbec..2a33bea 100644 --- a/include/rpath.h +++ b/include/rpath.h @@ -5,6 +5,7 @@ #define SPM_RPATH_H Process *patchelf(const char *_filename, const char *_args); +Process *install_name_tool(const char *_filename, const char *_args); FSTree *rpath_libraries_available(const char *root); char *rpath_autodetect(const char *filename, FSTree *tree); int has_rpath(const char *_filename); diff --git a/include/shlib.h b/include/shlib.h index 68b8487..6ae9bb1 100644 --- a/include/shlib.h +++ b/include/shlib.h @@ -8,7 +8,7 @@ #define SPM_SHLIB_EXEC "dumpbin" #define SPM_SHLIB_EXEC_ARGS "/dependents" #define SPM_SHLIB_EXTENSION ".dll" -#elif OS_APPLE +#elif OS_DARWIN #define SPM_SHLIB_EXEC "/usr/bin/objdump" #define SPM_SHLIB_EXEC_ARGS "-macho -p" #define SPM_SHLIB_EXTENSION ".dylib" @@ -18,6 +18,8 @@ #define SPM_SHLIB_EXTENSION ".so" #endif +char *objdump(const char *_filename, char *_args); +char *shlib_rpath(const char *filename); StrList *shlib_deps(const char *_filename); #endif //SPM_SHLIB_H diff --git a/include/spm.h b/include/spm.h index 5382378..e0e713f 100644 --- a/include/spm.h +++ b/include/spm.h @@ -8,16 +8,24 @@ #define OS_DARWIN 0 #define OS_WINDOWS 0 #define OS_LINUX 0 +#define OS_SUPPORTED 0 #if defined(__APPLE__) && defined(__MACH__) -#undef OS_DARWIN -#define OS_DARWIN 1 +# undef OS_DARWIN +# define OS_DARWIN 1 +# undef OS_SUPPORTED +# define OS_SUPPORTED 1 + +// TODO: Windows is not supported at all yet, so OS_SUPPORTED is untouched #elif defined(_WIN32) -#undef OS_WINDOWS -#define OS_WINDOWS 1 +# undef OS_WINDOWS +# define OS_WINDOWS 1 + #elif defined(__linux) || defined(__linux__) -#undef OS_LINUX -#define OS_LINUX 1 +# undef OS_LINUX +# define OS_LINUX 1 +# undef OS_SUPPORTED +# define OS_SUPPORTED 1 #endif #include <ctype.h> @@ -32,7 +40,6 @@ #include <string.h> #include <time.h> #include <sys/stat.h> -#include <openssl/md5.h> #include <openssl/sha.h> #if !OS_WINDOWS |