about summary refs log tree commit diff
path: root/stdlib/test-canon.c
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2000-05-17 11:04:21 +0000
committerAndreas Jaeger <aj@suse.de>2000-05-17 11:04:21 +0000
commite25054c49c92587a07de4badfe4b7e01ceb99858 (patch)
tree1ad481eff77aa0310a5b5c664917467b450bce6c /stdlib/test-canon.c
parent7626e16ceb26772b82ae4ef32e8e4b027cd79ed0 (diff)
downloadglibc-e25054c49c92587a07de4badfe4b7e01ceb99858.tar.gz
glibc-e25054c49c92587a07de4badfe4b7e01ceb99858.tar.xz
glibc-e25054c49c92587a07de4badfe4b7e01ceb99858.zip
Update.
2000-05-17  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/generic/dl-cache.h (_DL_CACHE_DEFAULT_ID): Only define if
	not yet defined.
	(_dl_cache_check_flags): Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/dl-cache.h: include_next
	dl-cache.h.

2000-05-17  Andreas Jaeger  <aj@suse.de>

	* manual/creature.texi (Feature Test Macros): Remove paragraph
	since the description is wrong.
	Closes PR libc/1691, reported by Geoff Clare <gwc@unisoft.com>.

2000-05-17  Andreas Jaeger  <aj@suse.de>

	* time/test_time.args: Removed.
	* time/Makefile (test_time-ARGS): Added contents here instead.

	* posix/tstgetopt.args: Removed.
	* posix/Makefile (tstgetopt-ARGS): Added contents here instead.

	* Rules: Allow arguments for test files to be specified in
	Makefile with testname-ARGS; remove rules with .args in it.

	* dirent/Makefile (opendir-tst1-ARGS): Use this for opendir-tst1,
	remove old bogus rule for opendir-tst1.args.

	* stdlib/test-canon.c: Rewrite to use test-skeleton.c.

	* stdlib/Makefile (test-canon-ARGS): New, supply argument to chdir
	into objdir.  This allows a readonly sourcetree.
	Reported by lrgallardo@yahoo.com, closes PR libc/1421.

2000-05-16  Andreas Jaeger  <aj@suse.de>,
            David Huggins-Daines <dhd@linuxcare.com>

	* sysdeps/generic/dl-cache.c (_dl_load_cache_lookup): Set
	cache_data in case of only new cache format correctly.

	* sysdeps/generic/dl-cache.c (_dl_load_cache_lookup): Align struct
	cache_file_new.

	* sysdeps/generic/dl-cache.h (ALIGN_CACHE): New macro to align
	struct cache_file_new.

	* elf/cache.c (save_cache): Fix str_offset if only new cache is
	present.

	* elf/cache.c (save_cache): Align struct new_file_cache.
	(print_cache): Likewise.
Diffstat (limited to 'stdlib/test-canon.c')
-rw-r--r--stdlib/test-canon.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/stdlib/test-canon.c b/stdlib/test-canon.c
index c8be8d2d96..2ece136435 100644
--- a/stdlib/test-canon.c
+++ b/stdlib/test-canon.c
@@ -1,5 +1,5 @@
 /* Test program for returning the canonical absolute name of a given file.
-   Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by David Mosberger <davidm@azstarnet.com>.
 
@@ -28,6 +28,10 @@
 #include <unistd.h>
 #include <sys/param.h>
 
+/* Prototype for our test function.  */
+extern int do_test (int argc, char *argv[]);
+#include <test-skeleton.c>
+
 #ifndef PATH_MAX
 # define PATH_MAX 4096
 #endif
@@ -55,7 +59,7 @@ struct {
   {"/////////////////////////////////",	"/"},
   {"/.././.././.././..///",		"/"},
   {"/etc",				"/etc"},
-  {"/etc/../etc",		 	"/etc"},
+  {"/etc/../etc",			"/etc"},
   /*  5 */
   {"/doesNotExist/../etc",		0, "/doesNotExist", ENOENT},
   {"./././././././././.",		"."},
@@ -111,7 +115,7 @@ check_path (const char * result, const char * expected)
 
 
 int
-main (int argc, char ** argv)
+do_test (int argc, char ** argv)
 {
   char * result;
   int fd, i, errors = 0;
@@ -198,7 +202,7 @@ main (int argc, char ** argv)
   if (errors != 0)
     {
       printf ("%d errors.\n", errors);
-      exit (EXIT_FAILURE);
+      return EXIT_FAILURE;
     }
 
   puts ("No errors.");