aboutsummaryrefslogtreecommitdiff
path: root/src/librc
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2019-02-26 16:08:55 -0600
committerWilliam Hubbs <w.d.hubbs@gmail.com>2019-02-26 17:47:55 -0600
commit44f5a72d1aeb131cc2cb464a53809a5a8d90c46e (patch)
tree8722a70dd685a04496205c864fbeccccbe18c1c9 /src/librc
parent0d378974bfbd69c5427d44c0a43a9f36389aa235 (diff)
remove hidden-visibility.h
I am removing this on the advice of a member of the Gentoo toolchain team. It was explained to me that this doesn't offer any significant benefits to OpenRC. If anyone ffeels differently, please open a pull request reverting this and adding an explanation of what it does and how to know which functions to mark hidden in the future. This fixes #301.
Diffstat (limited to 'src/librc')
-rw-r--r--src/librc/librc-daemon.c5
-rw-r--r--src/librc/librc-depend.c10
-rw-r--r--src/librc/librc-misc.c8
-rw-r--r--src/librc/librc-stringlist.c8
-rw-r--r--src/librc/librc.c28
-rw-r--r--src/librc/librc.h63
6 files changed, 0 insertions, 122 deletions
diff --git a/src/librc/librc-daemon.c b/src/librc/librc-daemon.c
index 6c12669f..9e7a97ab 100644
--- a/src/librc/librc-daemon.c
+++ b/src/librc/librc-daemon.c
@@ -208,7 +208,6 @@ rc_find_pids(const char *exec, const char *const *argv, uid_t uid, pid_t pid)
closedir(procdir);
return pids;
}
-librc_hidden_def(rc_find_pids)
#elif BSD
@@ -313,7 +312,6 @@ rc_find_pids(const char *exec, const char *const *argv, uid_t uid, pid_t pid)
return pids;
}
-librc_hidden_def(rc_find_pids)
#else
# error "Platform not supported!"
@@ -455,7 +453,6 @@ rc_service_daemon_set(const char *service, const char *exec,
free(dirpath);
return retval;
}
-librc_hidden_def(rc_service_daemon_set)
bool
rc_service_started_daemon(const char *service,
@@ -495,7 +492,6 @@ rc_service_started_daemon(const char *service,
free(dirpath);
return retval;
}
-librc_hidden_def(rc_service_started_daemon)
bool
rc_service_daemons_crashed(const char *service)
@@ -653,4 +649,3 @@ rc_service_daemons_crashed(const char *service)
return retval;
}
-librc_hidden_def(rc_service_daemons_crashed)
diff --git a/src/librc/librc-depend.c b/src/librc/librc-depend.c
index f010a072..dcce40e5 100644
--- a/src/librc/librc-depend.c
+++ b/src/librc/librc-depend.c
@@ -78,7 +78,6 @@ rc_deptree_free(RC_DEPTREE *deptree)
}
free(deptree);
}
-librc_hidden_def(rc_deptree_free)
static RC_DEPINFO *
get_depinfo(const RC_DEPTREE *deptree, const char *service)
@@ -109,7 +108,6 @@ RC_DEPTREE *
rc_deptree_load(void) {
return rc_deptree_load_file(RC_DEPTREE_CACHE);
}
-librc_hidden_def(rc_deptree_load)
RC_DEPTREE *
rc_deptree_load_file(const char *deptree_file)
@@ -173,7 +171,6 @@ rc_deptree_load_file(const char *deptree_file)
return deptree;
}
-librc_hidden_def(rc_deptree_load_file)
static bool
valid_service(const char *runlevel, const char *service, const char *type)
@@ -459,7 +456,6 @@ rc_deptree_depend(const RC_DEPTREE *deptree,
rc_stringlist_add(svcs, svc->value);
return svcs;
}
-librc_hidden_def(rc_deptree_depend)
RC_STRINGLIST *
rc_deptree_depends(const RC_DEPTREE *deptree,
@@ -487,7 +483,6 @@ rc_deptree_depends(const RC_DEPTREE *deptree,
rc_stringlist_free(visited);
return sorted;
}
-librc_hidden_def(rc_deptree_depends)
RC_STRINGLIST *
rc_deptree_order(const RC_DEPTREE *deptree, const char *runlevel, int options)
@@ -543,7 +538,6 @@ rc_deptree_order(const RC_DEPTREE *deptree, const char *runlevel, int options)
rc_stringlist_free(types);
return services;
}
-librc_hidden_def(rc_deptree_order)
/* Given a time, recurse the target path to find out if there are
@@ -633,7 +627,6 @@ rc_newer_than(const char *source, const char *target,
return mtime_check(source, target, true, newest, file);
}
-librc_hidden_def(rc_newer_than)
bool
rc_older_than(const char *source, const char *target,
@@ -641,7 +634,6 @@ rc_older_than(const char *source, const char *target,
{
return mtime_check(source, target, false, oldest, file);
}
-librc_hidden_def(rc_older_than)
typedef struct deppair
{
@@ -737,7 +729,6 @@ rc_deptree_update_needed(time_t *newest, char *file)
return newer;
}
-librc_hidden_def(rc_deptree_update_needed)
/* This is a 7 phase operation
Phase 1 is a shell script which loads each init script and config in turn
@@ -1084,4 +1075,3 @@ rc_deptree_update(void)
rc_deptree_free(deptree);
return retval;
}
-librc_hidden_def(rc_deptree_update)
diff --git a/src/librc/librc-misc.c b/src/librc/librc-misc.c
index c6af405c..1f3d23f4 100644
--- a/src/librc/librc-misc.c
+++ b/src/librc/librc-misc.c
@@ -43,7 +43,6 @@ rc_yesno(const char *value)
return false;
}
-librc_hidden_def(rc_yesno)
/**
@@ -91,7 +90,6 @@ rc_getfile(const char *file, char **buffer, size_t *len)
fclose(fp);
return ret;
}
-librc_hidden_def(rc_getfile)
ssize_t
rc_getline(char **line, size_t *len, FILE *fp)
@@ -116,7 +114,6 @@ rc_getline(char **line, size_t *len, FILE *fp)
}
return last;
}
-librc_hidden_def(rc_getline)
char *
rc_proc_getent(const char *ent _unused)
@@ -163,7 +160,6 @@ rc_proc_getent(const char *ent _unused)
return NULL;
#endif
}
-librc_hidden_def(rc_proc_getent)
RC_STRINGLIST *
rc_config_list(const char *file)
@@ -202,7 +198,6 @@ rc_config_list(const char *file)
return list;
}
-librc_hidden_def(rc_config_list)
static void rc_config_set_value(RC_STRINGLIST *config, char *value)
{
@@ -373,7 +368,6 @@ rc_config_load(const char *file)
return config;
}
-librc_hidden_def(rc_config_load)
char *
rc_config_value(RC_STRINGLIST *list, const char *entry)
@@ -392,7 +386,6 @@ rc_config_value(RC_STRINGLIST *list, const char *entry)
}
return NULL;
}
-librc_hidden_def(rc_config_value)
/* Global for caching the strings loaded from rc.conf to avoid reparsing for
* each rc_conf_value call */
@@ -438,4 +431,3 @@ rc_conf_value(const char *setting)
return rc_config_value(rc_conf, setting);
}
-librc_hidden_def(rc_conf_value)
diff --git a/src/librc/librc-stringlist.c b/src/librc/librc-stringlist.c
index 58c6ef8d..773cb9cb 100644
--- a/src/librc/librc-stringlist.c
+++ b/src/librc/librc-stringlist.c
@@ -25,7 +25,6 @@ rc_stringlist_new(void)
TAILQ_INIT(l);
return l;
}
-librc_hidden_def(rc_stringlist_new)
RC_STRING *
rc_stringlist_add(RC_STRINGLIST *list, const char *value)
@@ -36,7 +35,6 @@ rc_stringlist_add(RC_STRINGLIST *list, const char *value)
TAILQ_INSERT_TAIL(list, s, entries);
return s;
}
-librc_hidden_def(rc_stringlist_add)
RC_STRING *
rc_stringlist_addu(RC_STRINGLIST *list, const char *value)
@@ -51,7 +49,6 @@ rc_stringlist_addu(RC_STRINGLIST *list, const char *value)
return rc_stringlist_add(list, value);
}
-librc_hidden_def(rc_stringlist_addu)
bool
rc_stringlist_delete(RC_STRINGLIST *list, const char *value)
@@ -69,7 +66,6 @@ rc_stringlist_delete(RC_STRINGLIST *list, const char *value)
errno = EEXIST;
return false;
}
-librc_hidden_def(rc_stringlist_delete)
RC_STRING *
rc_stringlist_find(RC_STRINGLIST *list, const char *value)
@@ -83,7 +79,6 @@ rc_stringlist_find(RC_STRINGLIST *list, const char *value)
}
return NULL;
}
-librc_hidden_def(rc_stringlist_find)
RC_STRINGLIST *
rc_stringlist_split(const char *value, const char *sep)
@@ -98,7 +93,6 @@ rc_stringlist_split(const char *value, const char *sep)
return list;
}
-librc_hidden_def(rc_stringlist_split)
void
rc_stringlist_sort(RC_STRINGLIST **list)
@@ -128,7 +122,6 @@ rc_stringlist_sort(RC_STRINGLIST **list)
free(l);
*list = new;
}
-librc_hidden_def(rc_stringlist_sort)
void
rc_stringlist_free(RC_STRINGLIST *list)
@@ -148,4 +141,3 @@ rc_stringlist_free(RC_STRINGLIST *list)
}
free(list);
}
-librc_hidden_def(rc_stringlist_free)
diff --git a/src/librc/librc.c b/src/librc/librc.c
index 9d6abc7a..90327097 100644
--- a/src/librc/librc.c
+++ b/src/librc/librc.c
@@ -351,7 +351,6 @@ rc_sys(void)
return sys;
}
-librc_hidden_def(rc_sys)
static const char *
rc_parse_service_state(RC_SERVICE state)
@@ -426,20 +425,17 @@ rc_runlevel_starting(void)
{
return exists(RC_STARTING);
}
-librc_hidden_def(rc_runlevel_starting)
bool
rc_runlevel_stopping(void)
{
return exists(RC_STOPPING);
}
-librc_hidden_def(rc_runlevel_stopping)
RC_STRINGLIST *rc_runlevel_list(void)
{
return ls_dir(RC_RUNLEVELDIR, LS_DIR);
}
-librc_hidden_def(rc_runlevel_list)
char *
rc_runlevel_get(void)
@@ -466,7 +462,6 @@ rc_runlevel_get(void)
return runlevel;
}
-librc_hidden_def(rc_runlevel_get)
bool
rc_runlevel_set(const char *runlevel)
@@ -479,7 +474,6 @@ rc_runlevel_set(const char *runlevel)
fclose(fp);
return true;
}
-librc_hidden_def(rc_runlevel_set)
bool
rc_runlevel_exists(const char *runlevel)
@@ -494,7 +488,6 @@ rc_runlevel_exists(const char *runlevel)
return true;
return false;
}
-librc_hidden_def(rc_runlevel_exists)
bool
rc_runlevel_stack(const char *dst, const char *src)
@@ -507,7 +500,6 @@ rc_runlevel_stack(const char *dst, const char *src)
snprintf(d, sizeof(s), "%s/%s/%s", RC_RUNLEVELDIR, dst, src);
return (symlink(s, d) == 0 ? true : false);
}
-librc_hidden_def(rc_runlevel_stack)
bool
rc_runlevel_unstack(const char *dst, const char *src)
@@ -517,7 +509,6 @@ rc_runlevel_unstack(const char *dst, const char *src)
snprintf(path, sizeof(path), "%s/%s/%s", RC_RUNLEVELDIR, dst, src);
return (unlink(path) == 0 ? true : false);
}
-librc_hidden_def(rc_runlevel_unstack)
RC_STRINGLIST *
rc_runlevel_stacks(const char *runlevel)
@@ -530,7 +521,6 @@ rc_runlevel_stacks(const char *runlevel)
rc_stringlist_free(ancestor_list);
return stack;
}
-librc_hidden_def(rc_runlevel_stacks)
/* Resolve a service name to its full path */
char *
@@ -584,7 +574,6 @@ rc_service_resolve(const char *service)
return NULL;
}
-librc_hidden_def(rc_service_resolve)
bool
rc_service_exists(const char *service)
@@ -623,7 +612,6 @@ rc_service_exists(const char *service)
free(file);
return retval;
}
-librc_hidden_def(rc_service_exists)
#define OPTSTR \
". '%s'; echo $extra_commands $extra_started_commands $extra_stopped_commands"
@@ -665,7 +653,6 @@ rc_service_extra_commands(const char *service)
free(cmd);
return commands;
}
-librc_hidden_def(rc_service_extra_commands)
#define DESCSTR ". '%s'; echo \"${description%s%s}\""
char *
@@ -695,7 +682,6 @@ rc_service_description(const char *service, const char *option)
free(cmd);
return desc;
}
-librc_hidden_def(rc_service_description)
bool
rc_service_in_runlevel(const char *service, const char *runlevel)
@@ -706,7 +692,6 @@ rc_service_in_runlevel(const char *service, const char *runlevel)
runlevel, basename_c(service));
return exists(file);
}
-librc_hidden_def(rc_service_in_runlevel)
bool
rc_service_mark(const char *service, const RC_SERVICE state)
@@ -826,7 +811,6 @@ rc_service_mark(const char *service, const RC_SERVICE state)
free(init);
return true;
}
-librc_hidden_def(rc_service_mark)
RC_SERVICE
rc_service_state(const char *service)
@@ -869,7 +853,6 @@ rc_service_state(const char *service)
return state;
}
-librc_hidden_def(rc_service_state)
char *
rc_service_value_get(const char *service, const char *option)
@@ -884,7 +867,6 @@ rc_service_value_get(const char *service, const char *option)
return buffer;
}
-librc_hidden_def(rc_service_value_get)
bool
rc_service_value_set(const char *service, const char *option,
@@ -909,7 +891,6 @@ rc_service_value_set(const char *service, const char *option,
}
return true;
}
-librc_hidden_def(rc_service_value_set)
bool
@@ -936,7 +917,6 @@ rc_service_schedule_start(const char *service, const char *service_to_start)
free(init);
return retval;
}
-librc_hidden_def(rc_service_schedule_start)
bool
rc_service_schedule_clear(const char *service)
@@ -949,7 +929,6 @@ rc_service_schedule_clear(const char *service)
return true;
return false;
}
-librc_hidden_def(rc_service_schedule_clear)
RC_STRINGLIST *
rc_services_in_runlevel(const char *runlevel)
@@ -987,7 +966,6 @@ rc_services_in_runlevel(const char *runlevel)
list = rc_stringlist_new();
return list;
}
-librc_hidden_def(rc_services_in_runlevel)
RC_STRINGLIST *
rc_services_in_runlevel_stacked(const char *runlevel)
@@ -1004,7 +982,6 @@ rc_services_in_runlevel_stacked(const char *runlevel)
}
return list;
}
-librc_hidden_def(rc_services_in_runlevel_stacked)
RC_STRINGLIST *
rc_services_in_state(RC_SERVICE state)
@@ -1038,7 +1015,6 @@ rc_services_in_state(RC_SERVICE state)
rc_stringlist_free(dirs);
return list;
}
-librc_hidden_def(rc_services_in_state)
bool
rc_service_add(const char *runlevel, const char *service)
@@ -1084,7 +1060,6 @@ rc_service_add(const char *runlevel, const char *service)
free(init);
return retval;
}
-librc_hidden_def(rc_service_add)
bool
rc_service_delete(const char *runlevel, const char *service)
@@ -1097,7 +1072,6 @@ rc_service_delete(const char *runlevel, const char *service)
return true;
return false;
}
-librc_hidden_def(rc_service_delete)
RC_STRINGLIST *
rc_services_scheduled_by(const char *service)
@@ -1116,7 +1090,6 @@ rc_services_scheduled_by(const char *service)
rc_stringlist_free(dirs);
return list;
}
-librc_hidden_def(rc_services_scheduled_by)
RC_STRINGLIST *
rc_services_scheduled(const char *service)
@@ -1127,4 +1100,3 @@ rc_services_scheduled(const char *service)
basename_c(service));
return ls_dir(dir, LS_INITD);
}
-librc_hidden_def(rc_services_scheduled)
diff --git a/src/librc/librc.h b/src/librc/librc.h
index c4c34184..80270c6e 100644
--- a/src/librc/librc.h
+++ b/src/librc/librc.h
@@ -56,67 +56,4 @@
#include "rc.h"
#include "rc-misc.h"
-#include "hidden-visibility.h"
-#define librc_hidden_proto(x) hidden_proto(x)
-#define librc_hidden_def(x) hidden_def(x)
-
-librc_hidden_proto(rc_conf_value)
-librc_hidden_proto(rc_config_list)
-librc_hidden_proto(rc_config_load)
-librc_hidden_proto(rc_config_value)
-librc_hidden_proto(rc_deptree_depend)
-librc_hidden_proto(rc_deptree_depends)
-librc_hidden_proto(rc_deptree_free)
-librc_hidden_proto(rc_deptree_load)
-librc_hidden_proto(rc_deptree_load_file)
-librc_hidden_proto(rc_deptree_order)
-librc_hidden_proto(rc_deptree_update)
-librc_hidden_proto(rc_deptree_update_needed)
-librc_hidden_proto(rc_find_pids)
-librc_hidden_proto(rc_getfile)
-librc_hidden_proto(rc_getline)
-librc_hidden_proto(rc_newer_than)
-librc_hidden_proto(rc_proc_getent)
-librc_hidden_proto(rc_older_than)
-librc_hidden_proto(rc_runlevel_exists)
-librc_hidden_proto(rc_runlevel_get)
-librc_hidden_proto(rc_runlevel_list)
-librc_hidden_proto(rc_runlevel_set)
-librc_hidden_proto(rc_runlevel_stack)
-librc_hidden_proto(rc_runlevel_stacks)
-librc_hidden_proto(rc_runlevel_starting)
-librc_hidden_proto(rc_runlevel_stopping)
-librc_hidden_proto(rc_runlevel_unstack)
-librc_hidden_proto(rc_service_add)
-librc_hidden_proto(rc_service_daemons_crashed)
-librc_hidden_proto(rc_service_daemon_set)
-librc_hidden_proto(rc_service_delete)
-librc_hidden_proto(rc_service_description)
-librc_hidden_proto(rc_service_exists)
-librc_hidden_proto(rc_service_extra_commands)
-librc_hidden_proto(rc_service_in_runlevel)
-librc_hidden_proto(rc_service_mark)
-librc_hidden_proto(rc_service_resolve)
-librc_hidden_proto(rc_service_schedule_clear)
-librc_hidden_proto(rc_service_schedule_start)
-librc_hidden_proto(rc_services_in_runlevel)
-librc_hidden_proto(rc_services_in_runlevel_stacked)
-librc_hidden_proto(rc_services_in_state)
-librc_hidden_proto(rc_services_scheduled)
-librc_hidden_proto(rc_services_scheduled_by)
-librc_hidden_proto(rc_service_started_daemon)
-librc_hidden_proto(rc_service_state)
-librc_hidden_proto(rc_service_value_get)
-librc_hidden_proto(rc_service_value_set)
-librc_hidden_proto(rc_stringlist_add)
-librc_hidden_proto(rc_stringlist_addu)
-librc_hidden_proto(rc_stringlist_delete)
-librc_hidden_proto(rc_stringlist_find)
-librc_hidden_proto(rc_stringlist_free)
-librc_hidden_proto(rc_stringlist_new)
-librc_hidden_proto(rc_stringlist_split)
-librc_hidden_proto(rc_stringlist_sort)
-librc_hidden_proto(rc_sys)
-librc_hidden_proto(rc_yesno)
-
#endif