GLIBC_2.3.2
GLIBC_2.3.3
GLIBC_2.3.4
- GLIBC_2.4
%ifdef USE_IN_LIBIO
HURD_CTHREADS_0.3
%endif
__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;
- }
}
#include <stdio.h>
#include <sys/param.h>
+#if 0
char *
__fgets_chk (buf, size, n, fp)
char *buf;
_IO_release_lock (fp);
return result;
}
+#endif
#include <stdio.h>
#include <sys/param.h>
+#if 0
char *
__fgets_unlocked_chk (buf, size, n, fp)
char *buf;
fp->_IO_file_flags |= old_error;
return result;
}
+#endif
#include <unistd.h>
#include <sys/param.h>
-
+#if 0
char *
__getcwd_chk (char *buf, size_t size, size_t buflen)
{
return __getcwd (buf, size);
}
+#endif
#include <unistd.h>
#include <sys/param.h>
-
+#if 0
char *
__getwd_chk (char *buf, size_t buflen)
{
link_warning (getwd,
"the `getwd' function is dangerous and should not be used.")
+#endif
#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)
{
return __pread64 (fd, buf, offset, nbytes);
}
+#endif
#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)
{
return __pread (fd, buf, offset, nbytes);
}
+#endif
# include <sysdep.h>
#endif
-
+#if 0
ssize_t
__read_chk (int fd, void *buf, size_t nbytes, size_t buflen)
{
return __read (fd, buf, nbytes);
#endif
}
+#endif
# include <sysdep.h>
#endif
-
+#if 0
ssize_t
__readlink_chk (const char *path, void *buf, size_t len, size_t buflen)
{
return __readlink (path, buf, len);
#endif
}
+#endif
#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)
{
__chk_fail ();
return nrecv;
}
+#endif
#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)
__chk_fail ();
return nrecv;
}
+#endif
-%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
%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)
((__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); }))
# 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); }))
# 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); }))