aboutsummaryrefslogtreecommitdiff
path: root/src/librc-misc.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-04-13 14:08:16 +0000
committerMike Frysinger <vapier@gentoo.org>2007-04-13 14:08:16 +0000
commita822d2d11872c10925e7f2bfa65b27e30a9700a5 (patch)
tree64ac478b67a8396a895d239f4bc3531e29b654b3 /src/librc-misc.c
parentfc0606395810db622c0eb4256997117d4baf67d9 (diff)
kill off internal relocations for librc.so
Diffstat (limited to 'src/librc-misc.c')
-rw-r--r--src/librc-misc.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/librc-misc.c b/src/librc-misc.c
index 55a9ac19..b728e8c9 100644
--- a/src/librc-misc.c
+++ b/src/librc-misc.c
@@ -4,24 +4,7 @@
Copyright 2007 Gentoo Foundation
*/
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/utsname.h>
-
-#include <dirent.h>
-#include <errno.h>
-#include <limits.h>
-#include <regex.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "einfo.h"
-#include "rc-misc.h"
-#include "rc.h"
-#include "strlist.h"
+#include "librc.h"
#define ERRX eerrorx("out of memory");
@@ -45,6 +28,7 @@ void *rc_xcalloc (size_t n, size_t size)
ERRX
}
+librc_hidden_def(rc_xcalloc)
void *rc_xmalloc (size_t size)
{
@@ -55,6 +39,7 @@ void *rc_xmalloc (size_t size)
ERRX
}
+librc_hidden_def(rc_xmalloc)
void *rc_xrealloc (void *ptr, size_t size)
{
@@ -65,7 +50,7 @@ void *rc_xrealloc (void *ptr, size_t size)
ERRX
}
-
+librc_hidden_def(rc_xrealloc)
char *rc_xstrdup (const char *str)
{
@@ -81,6 +66,7 @@ char *rc_xstrdup (const char *str)
ERRX
}
+librc_hidden_def(rc_xstrdup)
bool rc_is_env (const char *var, const char *val)
{
@@ -95,6 +81,7 @@ bool rc_is_env (const char *var, const char *val)
return (strcasecmp (v, val) == 0 ? true : false);
}
+librc_hidden_def(rc_is_env)
char *rc_strcatpaths (const char *path1, const char *paths, ...)
{
@@ -142,6 +129,7 @@ char *rc_strcatpaths (const char *path1, const char *paths, ...)
return (path);
}
+librc_hidden_def(rc_strcatpaths)
bool rc_exists (const char *pathname)
{
@@ -156,6 +144,7 @@ bool rc_exists (const char *pathname)
errno = 0;
return (false);
}
+librc_hidden_def(rc_exists)
bool rc_is_file (const char *pathname)
{
@@ -170,13 +159,14 @@ bool rc_is_file (const char *pathname)
errno = 0;
return (false);
}
+librc_hidden_def(rc_is_file)
bool rc_is_dir (const char *pathname)
{
struct stat buf;
if (! pathname)
- return (false);
+ return (false);
if (stat (pathname, &buf) == 0)
return (S_ISDIR (buf.st_mode));
@@ -184,13 +174,14 @@ bool rc_is_dir (const char *pathname)
errno = 0;
return (false);
}
+librc_hidden_def(rc_is_dir)
bool rc_is_link (const char *pathname)
{
struct stat buf;
if (! pathname)
- return (false);
+ return (false);
if (lstat (pathname, &buf) == 0)
return (S_ISLNK (buf.st_mode));
@@ -198,6 +189,7 @@ bool rc_is_link (const char *pathname)
errno = 0;
return (false);
}
+librc_hidden_def(rc_is_link)
bool rc_is_exec (const char *pathname)
{
@@ -212,6 +204,7 @@ bool rc_is_exec (const char *pathname)
errno = 0;
return (false);
}
+librc_hidden_def(rc_is_exec)
char **rc_ls_dir (char **list, const char *dir, int options)
{
@@ -257,6 +250,7 @@ char **rc_ls_dir (char **list, const char *dir, int options)
return (list);
}
+librc_hidden_def(rc_ls_dir)
bool rc_rm_dir (const char *pathname, bool top)
{
@@ -304,6 +298,7 @@ bool rc_rm_dir (const char *pathname, bool top)
return (true);
}
+librc_hidden_def(rc_rm_dir)
char **rc_get_config (char **list, const char *file)
{
@@ -365,7 +360,7 @@ char **rc_get_config (char **list, const char *file)
if (strcmp (linetok, entry) == 0) {
/* We have a match now - to save time we directly replace it */
free (list[i - 1]);
- list[i - 1] = newline;
+ list[i - 1] = newline;
replaced = true;
free (tmp);
break;
@@ -383,6 +378,7 @@ char **rc_get_config (char **list, const char *file)
return (list);
}
+librc_hidden_def(rc_get_config)
char *rc_get_config_entry (char **list, const char *entry)
{
@@ -398,6 +394,7 @@ char *rc_get_config_entry (char **list, const char *entry)
return (NULL);
}
+librc_hidden_def(rc_get_config_entry)
char **rc_get_list (char **list, const char *file)
{
@@ -432,6 +429,7 @@ char **rc_get_list (char **list, const char *file)
return (list);
}
+librc_hidden_def(rc_get_list)
char **rc_filter_env (void)
{
@@ -528,6 +526,7 @@ char **rc_filter_env (void)
return (env);
}
+librc_hidden_def(rc_filter_env)
/* Other systems may need this at some point, but for now it's Linux only */
#ifdef __linux__
@@ -701,3 +700,4 @@ char **rc_config_env (char **env)
return (env);
}
+librc_hidden_def(rc_config_env)