summary refs log tree commit diff
path: root/posix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-07-28 20:47:08 +0000
committerUlrich Drepper <drepper@redhat.com>1998-07-28 20:47:08 +0000
commit1bc21e7a70eb9f1f69c179bb251e612c7aecd655 (patch)
tree9ed0ab62f6a85dcae93d8239923bdb4c049c9b36 /posix
parente852e889444a8bf27f3e5075d064e9922b38e7e2 (diff)
downloadglibc-1bc21e7a70eb9f1f69c179bb251e612c7aecd655.tar.gz
glibc-1bc21e7a70eb9f1f69c179bb251e612c7aecd655.tar.xz
glibc-1bc21e7a70eb9f1f69c179bb251e612c7aecd655.zip
Update.
	* resolv/nss_dns/dns-host.c (getanswer_r): Lower the priority of
	warnings when DNSSEC related records are received.
	* resolv/gethnamaddr.c (getanswer): Likewise.
	Patch by Brian Wellington <bwelling@anomaly.munge.com>.
	* signal/signal.h: Add prototype for sysv_signal.

	* math/libm-test.c (tgamma_test): Remove redundant tests.
	* posix/glob.h: Add GLOB_TILDE_CHECK.
	* sysdeps/generic/glob.c: Implement GLOB_TILDE_CHECK.
	* posix/globtest.c: Add option T to enable GLOB_TILDE_CHECK.
	* posix/globtest.sh: Re-enable test with ~ and non-existing user name.
Diffstat (limited to 'posix')
-rw-r--r--posix/glob.h4
-rw-r--r--posix/globtest.c5
-rwxr-xr-xposix/globtest.sh12
3 files changed, 13 insertions, 8 deletions
diff --git a/posix/glob.h b/posix/glob.h
index 91d95494e7..da719c2a45 100644
--- a/posix/glob.h
+++ b/posix/glob.h
@@ -61,10 +61,12 @@ extern "C" {
 # define GLOB_NOMAGIC	 (1 << 11)/* If no magic chars, return the pattern.  */
 # define GLOB_TILDE	 (1 << 12)/* Expand ~user and ~ to home directories. */
 # define GLOB_ONLYDIR	 (1 << 13)/* Match only directories.  */
+# define GLOB_TILDE_CHECK (1 << 14)/* Like GLOB_TILDE but return an error
+				      if the user name is not available.  */
 # define __GLOB_FLAGS	(GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \
 			 GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND|     \
 			 GLOB_PERIOD|GLOB_ALTDIRFUNC|GLOB_BRACE|     \
-			 GLOB_NOMAGIC|GLOB_TILDE|GLOB_ONLYDIR)
+			 GLOB_NOMAGIC|GLOB_TILDE|GLOB_ONLYDIR|GLOB_TILDE_CHECK)
 #else
 # define __GLOB_FLAGS	(GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \
 			 GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND|     \
diff --git a/posix/globtest.c b/posix/globtest.c
index 37b1fd07e9..970d90a31c 100644
--- a/posix/globtest.c
+++ b/posix/globtest.c
@@ -29,7 +29,7 @@ main (int argc, char *argv[])
   glob_t g;
   int quotes = 1;
 
-  while ((i = getopt (argc, argv, "bcdegmopqst")) != -1)
+  while ((i = getopt (argc, argv, "bcdegmopqstT")) != -1)
     switch(i)
       {
       case 'b':
@@ -66,6 +66,9 @@ main (int argc, char *argv[])
       case 't':
 	glob_flags |= GLOB_TILDE;
 	break;
+      case 'T':
+	glob_flags |= GLOB_TILDE_CHECK;
+	break;
       default:
 	exit (-1);
       }
diff --git a/posix/globtest.sh b/posix/globtest.sh
index ba41fc4896..12635b76d9 100755
--- a/posix/globtest.sh
+++ b/posix/globtest.sh
@@ -215,12 +215,12 @@ eval echo ~$USER > $testout2
 cmp $testout2 $testout || result=1
 
 # Tilde expansion shouldn't match a file
-#${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
-#${common_objpfx}posix/globtest -t "$testdir" "~file4" |
-#sort > $testout
-#cat <<"EOF" | cmp - $testout || result=1
-#GLOB_NOMATCH
-#EOF
+${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${common_objpfx}posix/globtest -T "$testdir" "~file4" |
+sort > $testout
+cat <<"EOF" | cmp - $testout || result=1
+GLOB_NOMATCH
+EOF
 
 # Matching \** should only find *file6
 ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \