]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
2.3.4-11
authorJakub Jelinek <jakub@redhat.com>
Thu, 3 Mar 2005 16:52:27 +0000 (16:52 +0000)
committerJakub Jelinek <jakub@redhat.com>
Thu, 3 Mar 2005 16:52:27 +0000 (16:52 +0000)
16 files changed:
Versions.def
debug/Versions
debug/fgets_chk.c
debug/fgets_u_chk.c
debug/getcwd_chk.c
debug/getwd_chk.c
debug/pread64_chk.c
debug/pread_chk.c
debug/read_chk.c
debug/readlink_chk.c
debug/recv_chk.c
debug/recvfrom_chk.c
fedora/glibc.spec.in
libio/bits/stdio2.h
posix/bits/unistd.h
socket/bits/socket2.h

index 45b21279143ebd275e94900956ba868ec77987a9..33409f1143db77d134a6a607c75c37e5463ad07f 100644 (file)
@@ -20,7 +20,6 @@ libc {
   GLIBC_2.3.2
   GLIBC_2.3.3
   GLIBC_2.3.4
-  GLIBC_2.4
 %ifdef USE_IN_LIBIO
   HURD_CTHREADS_0.3
 %endif
index fd978341714ad5cb8563e087436de1e12ece123a..07d6fbb83040a870afa689d53422a3fbc0d5ccdb 100644 (file)
@@ -18,10 +18,4 @@ libc {
     __printf_chk; __fprintf_chk; __vprintf_chk; __vfprintf_chk;
     __gets_chk;
   }
-  GLIBC_2.4 {
-    __fgets_chk; __fgets_unlocked_chk;
-    __read_chk; __pread_chk; __pread64_chk;
-    __readlink_chk; __getcwd_chk; __getwd_chk;
-    __recv_chk; __recvfrom_chk;
-  }
 }
index 27fbede7f058ad0d48c1a7716c47118ccb5746b7..813d0dce6492b8c61f1fe0efe3682f8ef8e39867 100644 (file)
@@ -30,6 +30,7 @@
 #include <stdio.h>
 #include <sys/param.h>
 
+#if 0
 char *
 __fgets_chk (buf, size, n, fp)
      char *buf;
@@ -65,3 +66,4 @@ __fgets_chk (buf, size, n, fp)
   _IO_release_lock (fp);
   return result;
 }
+#endif
index 324d7e371bd2f01f3344cf71a16662bf12d572c6..50d440553390fcb5678d83aa5c034cefdce3a577 100644 (file)
@@ -30,6 +30,7 @@
 #include <stdio.h>
 #include <sys/param.h>
 
+#if 0
 char *
 __fgets_unlocked_chk (buf, size, n, fp)
      char *buf;
@@ -63,3 +64,4 @@ __fgets_unlocked_chk (buf, size, n, fp)
   fp->_IO_file_flags |= old_error;
   return result;
 }
+#endif
index cb864c858ef90e1e88ce1af17025af8d740cc57e..8d33b778260a7c17e8de459ac76b04957ae8db3b 100644 (file)
@@ -20,7 +20,7 @@
 #include <unistd.h>
 #include <sys/param.h>
 
-
+#if 0
 char *
 __getcwd_chk (char *buf, size_t size, size_t buflen)
 {
@@ -29,3 +29,4 @@ __getcwd_chk (char *buf, size_t size, size_t buflen)
 
   return __getcwd (buf, size);
 }
+#endif
index 898af28d3ffd02afb69118d37b6ee3c474f4837f..3a224d94a435e145147a93bad93e680f51aecba8 100644 (file)
@@ -20,7 +20,7 @@
 #include <unistd.h>
 #include <sys/param.h>
 
-
+#if 0
 char *
 __getwd_chk (char *buf, size_t buflen)
 {
@@ -32,3 +32,4 @@ __getwd_chk (char *buf, size_t buflen)
 
 link_warning (getwd,
              "the `getwd' function is dangerous and should not be used.")
+#endif
index 93e5151ddc8817db52c5fcb293233797a67c87b7..d281ad54afe026c8b6ae10f6695bfedf15ef1623 100644 (file)
@@ -19,7 +19,7 @@
 #include <unistd.h>
 #include <sys/param.h>
 
-
+#if 0
 ssize_t
 __pread64_chk (int fd, void *buf, size_t nbytes, off64_t offset, size_t buflen)
 {
@@ -28,3 +28,4 @@ __pread64_chk (int fd, void *buf, size_t nbytes, off64_t offset, size_t buflen)
 
   return __pread64 (fd, buf, offset, nbytes);
 }
+#endif
index 24c13103dda2e0167f905f33a0be081c3ea47358..cf4f9f203c53e96f835c584d8203d7620de08610 100644 (file)
@@ -19,7 +19,7 @@
 #include <unistd.h>
 #include <sys/param.h>
 
-
+#if 0
 ssize_t
 __pread_chk (int fd, void *buf, size_t nbytes, off_t offset, size_t buflen)
 {
@@ -28,3 +28,4 @@ __pread_chk (int fd, void *buf, size_t nbytes, off_t offset, size_t buflen)
 
   return __pread (fd, buf, offset, nbytes);
 }
+#endif
index da2bc945b740b1996e481d3a48fa9b4f482bd263..0c36aaed4fc7d86986d6dc6a128fb3b2e62d772a 100644 (file)
@@ -23,7 +23,7 @@
 # include <sysdep.h>
 #endif
 
-
+#if 0
 ssize_t
 __read_chk (int fd, void *buf, size_t nbytes, size_t buflen)
 {
@@ -36,3 +36,4 @@ __read_chk (int fd, void *buf, size_t nbytes, size_t buflen)
   return __read (fd, buf, nbytes);
 #endif
 }
+#endif
index ac18ee2c29b4fed41cffc0c84d25f80a57883518..8aabe0af25afcd60ab7a70beed47a17dd86a6342 100644 (file)
@@ -23,7 +23,7 @@
 # include <sysdep.h>
 #endif
 
-
+#if 0
 ssize_t
 __readlink_chk (const char *path, void *buf, size_t len, size_t buflen)
 {
@@ -36,3 +36,4 @@ __readlink_chk (const char *path, void *buf, size_t len, size_t buflen)
   return __readlink (path, buf, len);
 #endif
 }
+#endif
index 7a49d172340796df979e70002b0f1368e1e01012..f83bd3ed2f74d14edfeac04cb422288bca0ca100 100644 (file)
@@ -19,7 +19,7 @@
 #include <sys/param.h>
 #include <sys/socket.h>
 
-
+#if 0
 ssize_t
 __recv_chk (int fd, void *buf, size_t n, size_t buflen, int flags)
 {
@@ -31,3 +31,4 @@ __recv_chk (int fd, void *buf, size_t n, size_t buflen, int flags)
     __chk_fail ();
   return nrecv;
 }
+#endif
index e1b1da7f6b0f30f8bb1f54bdb6ab07b8b346d24d..9403479c00df13590cc5badb2edc4a4396f015f9 100644 (file)
@@ -19,7 +19,7 @@
 #include <sys/param.h>
 #include <sys/socket.h>
 
-
+#if 0
 ssize_t
 __recvfrom_chk (int fd, void *buf, size_t n, size_t buflen, int flags,
                __SOCKADDR_ARG addr, socklen_t *addr_len)
@@ -33,3 +33,4 @@ __recvfrom_chk (int fd, void *buf, size_t n, size_t buflen, int flags,
     __chk_fail ();
   return nrecv;
 }
+#endif
index 755b33d9165f7af9c3bbf9b0fd3de45bfd0ae608..4550d7229691a30440343e279a8ccaab661395e0 100644 (file)
@@ -1,4 +1,4 @@
-%define glibcrelease 10
+%define glibcrelease 11
 %define auxarches i586 i686 athlon sparcv9 alphaev6
 %define prelinkarches noarch
 %define nptlarches i386 i686 athlon x86_64 ia64 s390 s390x sparcv9 ppc ppc64
@@ -1272,6 +1272,16 @@ rm -f *.filelist*
 %endif
 
 %changelog
+* Thu Mar  3 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-11
+- update from CVS
+  - fix execvp (#149290)
+  - fix dlclose (#145810)
+  - clear padding in gconv-modules.cache (#146614, BZ#776)
+- rebuilt with GCC4
+- changed __GLIBC_MINOR__ for now back to 3
+- back out the newly added GLIBC_2.4 *_chk routines, instead
+  do the checking in macros
+
 * Sat Feb 12 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-10
 - hopefully fix interaction with prelink (#147655)
 
index e33cbb401af94330ab1a11918c52c852d9399a98..6ab6841c5398364f1e9a1a56f2c91fbb0dd61260 100644 (file)
@@ -88,13 +88,17 @@ extern char *__gets_chk (char *__str, size_t);
   ((__bos (__str) == (size_t) -1)                                            \
    ? gets (__str) : __gets_chk (__str, __bos (__str)))
 
-extern char *__fgets_chk (char *s, size_t size, int n, FILE *stream);
+extern void __chk_fail (void) __attribute__((noreturn));
 #define fgets(__str, __n, __fp) \
-  ((__bos (__str) == (size_t) -1)                                            \
-   ? fgets (__str, __n, __fp) : __fgets_chk (__str, __bos (__str), __n, __fp))
+  (__extension__                                                             \
+    ({ size_t __n_val = (__n);                                               \
+       if (__bos (__str) != (size_t) -1 && __bos (__str) < __n_val)          \
+         __chk_fail ();                                                              \
+       fgets (__str, __n_val, __fp); }))
 
-extern char *__fgets_unlocked_chk (char *s, size_t size, int n, FILE *stream);
 #define fgets_unlocked(__str, __n, __fp) \
-  ((__bos (__str) == (size_t) -1)                                            \
-   ? fgets_unlocked (__str, __n, __fp)                                       \
-   : __fgets_unlocked_chk (__str, __bos (__str), __n, __fp))
+  (__extension__                                                             \
+    ({ size_t __n_val = (__n);                                               \
+       if (__bos (__str) != (size_t) -1 && __bos (__str) < __n_val)          \
+         __chk_fail ();                                                              \
+       fgets_unlocked (__str, __n_val, __fp); }))
index 215063f07de7c467cbde62d145f3e0b6ef2ecfd4..dab98af569c5b53ba759fa99b9b5b87d94fcff2e 100644 (file)
 # error "Never include <bits/unistd.h> directly; use <unistd.h> instead."
 #endif
 
-extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes,
-                          size_t __buflen) __wur;
+extern void __chk_fail (void) __attribute__((noreturn));
 #define read(fd, buf, nbytes) \
-  (__bos0 (buf) != (size_t) -1                                               \
-   && (!__builtin_constant_p (nbytes) || (nbytes) > __bos0 (buf))            \
-   ? __read_chk (fd, buf, nbytes, __bos0 (buf))                                      \
-   : read (fd, buf, nbytes))
+  (__extension__                                                             \
+    ({ size_t __nbytes_val = (nbytes);                                       \
+       if (__bos0 (buf) != (size_t) -1 && __bos0 (buf) < __nbytes_val)       \
+         __chk_fail ();                                                              \
+       read (fd, buf, __nbytes_val); }))
 
 #ifdef __USE_UNIX98
-extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes,
-                           __off_t __offset, size_t __bufsize) __wur;
-extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes,
-                             __off64_t __offset, size_t __bufsize) __wur;
-# ifndef __USE_FILE_OFFSET64
-#  define pread(fd, buf, nbytes, offset) \
-  (__bos0 (buf) != (size_t) -1                                               \
-   && (!__builtin_constant_p (nbytes) || (nbytes) > __bos0 (buf))            \
-   ? __pread64_chk (fd, buf, nbytes, offset, __bos0 (buf))                   \
-   : pread (fd, buf, offset, nbytes))
-# else
-#  define pread(fd, buf, nbytes, offset) \
-  (__bos0 (buf) != (size_t) -1                                               \
-   && (!__builtin_constant_p (nbytes) || (nbytes) > __bos0 (buf))            \
-   ? __pread_chk (fd, buf, nbytes, offset, __bos0 (buf))                     \
-   : pread (fd, buf, offset, nbytes))
-# endif
+# define pread(fd, buf, nbytes, offset) \
+  (__extension__                                                             \
+    ({ size_t __nbytes_val = (nbytes);                                       \
+       if (__bos0 (buf) != (size_t) -1 && __bos0 (buf) < __nbytes_val)       \
+         __chk_fail ();                                                              \
+       pread (fd, buf, __nbytes_val, offset); }))
 
 # ifdef __USE_LARGEFILE64
 #  define pread64(fd, buf, nbytes, offset) \
-  (__bos0 (buf) != (size_t) -1                                               \
-   && (!__builtin_constant_p (nbytes) || (nbytes) > __bos0 (buf))            \
-   ? __pread64_chk (fd, buf, nbytes, offset, __bos0 (buf))                   \
-   : pread64 (fd, buf, offset, nbytes))
+  (__extension__                                                             \
+    ({ size_t __nbytes_val = (nbytes);                                       \
+       if (__bos0 (buf) != (size_t) -1 && __bos0 (buf) < __nbytes_val)       \
+         __chk_fail ();                                                              \
+       pread64 (fd, buf, __nbytes_val, offset); }))
 # endif
 #endif
 
 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
-extern int __readlink_chk (__const char *__restrict __path,
-                          char *__restrict __buf, size_t __len,
-                          size_t __buflen)
-     __THROW __nonnull ((1, 2)) __wur;
 # define readlink(path, buf, len) \
-  (__bos (buf) != (size_t) -1                                                \
-   && (!__builtin_constant_p (len) || (len) > __bos (buf))                   \
-   ? __readlink_chk (path, buf, len, __bos (buf))                            \
-   : readlink (path, buf, len))
+  (__extension__                                                             \
+    ({ size_t __len_val = (len);                                             \
+       if (__bos (buf) != (size_t) -1 && __bos (buf) < __len_val)            \
+         __chk_fail ();                                                              \
+       readlink (path, buf, __len_val); }))
 #endif
 
-extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen)
-     __THROW __wur;
 #define getcwd(buf, size) \
-  (__bos (buf) != (size_t) -1                                                \
-   && (!__builtin_constant_p (size) || (size) > __bos (buf))                 \
-   ? __getcwd_chk (buf, size, buflen) : getcwd (buf, size))
-
-#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
-extern char *__getwd_chk (char *__buf, size_t buflen)
-     __THROW __nonnull ((1)) __attribute_deprecated__ __wur;
-#define getwd(buf) \
-  (__bos (buf) != (size_t) -1 ? __getwd_chk (buf, buflen) : getwd (buf))
-#endif
+  (__extension__                                                             \
+    ({ size_t __size_val = (size);                                           \
+       if (__bos (buf) != (size_t) -1 && __bos (buf) < __size_val)           \
+         __chk_fail ();                                                              \
+       getcwd (buf, __size_val); }))
index 0ccb24ca31befcaaf8d62efbc15c2b44c4484e19..6998dca20ddf790a9070c2763b6d41f21fc2dc5e 100644 (file)
 # error "Never include <bits/socket2.h> directly; use <sys/socket.h> instead."
 #endif
 
-extern ssize_t __recv_chk (int __fd, void *__buf, size_t __n, size_t __buflen,
-                          int __flags);
+extern void __chk_fail (void) __attribute__((noreturn));
 #define recv(fd, buf, n, flags) \
-  (__bos0 (buf) != (size_t) -1                                               \
-   ? __recv_chk (fd, buf, n, __bos0 (buf), flags)                            \
-   : recv (fd, buf, n, flags))
+  (__extension__                                                             \
+    ({ size_t __n_val = (__n);                                               \
+       if (__bos0 (buf) != (size_t) -1 && __bos0 (buf) < __n_val)            \
+         __chk_fail ();                                                              \
+       recv (fd, buf, __n_val, flags); }))
 
-extern ssize_t __recvfrom_chk (int __fd, void *__restrict __buf, size_t __n,
-                              size_t __buflen, int __flags,
-                              __SOCKADDR_ARG __addr,
-                              socklen_t *__restrict __addr_len);
 #define recvfrom(fd, buf, n, flags, addr, addr_len) \
-  (__bos0 (buf) != (size_t) -1                                               \
-   ? __recvfrom_chk (fd, buf, n, __bos0 (buf), flags, addr, addr_len)        \
-   : recvfrom (fd, buf, n, flags, addr, addr_len))
+  (__extension__                                                             \
+    ({ size_t __n_val = (__n);                                               \
+       if (__bos0 (buf) != (size_t) -1 && __bos0 (buf) < __n_val)            \
+         __chk_fail ();                                                              \
+       recvfrom (fd, buf, __n_val, flags, addr, addr_len); }))