Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37549252
en ru br
Репозитории ALT
S:4.4.0-alt2
5.1: 3.81-alt5
4.1: 3.81-alt2
4.0: 3.81-alt2
3.0: 3.81beta3-alt4
www.altlinux.org/Changes

Группа :: Разработка/Прочее
Пакет: make

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: make-3.82-cvs-08.patch
Скачать


2011-05-07  Paul Smith  <psmith@gnu.org>
	* read.c (parse_file_seq): Ensure existence checks use glob().
	* tests/scripts/functions/wildcard: Verify wildcard used to test for
	file existence/non-existence.
--- a/read.c
+++ b/read.c
@@ -3111,7 +3111,7 @@ parse_file_seq (char **stringp, unsigned int size, int stopchar,
 #endif /* !NO_ARCHIVES */
 
       /* glob() is expensive: don't call it unless we need to.  */
-      if (!(flags & PARSEFS_EXISTS) || strpbrk (name, "?*[") == NULL)
+      if (!(flags & PARSEFS_EXISTS) && strpbrk (name, "?*[") == NULL)
         {
           globme = 0;
           i = 1;
--- a/tests/scripts/functions/wildcard
+++ b/tests/scripts/functions/wildcard
@@ -88,4 +88,16 @@ all: ; @echo $(wildcard xz--y*.7)
 !,
               '', "\n");
 
+# TEST #5: wildcard used to verify file existence
+
+touch('xxx.yyy');
+
+run_make_test(q!exists: ; @echo file=$(wildcard xxx.yyy)!,
+              '', "file=xxx.yyy\n");
+
+unlink('xxx.yyy');
+
+run_make_test(q!exists: ; @echo file=$(wildcard xxx.yyy)!,
+              '', "file=\n");
+
 1;
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin