summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/slibtool/slibtool.h10
-rw-r--r--project/common.mk10
-rw-r--r--project/tree.mk2
-rw-r--r--src/driver/slbt_host_params.c2
-rw-r--r--src/fallback/slbt_archive_import_mri.c8
-rw-r--r--src/internal/slibtool_lconf_impl.c4
-rw-r--r--src/logic/linkcmd/slbt_linkcmd_archive.c2
-rw-r--r--src/logic/linkcmd/slbt_linkcmd_dsolib.c2
-rw-r--r--src/logic/linkcmd/slbt_linkcmd_executable.c2
-rw-r--r--src/logic/slbt_exec_install.c10
-rw-r--r--src/logic/slbt_exec_link.c2
-rw-r--r--src/output/slbt_output_fdcwd.c4
-rw-r--r--src/util/slbt_archive_import.c (renamed from src/helper/slbt_archive_import.c)8
-rw-r--r--src/util/slbt_copy_file.c (renamed from src/helper/slbt_copy_file.c)2
-rw-r--r--src/util/slbt_dump_machine.c (renamed from src/helper/slbt_dump_machine.c)6
-rw-r--r--src/util/slbt_map_input.c (renamed from src/helper/slbt_map_input.c)0
-rw-r--r--src/util/slbt_realpath.c (renamed from src/helper/slbt_realpath.c)2
17 files changed, 38 insertions, 38 deletions
diff --git a/include/slibtool/slibtool.h b/include/slibtool/slibtool.h
index d9abbc9..2634632 100644
--- a/include/slibtool/slibtool.h
+++ b/include/slibtool/slibtool.h
@@ -376,13 +376,13 @@ slbt_api void slbt_reset_alternate_host (const struct slbt_driver_ctx *);
slbt_api int slbt_get_flavor_settings (const char *, const struct slbt_flavor_settings **);
-/* helper api */
-slbt_api int slbt_archive_import (const struct slbt_driver_ctx *, struct slbt_exec_ctx *,
+/* utility helper interfaces */
+slbt_api int slbt_util_import_archive (const struct slbt_driver_ctx *, struct slbt_exec_ctx *,
char * dstarchive, char * srcarchive);
-slbt_api int slbt_copy_file (const struct slbt_driver_ctx *, struct slbt_exec_ctx *,
+slbt_api int slbt_util_copy_file (const struct slbt_driver_ctx *, struct slbt_exec_ctx *,
char * src, char * dst);
-slbt_api int slbt_dump_machine (const char * compiler, char * machine, size_t bufsize);
-slbt_api int slbt_realpath (int, const char *, int, char *, size_t);
+slbt_api int slbt_util_dump_machine (const char * compiler, char * machine, size_t bufsize);
+slbt_api int slbt_util_realpath (int, const char *, int, char *, size_t);
/* archiver api */
slbt_api int slbt_ar_get_archive_ctx (const struct slbt_driver_ctx *, const char * path,
diff --git a/project/common.mk b/project/common.mk
index af1e10c..7e48395 100644
--- a/project/common.mk
+++ b/project/common.mk
@@ -18,11 +18,11 @@ API_SRCS = \
src/driver/slbt_link_params.c \
src/driver/slbt_split_argv.c \
src/driver/slbt_version_info.c \
- src/helper/slbt_archive_import.c \
- src/helper/slbt_copy_file.c \
- src/helper/slbt_dump_machine.c \
- src/helper/slbt_map_input.c \
- src/helper/slbt_realpath.c \
+ src/util/slbt_archive_import.c \
+ src/util/slbt_copy_file.c \
+ src/util/slbt_dump_machine.c \
+ src/util/slbt_map_input.c \
+ src/util/slbt_realpath.c \
src/logic/slbt_exec_ar.c \
src/logic/slbt_exec_compile.c \
src/logic/slbt_exec_ctx.c \
diff --git a/project/tree.mk b/project/tree.mk
index c06d62c..8f0f043 100644
--- a/project/tree.mk
+++ b/project/tree.mk
@@ -3,7 +3,7 @@ tree.tag:
mkdir -p src/arbits
mkdir -p src/driver
mkdir -p src/fallback
- mkdir -p src/helper
+ mkdir -p src/util
mkdir -p src/internal
mkdir -p src/logic
mkdir -p src/output
diff --git a/src/driver/slbt_host_params.c b/src/driver/slbt_host_params.c
index d708028..dd4e787 100644
--- a/src/driver/slbt_host_params.c
+++ b/src/driver/slbt_host_params.c
@@ -209,7 +209,7 @@ slbt_hidden int slbt_init_host_params(
host->host = drvhost->machine;
cfgmeta->host = cfgnmachine;
- } else if (slbt_dump_machine(cctx->cargv[0],buf,sizeof(buf)) < 0) {
+ } else if (slbt_util_dump_machine(cctx->cargv[0],buf,sizeof(buf)) < 0) {
if (dctx)
slbt_dprintf(
slbt_driver_fderr(dctx),
diff --git a/src/fallback/slbt_archive_import_mri.c b/src/fallback/slbt_archive_import_mri.c
index a171f5c..a65578c 100644
--- a/src/fallback/slbt_archive_import_mri.c
+++ b/src/fallback/slbt_archive_import_mri.c
@@ -42,7 +42,7 @@ static char * slbt_mri_argument(
if (arg[0] == '/') {
target = arg;
} else {
- if (slbt_realpath(
+ if (slbt_util_realpath(
fdat,".",O_DIRECTORY,
mricwd,sizeof(mricwd)) < 0)
return 0;
@@ -81,7 +81,7 @@ static char * slbt_mri_argument(
return lnk;
}
-static void slbt_archive_import_child(
+static void slbt_util_import_archive_child(
char * program,
int fd[2])
{
@@ -99,7 +99,7 @@ static void slbt_archive_import_child(
_exit(EXIT_FAILURE);
}
-int slbt_archive_import_mri(
+int slbt_util_import_archive_mri(
const struct slbt_driver_ctx * dctx,
struct slbt_exec_ctx * ectx,
char * dstarchive,
@@ -140,7 +140,7 @@ int slbt_archive_import_mri(
/* child */
if (pid == 0)
- slbt_archive_import_child(
+ slbt_util_import_archive_child(
program,
fd);
diff --git a/src/internal/slibtool_lconf_impl.c b/src/internal/slibtool_lconf_impl.c
index 32f192d..dc73bc3 100644
--- a/src/internal/slibtool_lconf_impl.c
+++ b/src/internal/slibtool_lconf_impl.c
@@ -387,7 +387,7 @@ static int slbt_lconf_trace_result_plain(
fderr = slbt_driver_fderr(dctx);
- cpath = !(slbt_realpath(fdat,lconf,0,path,sizeof(path)))
+ cpath = !(slbt_util_realpath(fdat,lconf,0,path,sizeof(path)))
? path : lconf;
switch (err) {
@@ -435,7 +435,7 @@ static int slbt_lconf_trace_result_annotated(
fderr = slbt_driver_fderr(dctx);
- cpath = !(slbt_realpath(fdat,lconf,0,path,sizeof(path)))
+ cpath = !(slbt_util_realpath(fdat,lconf,0,path,sizeof(path)))
? path : lconf;
switch (err) {
diff --git a/src/logic/linkcmd/slbt_linkcmd_archive.c b/src/logic/linkcmd/slbt_linkcmd_archive.c
index e3ac657..9fb1778 100644
--- a/src/logic/linkcmd/slbt_linkcmd_archive.c
+++ b/src/logic/linkcmd/slbt_linkcmd_archive.c
@@ -165,7 +165,7 @@ slbt_hidden int slbt_exec_link_create_archive(
/* input objects associated with .la archives */
for (parg=ectx->cargv; *parg; parg++)
if (slbt_adjust_wrapper_argument(*parg,true))
- if (slbt_archive_import(dctx,ectx,output,*parg))
+ if (slbt_util_import_archive(dctx,ectx,output,*parg))
return SLBT_NESTED_ERROR(dctx);
return 0;
diff --git a/src/logic/linkcmd/slbt_linkcmd_dsolib.c b/src/logic/linkcmd/slbt_linkcmd_dsolib.c
index ed9aa6c..8ae9395 100644
--- a/src/logic/linkcmd/slbt_linkcmd_dsolib.c
+++ b/src/logic/linkcmd/slbt_linkcmd_dsolib.c
@@ -243,7 +243,7 @@ slbt_hidden int slbt_exec_link_create_library(
}
/* cwd */
- if (slbt_realpath(fdcwd,".",O_DIRECTORY,cwd,sizeof(cwd)))
+ if (slbt_util_realpath(fdcwd,".",O_DIRECTORY,cwd,sizeof(cwd)))
return SLBT_SYSTEM_ERROR(dctx,0);
/* .libs/libfoo.so --> -L.libs -lfoo */
diff --git a/src/logic/linkcmd/slbt_linkcmd_executable.c b/src/logic/linkcmd/slbt_linkcmd_executable.c
index a4c3b81..3a47a49 100644
--- a/src/logic/linkcmd/slbt_linkcmd_executable.c
+++ b/src/logic/linkcmd/slbt_linkcmd_executable.c
@@ -136,7 +136,7 @@ slbt_hidden int slbt_exec_link_create_executable(
verinfo = slbt_source_version();
/* cwd, DL_PATH fixup */
- if (slbt_realpath(fdcwd,".",O_DIRECTORY,cwd,sizeof(cwd)))
+ if (slbt_util_realpath(fdcwd,".",O_DIRECTORY,cwd,sizeof(cwd)))
return SLBT_SYSTEM_ERROR(dctx,0);
slbt_emit_fdwrap_dl_path_fixup(
diff --git a/src/logic/slbt_exec_install.c b/src/logic/slbt_exec_install.c
index 395e972..7b30eb4 100644
--- a/src/logic/slbt_exec_install.c
+++ b/src/logic/slbt_exec_install.c
@@ -191,7 +191,7 @@ static int slbt_exec_install_import_libraries(
dctx->cctx->asettings.impsuffix);
/* copy: .libs/libfoo.x.y.z.lib.a --> dstdir */
- if (slbt_copy_file(dctx,ectx,srcbuf,dstdir))
+ if (slbt_util_copy_file(dctx,ectx,srcbuf,dstdir))
return SLBT_NESTED_ERROR(dctx);
/* .libs/libfoo.x.lib.a */
@@ -200,7 +200,7 @@ static int slbt_exec_install_import_libraries(
dctx->cctx->asettings.impsuffix);
/* copy: .libs/libfoo.x.lib.a --> dstdir */
- if (slbt_copy_file(dctx,ectx,srcbuf,dstdir))
+ if (slbt_util_copy_file(dctx,ectx,srcbuf,dstdir))
return SLBT_NESTED_ERROR(dctx);
/* /dstdir/libfoo.lib.a */
@@ -310,7 +310,7 @@ static int slbt_exec_install_library_wrapper(
slbt_unmap_file(mapinfo);
/* cp libfoo.la.slibtool.instal /dstdir/libfoo.la */
- if (slbt_copy_file(dctx,ectx,clainame,instname))
+ if (slbt_util_copy_file(dctx,ectx,clainame,instname))
return SLBT_NESTED_ERROR(dctx);
return 0;
@@ -555,7 +555,7 @@ static int slbt_exec_install_entry(
farchive = false;
if (farchive)
- if (slbt_copy_file(dctx,ectx,
+ if (slbt_util_copy_file(dctx,ectx,
srcfile,
dest ? (char *)dest->arg : *dst))
return SLBT_NESTED_ERROR(dctx);
@@ -682,7 +682,7 @@ static int slbt_exec_install_entry(
if (fpe) {
/* copy: .libs/libfoo.so.x.y.z --> libfoo.so.x */
- if (slbt_copy_file(
+ if (slbt_util_copy_file(
dctx,ectx,
srcfile,
dlnkname))
diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c
index 3b6bc6f..a08abd4 100644
--- a/src/logic/slbt_exec_link.c
+++ b/src/logic/slbt_exec_link.c
@@ -119,7 +119,7 @@ static int slbt_exec_link_create_library_symlink(
if (fmajor && (dctx->cctx->drvflags & SLBT_DRIVER_IMAGE_PE))
- return slbt_copy_file(
+ return slbt_util_copy_file(
dctx,ectx,
target,lnkname);
else
diff --git a/src/output/slbt_output_fdcwd.c b/src/output/slbt_output_fdcwd.c
index 705e6d1..fa7e8a7 100644
--- a/src/output/slbt_output_fdcwd.c
+++ b/src/output/slbt_output_fdcwd.c
@@ -36,7 +36,7 @@ static int slbt_output_fdcwd_plain(const struct slbt_driver_ctx * dctx)
sprintf(scwd,"%d",fdcwd);
}
- if (slbt_realpath(fdcwd,".",0,path,sizeof(path)) < 0) {
+ if (slbt_util_realpath(fdcwd,".",0,path,sizeof(path)) < 0) {
ferror = 1;
memset(path,0,sizeof(path));
strerror_r(errno,path,sizeof(path));
@@ -72,7 +72,7 @@ static int slbt_output_fdcwd_annotated(const struct slbt_driver_ctx * dctx)
sprintf(scwd,"%d",fdcwd);
}
- if (slbt_realpath(fdcwd,".",0,path,sizeof(path)) < 0) {
+ if (slbt_util_realpath(fdcwd,".",0,path,sizeof(path)) < 0) {
ferror = 1;
memset(path,0,sizeof(path));
strerror_r(errno,path,sizeof(path));
diff --git a/src/helper/slbt_archive_import.c b/src/util/slbt_archive_import.c
index d339f78..5657fcc 100644
--- a/src/helper/slbt_archive_import.c
+++ b/src/util/slbt_archive_import.c
@@ -10,14 +10,14 @@
#include "slibtool_errinfo_impl.h"
/* legacy fallback, no longer in use */
-extern int slbt_archive_import_mri(
+extern int slbt_util_import_archive_mri(
const struct slbt_driver_ctx * dctx,
struct slbt_exec_ctx * ectx,
char * dstarchive,
char * srcarchive);
/* use slibtool's in-memory archive merging facility */
-static int slbt_archive_import_impl(
+static int slbt_util_import_archive_impl(
const struct slbt_driver_ctx * dctx,
struct slbt_exec_ctx * ectx,
char * dstarchive,
@@ -51,7 +51,7 @@ static int slbt_archive_import_impl(
}
-int slbt_archive_import(
+int slbt_util_import_archive(
const struct slbt_driver_ctx * dctx,
struct slbt_exec_ctx * ectx,
char * dstarchive,
@@ -62,7 +62,7 @@ int slbt_archive_import(
srcarchive))
return 0;
- return slbt_archive_import_impl(
+ return slbt_util_import_archive_impl(
dctx,ectx,
dstarchive,
srcarchive);
diff --git a/src/helper/slbt_copy_file.c b/src/util/slbt_copy_file.c
index 8f4d264..30d3f03 100644
--- a/src/helper/slbt_copy_file.c
+++ b/src/util/slbt_copy_file.c
@@ -10,7 +10,7 @@
#include "slibtool_symlink_impl.h"
#include "slibtool_errinfo_impl.h"
-int slbt_copy_file(
+int slbt_util_copy_file(
const struct slbt_driver_ctx * dctx,
struct slbt_exec_ctx * ectx,
char * src,
diff --git a/src/helper/slbt_dump_machine.c b/src/util/slbt_dump_machine.c
index 40ef387..bf86315 100644
--- a/src/helper/slbt_dump_machine.c
+++ b/src/util/slbt_dump_machine.c
@@ -17,7 +17,7 @@
#include "slibtool_spawn_impl.h"
#include "slibtool_snprintf_impl.h"
-static void slbt_dump_machine_child(
+static void slbt_util_dump_machine_child(
char * program,
int fd[2])
{
@@ -43,7 +43,7 @@ static void slbt_dump_machine_child(
_exit(EXIT_FAILURE);
}
-int slbt_dump_machine(
+int slbt_util_dump_machine(
const char * compiler,
char * machine,
size_t buflen)
@@ -78,7 +78,7 @@ int slbt_dump_machine(
/* child */
if (pid == 0)
- slbt_dump_machine_child(
+ slbt_util_dump_machine_child(
program,
fd);
diff --git a/src/helper/slbt_map_input.c b/src/util/slbt_map_input.c
index ca0b06b..ca0b06b 100644
--- a/src/helper/slbt_map_input.c
+++ b/src/util/slbt_map_input.c
diff --git a/src/helper/slbt_realpath.c b/src/util/slbt_realpath.c
index 936a9eb..3929e04 100644
--- a/src/helper/slbt_realpath.c
+++ b/src/util/slbt_realpath.c
@@ -30,7 +30,7 @@
extern long syscall(int, ...);
#endif
-int slbt_realpath(
+int slbt_util_realpath(
int fdat,
const char * path,
int options,