aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Ludd <solar@gentoo.org>2006-03-24 18:10:57 +0000
committerNed Ludd <solar@gentoo.org>2006-03-24 18:10:57 +0000
commit658d90fc88c562ddbd047139daec49009ccc4a74 (patch)
treefada76c2d59b58adf9780c5a17a9ec415719d1da
parent- make qlop a bit more verbose when !average. Initial patch from exg. addtion... (diff)
downloadportage-utils-658d90fc88c562ddbd047139daec49009ccc4a74.tar.gz
portage-utils-658d90fc88c562ddbd047139daec49009ccc4a74.tar.bz2
portage-utils-658d90fc88c562ddbd047139daec49009ccc4a74.zip
- dont use rindex. It is obsolete according to SuSV3. guard GLOB_BRACE for some reason I dont really understand yet psm seems to think is a problem.
-rw-r--r--main.c4
-rw-r--r--qmerge.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/main.c b/main.c
index 33ab3a5..f6c6a7a 100644
--- a/main.c
+++ b/main.c
@@ -1,7 +1,7 @@
/*
* Copyright 2005-2006 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/portage-utils/main.c,v 1.113 2006/03/19 00:32:39 solar Exp $
+ * $Header: /var/cvsroot/gentoo-projects/portage-utils/main.c,v 1.114 2006/03/24 18:10:57 solar Exp $
*
* Copyright 2005-2006 Ned Ludd - <solar@gentoo.org>
* Copyright 2005-2006 Mike Frysinger - <vapier@gentoo.org>
@@ -658,7 +658,7 @@ const char *initialize_flat(int cache_type)
if ((e = scandir(de, &eb, filter_hidden, alphasort)) < 0)
continue;
for (d = 0 ; d < e; d++) {
- if ((p = rindex(eb[d]->d_name, '.')) != NULL)
+ if ((p = strrchr(eb[d]->d_name, '.')) != NULL)
if (strcmp(p, ".ebuild") == 0) {
count++;
fprintf(fp, "%s/%s/%s\n", category[i]->d_name, pn[c]->d_name, eb[d]->d_name);
diff --git a/qmerge.c b/qmerge.c
index af8ff41..875a59f 100644
--- a/qmerge.c
+++ b/qmerge.c
@@ -1,7 +1,7 @@
/*
* Copyright 2005-2006 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/portage-utils/qmerge.c,v 1.39 2006/03/18 01:58:55 solar Exp $
+ * $Header: /var/cvsroot/gentoo-projects/portage-utils/qmerge.c,v 1.40 2006/03/24 18:10:58 solar Exp $
*
* Copyright 2005-2006 Ned Ludd - <solar@gentoo.org>
* Copyright 2005-2006 Mike Frysinger - <vapier@gentoo.org>
@@ -12,6 +12,10 @@
#include <fnmatch.h>
#include <glob.h>
+#ifndef GLOB_BRACE
+# define GLOB_BRACE (1 << 10) /* Expand "{a,b}" to "a" "b". */
+#endif
+
/*
--nofiles don't verify files in package
--noscript don't execute pkg_{pre,post}{inst,rm} (if any)
@@ -47,7 +51,7 @@ static const char *qmerge_opts_help[] = {
COMMON_OPTS_HELP
};
-static const char qmerge_rcsid[] = "$Id: qmerge.c,v 1.39 2006/03/18 01:58:55 solar Exp $";
+static const char qmerge_rcsid[] = "$Id: qmerge.c,v 1.40 2006/03/24 18:10:58 solar Exp $";
#define qmerge_usage(ret) usage(ret, QMERGE_FLAGS, qmerge_long_opts, qmerge_opts_help, lookup_applet_idx("qmerge"))
char search_pkgs = 0;