From 79d40707dbadaf83b12078c8183824c6ba88a6eb Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Tue, 19 Feb 2008 15:51:59 +0000 Subject: Fix compile on Linux. --- src/rc/rc-misc.c | 36 ------------------------------------ 1 file changed, 36 deletions(-) (limited to 'src/rc') diff --git a/src/rc/rc-misc.c b/src/rc/rc-misc.c index 1c340dd6..f1622fcf 100644 --- a/src/rc/rc-misc.c +++ b/src/rc/rc-misc.c @@ -235,42 +235,6 @@ char **env_filter (void) return (env); } -/* Other systems may need this at some point, but for now it's Linux only */ -#ifdef __linux__ -static bool file_regex (const char *file, const char *regex) -{ - FILE *fp; - char *line; - regex_t re; - bool retval = false; - int result; - - if (! (fp = fopen (file, "r"))) - return (false); - - if ((result = regcomp (&re, regex, REG_EXTENDED | REG_NOSUB)) != 0) { - fclose (fp); - line = xmalloc (sizeof (char) * BUFSIZ); - regerror (result, &re, line, BUFSIZ); - fprintf (stderr, "file_regex: %s", line); - free (line); - return (false); - } - - while ((line = rc_getline (fp))) { - if (regexec (&re, line, 0, NULL, 0) == 0) - retval = true; - free (line); - if (retval) - break; - } - fclose (fp); - regfree (&re); - - return (retval); -} -#endif - char **env_config (void) { char **env = NULL; -- cgit v1.2.3