From e5475bf59151de2a4fe446182d36655349e74717 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 27 Sep 2005 01:06:47 +0000 Subject: [PATCH] add some sanity checks to make sure people use these functions correctly --- eclass/flag-o-matic.eclass | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index b86d190ea6ad..cdabdd4a3a5b 100644 --- a/eclass/flag-o-matic.eclass +++ b/eclass/flag-o-matic.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.92 2005/08/01 10:50:55 kevquinn Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.93 2005/09/27 01:06:47 vapier Exp $ # need access to emktemp() @@ -149,10 +149,12 @@ filter-flags() { } filter-lfs-flags() { + [[ -n $@ ]] && die "filter-lfs-flags takes no arguments" filter-flags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE } append-lfs-flags() { + [[ -n $@ ]] && die "append-lfs-flags takes no arguments" append-flags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE } @@ -166,6 +168,10 @@ append-flags() { } replace-flags() { + [[ $# != 2 ]] \ + && echo && eerror "Usage: replace-flags " \ + && die "replace-flags takes 2 arguments, not $#" + local f fset declare -a new_CFLAGS new_CXXFLAGS -- 2.26.2