summaryrefslogtreecommitdiff
path: root/src/logic
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-11-10 15:22:53 -0500
committermidipix <writeonce@midipix.org>2018-11-10 15:42:28 -0500
commitc0ac19b78e85f4b4e7e8fbf90daacf0c2267c657 (patch)
tree96ef2c6b96a2ce2bdc1079050c8c61b9f488814a /src/logic
parent339022d6cae668e41bdad36a46710e9cc90b95e2 (diff)
downloadslibtool-c0ac19b78e85f4b4e7e8fbf90daacf0c2267c657.tar.bz2
slibtool-c0ac19b78e85f4b4e7e8fbf90daacf0c2267c657.tar.xz
install mode: slbt_exec_uninstall_entry(): refactor (".so" --> dsosuffix).
Diffstat (limited to 'src/logic')
-rw-r--r--src/logic/slbt_exec_uninstall.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/logic/slbt_exec_uninstall.c b/src/logic/slbt_exec_uninstall.c
index 77af0ef..182bc8d 100644
--- a/src/logic/slbt_exec_uninstall.c
+++ b/src/logic/slbt_exec_uninstall.c
@@ -151,9 +151,10 @@ static int slbt_exec_uninstall_entry(
char ** parg,
uint32_t flags)
{
- char path [PATH_MAX];
- char lpath[PATH_MAX];
- char * dot;
+ const char * dsosuffix;
+ char * dot;
+ char path [PATH_MAX];
+ char lpath[PATH_MAX];
if ((size_t)snprintf(path,PATH_MAX,"%s",
entry->arg) >= PATH_MAX-8)
@@ -178,14 +179,17 @@ static int slbt_exec_uninstall_entry(
if (slbt_exec_uninstall_fs_entry(dctx,ectx,parg,path,flags))
return SLBT_NESTED_ERROR(dctx);
+ /* dsosuffix */
+ dsosuffix = dctx->cctx->settings.dsosuffix;
+
/* .so symlink? */
- strcpy(dot,".so");
+ strcpy(dot,dsosuffix);
if (!(slbt_readlink(path,lpath,sizeof(lpath))))
if (slbt_exec_uninstall_versioned_library(
dctx,ectx,parg,
path,lpath,
- ".so",flags))
+ dsosuffix,flags))
return SLBT_NESTED_ERROR(dctx);
/* .lib.a symlink? */
@@ -209,7 +213,7 @@ static int slbt_exec_uninstall_entry(
return SLBT_NESTED_ERROR(dctx);
/* remove .so library as needed */
- strcpy(dot,".so");
+ strcpy(dot,dsosuffix);
if (slbt_exec_uninstall_fs_entry(dctx,ectx,parg,path,flags))
return SLBT_NESTED_ERROR(dctx);