about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--localedata/ChangeLog5
-rw-r--r--localedata/Makefile4
-rw-r--r--rt/aio.h9
-rw-r--r--stdio-common/Makefile4
-rw-r--r--stdio-common/bug12.c46
-rw-r--r--sysdeps/generic/Dist1
-rw-r--r--sysdeps/unix/sysv/linux/alpha/glob.c6
7 files changed, 67 insertions, 8 deletions
diff --git a/localedata/ChangeLog b/localedata/ChangeLog
index 70b4ea733c..99b9078b2c 100644
--- a/localedata/ChangeLog
+++ b/localedata/ChangeLog
@@ -1,3 +1,8 @@
+1998-06-15  Ulrich Drepper  <drepper@cygnus.com>
+
+	* Makefile: Add more dependecies for running tests.
+	Reported by HJ Lu.
+
 1998-06-14  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
 
 	* locales/sk_SK: Add repertoiremap.
diff --git a/localedata/Makefile b/localedata/Makefile
index 0d27aec1d1..b8cbac0994 100644
--- a/localedata/Makefile
+++ b/localedata/Makefile
@@ -71,11 +71,11 @@ tests: do-collate-test do-tst-fmon do-tst-locale do-tst-rpmatch
 do-collate-test: sort-test.sh $(objpfx)collate-test $(objpfx)xfrm-test \
 		 $(test-input:.ISO-8859-1=.in)
 	$(SHELL) -e $< $(common-objpfx) $(test-input)
-do-tst-fmon: tst-fmon.sh $(objpfx)tst-fmon tst-fmon.data
+do-tst-fmon: tst-fmon.sh $(objpfx)tst-fmon tst-fmon.data  do-collate-test
 	$(SHELL) -e $< $(common-objpfx) tst-fmon.data
 do-tst-locale: tst-locale.sh $(ld-test-srcs)
 	$(SHELL) -e $< $(common-objpfx)
-do-tst-rpmatch: tst-rpmatch.sh $(objpfx)tst-rpmatch do-collate-test
+do-tst-rpmatch: tst-rpmatch.sh $(objpfx)tst-rpmatch do-tst-fmon
 	$(SHELL) -e $< $(common-objpfx)
 endif
 
diff --git a/rt/aio.h b/rt/aio.h
index 20f753a027..643e0fbfb9 100644
--- a/rt/aio.h
+++ b/rt/aio.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -164,7 +164,7 @@ extern int aio_suspend __P ((__const struct aiocb *__const __list[],
 
 /* Force all operations associated with file desriptor described by
    `aio_fildes' member of AIOCBP.  */
-extern int aio_fsync __P ((int __op, struct aiocb *__aiocbp));
+extern int aio_fsync __P ((int __operation, struct aiocb *__aiocbp));
 #else
 # ifdef __REDIRECT
 extern int __REDIRECT (aio_read, __P ((struct aiocb *__aiocbp)), aio_read64);
@@ -189,7 +189,8 @@ extern int __REDIRECT (aio_suspend,
 			     int __nent, __const struct timespec *__timeout)),
 		       aio_suspend64);
 
-extern int __REDIRECT (aio_fsync __P ((int __op, struct aiocb *__aiocbp)),
+extern int __REDIRECT (aio_fsync __P ((int __operation,
+				       struct aiocb *__aiocbp)),
 		       aio_fsync64);
 
 # else
@@ -220,7 +221,7 @@ extern int aio_suspend64 __P ((__const struct aiocb64 *__const __list[],
 			       int __nent,
 			       __const struct timespec *__timeout));
 
-extern int aio_fsync64 __P ((int __op, struct aiocb64 *__aiocbp));
+extern int aio_fsync64 __P ((int __operation, struct aiocb64 *__aiocbp));
 #endif
 
 __END_DECLS
diff --git a/stdio-common/Makefile b/stdio-common/Makefile
index 577cf4cfa3..dba0335a4b 100644
--- a/stdio-common/Makefile
+++ b/stdio-common/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
+# Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
 # The GNU C Library is free software; you can redistribute it and/or
@@ -42,7 +42,7 @@ distribute := _itoa.h printf-parse.h
 tests := tst-printf tstscanf test_rdwr test-popen tstgetln test-fseek \
 	 temptest tst-fileno test-fwrite tst-ungetc tst-ferror \
 	 xbug errnobug \
-	 bug1 bug2 bug3 bug4 bug5 bug6 bug7 bug8 bug9 bug10 bug11 \
+	 bug1 bug2 bug3 bug4 bug5 bug6 bug7 bug8 bug9 bug10 bug11 bug12 \
 	 tfformat tiformat tstdiomisc tst-printfsz tst-wc-printf \
 	 scanf1 scanf2 scanf3 scanf4 scanf5 scanf7 scanf8 scanf9 scanf10
 
diff --git a/stdio-common/bug12.c b/stdio-common/bug12.c
new file mode 100644
index 0000000000..48610c0e78
--- /dev/null
+++ b/stdio-common/bug12.c
@@ -0,0 +1,46 @@
+#include <stdio.h>
+#include <string.h>
+
+char x[4096], z[4096], b[21], m[4096 * 4];
+
+int
+main (void)
+{
+  FILE *f = tmpfile ();
+  int i, failed = 0;
+
+  memset (x, 'x', 4096);
+  memset (z, 'z', 4096);
+  b[20] = 0;
+
+  for (i = 0; i <= 5; i++)
+    {
+      fwrite (x, 4096, 1, f);
+      fwrite (z, 4096, 1, f);
+    }
+  rewind (f);
+
+  fread (m, 4096 * 4 - 10, 1, f);
+  fread (b, 20, 1, f);
+  printf ("got %s (should be %s)\n", b, "zzzzzzzzzzxxxxxxxxxx");
+  if (strcmp (b, "zzzzzzzzzzxxxxxxxxxx"))
+    failed = 1;
+
+  fseek (f, -40, SEEK_CUR);
+  fread (b, 20, 1, f);
+  printf ("got %s (should be %s)\n", b, "zzzzzzzzzzzzzzzzzzzz");
+  if (strcmp (b, "zzzzzzzzzzzzzzzzzzzz"))
+    failed = 1;
+
+  fread (b, 20, 1, f);
+  printf ("got %s (should be %s)\n", b, "zzzzzzzzzzxxxxxxxxxx");
+  if (strcmp (b, "zzzzzzzzzzxxxxxxxxxx"))
+    failed = 1;
+
+  fread (b, 20, 1, f);
+  printf ("got %s (should be %s)\n", b, "xxxxxxxxxxxxxxxxxxxx");
+  if (strcmp (b, "xxxxxxxxxxxxxxxxxxxx"))
+    failed = 1;
+
+  return failed;
+}
diff --git a/sysdeps/generic/Dist b/sysdeps/generic/Dist
index e088372b07..5d4075402d 100644
--- a/sysdeps/generic/Dist
+++ b/sysdeps/generic/Dist
@@ -1,5 +1,6 @@
 make_siglist.c signame.c signame.h
 det_endian.c
 entry.h
+errno-loc.c.
 getresgid.c
 getresuid.c
diff --git a/sysdeps/unix/sysv/linux/alpha/glob.c b/sysdeps/unix/sysv/linux/alpha/glob.c
index 59c42ae5fc..69da879c20 100644
--- a/sysdeps/unix/sysv/linux/alpha/glob.c
+++ b/sysdeps/unix/sysv/linux/alpha/glob.c
@@ -21,6 +21,12 @@
 #define globfree(pglob) \
   __new_globfree (pglob)
 
+/* We need prototypes for these new names.  */
+extern int __new_glob (const char *__pattern, int __flags,
+		       int (*__errfunc) (const char *, int),
+		       glob_t *__pglob);
+extern void __new_globfree (glob_t *__pglob);
+
 #include <sysdeps/generic/glob.c>
 
 #undef glob