diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-11-19 20:05:14 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2005-11-19 20:05:14 +0000 |
commit | 8e8c8d3c871666d3c4fb0cda0147fb2231beeb09 (patch) | |
tree | 8205dc9da58d4c3090372b155fdede74e7b3d6b1 | |
parent | b9616a4d2d0ff113b95a638127ad27c98e6c713b (diff) | |
download | glibc-8e8c8d3c871666d3c4fb0cda0147fb2231beeb09.tar glibc-8e8c8d3c871666d3c4fb0cda0147fb2231beeb09.tar.gz glibc-8e8c8d3c871666d3c4fb0cda0147fb2231beeb09.tar.bz2 glibc-8e8c8d3c871666d3c4fb0cda0147fb2231beeb09.zip |
Updated to fedora-glibc-20051119T1959
41 files changed, 507 insertions, 66 deletions
@@ -1,3 +1,115 @@ +2005-11-19 Jakub Jelinek <jakub@redhat.com> + + * sysdeps/unix/sysv/linux/ia64/bits/shm.h (shmatt_t): New type. + (struct shmid_ds): Use it for shm_nattch field. + +2005-11-18 Jakub Jelinek <jakub@redhat.com> + + * sysdeps/unix/sysv/linux/futimesat.c (futimesat): If FILE is NULL, + set access and modification times of the file referenced by FD. + * sysdeps/generic/futimesat.c (futimesat): Don't return EINVAL if + FILE is NULL. Don't check FD if FILE is absolute path. + +2005-11-19 Ulrich Drepper <drepper@redhat.com> + + * nscd/nscd_gethst_r.c (nscd_gethst_r): Avoid unnecesary read call + if there are no aliases. + + * sysdeps/unix/sysv/linux/Makefile (CFLAGS-connections.c, + CFLAGS-pwdcache.c, CFLAGS-grpcache.c, CFLAGS-hstcache.c, + CFLAGS-aicache.c, CFLAGS-initgrcache.c): Add -DHAVE_SENDFILE. + * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_SENDFILE): + Define. + * nscd/pwdcache.c [HAVE_SENDFILE]: Include <sys/sendfile.h> and + <kernel-features.h>. + [HAVE_SENDFILE] (cache_addpw): Use sendfile to transmit positive + result. + * nscd/grpcache.c: Likewise. + * nscd/hstcache.c: Likewise. + * nscd/aicache.c: Likewise. + * nscd/initgrcache.c: Likewise. + * nscd/connectionc.c: Likewise. + +2005-11-18 Andreas Schwab <schwab@suse.de> + + * sysdeps/powerpc/powerpc32/fpu/s_lround.S: Remove useless alias. + + * sysdeps/unix/sysv/linux/powerpc/powerpc32/socket.S: Handle + NO_WEAK_ALIAS. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S: Likewise. + +2005-11-18 Paul Brook <paul@codesourcery.com> + + * sysdeps/unix/sysv/linux/m68k/bits/mman.h (MREMAP_FIXED): New macro. + + * nscd/grpcache.c: Include <sys/socket.h>. + * nscd/nscd_stat.c: Likewise. + * nscd/pwdcache.c: Likewise. + * sysdeps/unix/sysv/linux/unlinkat.c: Include <stdlib.h>, <sysdep.h>. + +2005-11-17 Ulrich Drepper <drepper@redhat.com> + + * sysdeps/unix/sysv/linux/sparc/bits/shm.h: Define SHM_NORESERVE. + * sysdeps/unix/sysv/linux/ia64/bits/shm.h: Likewise. + * sysdeps/unix/sysv/linux/s390/bits/shm.h: Likewise. + * sysdeps/unix/sysv/linux/hppa/bits/shm.h: Likewise. + * sysdeps/unix/sysv/linux/x86_64/bits/shm.h: Likewise. + * sysdeps/unix/sysv/linux/alpha/bits/shm.h: Likewise. + * sysdeps/unix/sysv/linux/bits/shm.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/bits/shm.h: Likewise. + +2005-11-17 Steven Munroe <sjmunroe@us.ibm.com> + + [BZ #1877] + * string/test-strncmp.c (do_test_limit): Handle zero length and + non-zero align values. + (test_main): Correct do_test_limit tests for 64-bit. + +2005-11-15 Steven Munroe <sjmunroe@us.ibm.com> + + * sysdeps/powerpc/sysdep.h (PPC_FEATURE_HAS_SPE, + PPC_FEATURE_HAS_EFP_SINGLE, PPC_FEATURE_HAS_EFP_DOUBLE, + PPC_FEATURE_NO_TB, PPC_FEATURE_POWER4, PPC_FEATURE_POWER5, + PPC_FEATURE_POWER5_PLUS, PPC_FEATURE_CELL, PPC_FEATURE_970): + Define to match 2.6.15 kernel. + + * sysdeps/powerpc/fpu/e_sqrt.c: Remove dl-procinfo.h include. + * sysdeps/powerpc/fpu/e_sqrtf.c: Likewise. + * sysdeps/powerpc/fpu/w_sqrtf.c: Likewise. + +2005-11-17 Roland McGrath <roland@redhat.com> + + * elf/elf.h (R_PPC64_ADDR30): Renamed to R_PPC64_REL30. + +2005-11-17 Jakub Jelinek <jakub@redhat.com> + + * io/sys/stat.h (fstatat): If __REDIRECT_NTH isn't defined, + define fstatat to fstatat64. + +2005-11-17 Steven Munroe <sjmunroe@us.ibm.com> + + [BZ #1877] + * string/test-strncmp.c (do_test_limit): New function. + (do_test) Add cast to eliminate compiler warnings. + (do_random_tests) Add cast to eliminate compiler warnings. + (test_main) Add do_test_limit tests. + * sysdeps/powerpc/powerpc32/strncmp.S: Test length before unaligned + load. + * sysdeps/powerpc/powerpc64/strncmp.S: Likewise. + +2005-11-17 Ulrich Drepper <drepper@redhat.com> + + * include/resolv.h: Include <stdbool.h>. + Patch by Paul Brook. + + * io/sys/stat.h: Use __const not const in fstatat prototypes. + +2005-11-08 H.J. Lu <hongjiu.lu@intel.com> + + * sysdeps/wordsize-32/Makefile (CPPFLAGS-divdi3.c): Set to + -Din_divdi3_c. + * sysdeps/wordsize-32/symbol-hacks.h: Skip if in_divdi3_c is defined. + 2005-11-16 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/fchownat.c: Include string.h. @@ -2031,7 +2031,7 @@ typedef Elf32_Addr Elf32_Conflict; #define R_PPC64_SECTOFF_LO R_PPC_SECTOFF_LO #define R_PPC64_SECTOFF_HI R_PPC_SECTOFF_HI #define R_PPC64_SECTOFF_HA R_PPC_SECTOFF_HA -#define R_PPC64_ADDR30 37 /* word30 (S + A - P) >> 2 */ +#define R_PPC64_REL30 37 /* word30 (S + A - P) >> 2 */ #define R_PPC64_ADDR64 38 /* doubleword64 S + A */ #define R_PPC64_ADDR16_HIGHER 39 /* half16 #higher(S + A) */ #define R_PPC64_ADDR16_HIGHERA 40 /* half16 #highera(S + A) */ diff --git a/fedora/branch.mk b/fedora/branch.mk index 02a6a5fa8b..c65d6d075e 100644 --- a/fedora/branch.mk +++ b/fedora/branch.mk @@ -3,5 +3,5 @@ glibc-branch := fedora glibc-base := HEAD DIST_BRANCH := devel COLLECTION := dist-fc4 -fedora-sync-date := 2005-11-16 08:29 UTC -fedora-sync-tag := fedora-glibc-20051116T0829 +fedora-sync-date := 2005-11-19 19:59 UTC +fedora-sync-tag := fedora-glibc-20051119T1959 diff --git a/include/resolv.h b/include/resolv.h index 958fb957c6..189e4fb58b 100644 --- a/include/resolv.h +++ b/include/resolv.h @@ -8,6 +8,7 @@ } \ while (0) +#include <stdbool.h> #include <resolv/resolv.h> #ifdef _RESOLV_H_ @@ -46,7 +47,7 @@ extern void res_send_setqhook (res_send_qhook __hook); extern void res_send_setrhook (res_send_rhook __hook); extern int res_ourserver_p (const res_state __statp, const struct sockaddr_in6 *__inp); -extern void __res_iclose(res_state statp, bool free_addr); +extern void __res_iclose (res_state statp, bool free_addr); libc_hidden_proto (__res_ninit) libc_hidden_proto (__res_maybe_init) libc_hidden_proto (__res_nclose) diff --git a/io/sys/stat.h b/io/sys/stat.h index 87eca61275..03152990e7 100644 --- a/io/sys/stat.h +++ b/io/sys/stat.h @@ -233,15 +233,19 @@ extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2)); Relative path names are interpreted relative to FD unless FD is AT_FDCWD. */ # ifndef __USE_FILE_OFFSET64 -extern int fstatat (int __fd, const char *__file, struct stat *__buf, +extern int fstatat (int __fd, __const char *__file, struct stat *__buf, int __flag) __THROW __nonnull ((2, 3)); # else -extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__file, +# ifdef __REDIRECT_NTH +extern int __REDIRECT_NTH (fstatat, (int __fd, __const char *__file, struct stat *__buf, int __flag), fstatat64) __nonnull ((2, 3)); +# else +# define fstatat fstatat64 +# endif # endif -extern int fstatat64 (int __fd, const char *__file, struct stat64 *__buf, +extern int fstatat64 (int __fd, __const char *__file, struct stat64 *__buf, int __flag) __THROW __nonnull ((2, 3)); #endif @@ -446,15 +450,16 @@ __NTH (fstat64 (int __fd, struct stat64 *__statbuf)) { return __fxstat64 (_STAT_VER, __fd, __statbuf); } -# endif -# ifdef __USE_GNU +# ifdef __USE_GNU extern __inline__ int __NTH (fstatat64 (int __fd, __const char *__filename, struct stat64 *__statbuf, int __flag)) { return __fxstatat64 (_STAT_VER, __fd, __filename, __statbuf, __flag); } +# endif + # endif #endif diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 25feaaf6e5..1f9cbc7139 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,8 @@ +2005-11-17 Jakub Jelinek <jakub@redhat.com> + + * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put + a write barrier before writing libgcc_s_getcfa. + 2005-11-06 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/configure: Removed. diff --git a/nptl/sysdeps/pthread/unwind-forcedunwind.c b/nptl/sysdeps/pthread/unwind-forcedunwind.c index b0f8487086..9a38704aeb 100644 --- a/nptl/sysdeps/pthread/unwind-forcedunwind.c +++ b/nptl/sysdeps/pthread/unwind-forcedunwind.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>. @@ -56,6 +56,10 @@ pthread_cancel_init (void) libgcc_s_resume = resume; libgcc_s_personality = personality; libgcc_s_forcedunwind = forcedunwind; + /* Make sure libgcc_s_getcfa is written last. Otherwise, + pthread_cancel_init might return early even when the pointer the + caller is interested in is not initialized yet. */ + atomic_write_barrier (); libgcc_s_getcfa = getcfa; } diff --git a/nscd/aicache.c b/nscd/aicache.c index 992c6ef023..9b8a4e50f2 100644 --- a/nscd/aicache.c +++ b/nscd/aicache.c @@ -26,8 +26,15 @@ #include <time.h> #include <unistd.h> #include <sys/mman.h> -#include <dbg_log.h> -#include <nscd.h> +#ifdef HAVE_SENDFILE +# include <sys/sendfile.h> +#endif + +#include "dbg_log.h" +#include "nscd.h" +#ifdef HAVE_SENDFILE +# include <kernel-features.h> +#endif typedef enum nss_status (*nss_gethostbyname3_r) @@ -365,7 +372,30 @@ addhstaiX (struct database_dyn *db, int fd, request_header *req, wait. */ assert (fd != -1); - writeall (fd, &dataset->resp, total); +#ifdef HAVE_SENDFILE + if (__builtin_expect (db->mmap_used, 1)) + { + assert (db->wr_fd != -1); + assert ((char *) &dataset->resp > (char *) db->data); + assert ((char *) &dataset->resp - (char *) db->head + + total + <= (sizeof (struct database_pers_head) + + db->head->module * sizeof (ref_t) + + db->head->data_size)); + off_t off = (char *) &dataset->resp - (char *) db->head; + ssize_t written; + written = sendfile (fd, db->wr_fd, &off, total); +# ifndef __ASSUME_SENDFILE + if (written == -1 && errno == ENOSYS) + goto use_write; +# endif + } + else +# ifndef __ASSUME_SENDFILE + use_write: +# endif +#endif + writeall (fd, &dataset->resp, total); } goto out; diff --git a/nscd/connections.c b/nscd/connections.c index 376693ee71..f055642dcc 100644 --- a/nscd/connections.c +++ b/nscd/connections.c @@ -39,6 +39,9 @@ #include <sys/mman.h> #include <sys/param.h> #include <sys/poll.h> +#ifdef HAVE_SENDFILE +# include <sys/sendfile.h> +#endif #include <sys/socket.h> #include <sys/stat.h> #include <sys/un.h> @@ -46,6 +49,9 @@ #include "nscd.h" #include "dbg_log.h" #include "selinux.h" +#ifdef HAVE_SENDFILE +# include <kernel-features.h> +#endif /* Wrapper functions with error checking for standard functions. */ @@ -939,8 +945,33 @@ cannot handle old request version %d; current version is %d"), if (cached != NULL) { /* Hurray it's in the cache. */ - if (writeall (fd, cached->data, cached->recsize) - != cached->recsize + ssize_t nwritten; + +#ifdef HAVE_SENDFILE + if (db->mmap_used || !cached->notfound) + { + assert (db->wr_fd != -1); + assert ((char *) cached->data > (char *) db->data); + assert ((char *) cached->data - (char *) db->head + + cached->recsize + <= (sizeof (struct database_pers_head) + + db->head->module * sizeof (ref_t) + + db->head->data_size)); + off_t off = (char *) cached->data - (char *) db->head; + nwritten = sendfile (fd, db->wr_fd, &off, cached->recsize); +# ifndef __ASSUME_SENDFILE + if (nwritten == -1 && errno == ENOSYS) + goto use_write; +# endif + } + else +# ifndef __ASSUME_SENDFILE + use_write: +# endif +#endif + nwritten = writeall (fd, cached->data, cached->recsize); + + if (nwritten != cached->recsize && __builtin_expect (debug_level, 0) > 0) { /* We have problems sending the result. */ diff --git a/nscd/grpcache.c b/nscd/grpcache.c index 6543ef354d..fb043152c6 100644 --- a/nscd/grpcache.c +++ b/nscd/grpcache.c @@ -32,10 +32,17 @@ #include <string.h> #include <unistd.h> #include <sys/mman.h> +#ifdef HAVE_SENDFILE +# include <sys/sendfile.h> +#endif +#include <sys/socket.h> #include <stackinfo.h> #include "nscd.h" #include "dbg_log.h" +#ifdef HAVE_SENDFILE +# include <kernel-features.h> +#endif /* This is the standard reply in case the service is disabled. */ static const gr_response_header disabled = @@ -293,7 +300,29 @@ cache_addgr (struct database_dyn *db, int fd, request_header *req, unnecessarily let the receiver wait. */ assert (fd != -1); - written = writeall (fd, &dataset->resp, total); +#ifdef HAVE_SENDFILE + if (__builtin_expect (db->mmap_used, 1)) + { + assert (db->wr_fd != -1); + assert ((char *) &dataset->resp > (char *) db->data); + assert ((char *) &dataset->resp - (char *) db->head + + total + <= (sizeof (struct database_pers_head) + + db->head->module * sizeof (ref_t) + + db->head->data_size)); + off_t off = (char *) &dataset->resp - (char *) db->head; + written = sendfile (fd, db->wr_fd, &off, total); +# ifndef __ASSUME_SENDFILE + if (written == -1 && errno == ENOSYS) + goto use_write; +# endif + } + else +# ifndef __ASSUME_SENDFILE + use_write: +# endif +#endif + written = writeall (fd, &dataset->resp, total); } /* Add the record to the database. But only if it has not been diff --git a/nscd/hstcache.c b/nscd/hstcache.c index 29bce99819..29f14af66b 100644 --- a/nscd/hstcache.c +++ b/nscd/hstcache.c @@ -34,10 +34,16 @@ #include <arpa/inet.h> #include <arpa/nameser.h> #include <sys/mman.h> +#ifdef HAVE_SENDFILE +# include <sys/sendfile.h> +#endif #include <stackinfo.h> #include "nscd.h" #include "dbg_log.h" +#ifdef HAVE_SENDFILE +# include <kernel-features.h> +#endif /* This is the standard reply in case the service is disabled. */ @@ -328,7 +334,29 @@ cache_addhst (struct database_dyn *db, int fd, request_header *req, unnecessarily keep the receiver waiting. */ assert (fd != -1); - written = writeall (fd, &dataset->resp, total); +#ifdef HAVE_SENDFILE + if (__builtin_expect (db->mmap_used, 1)) + { + assert (db->wr_fd != -1); + assert ((char *) &dataset->resp > (char *) db->data); + assert ((char *) &dataset->resp - (char *) db->head + + total + <= (sizeof (struct database_pers_head) + + db->head->module * sizeof (ref_t) + + db->head->data_size)); + off_t off = (char *) &dataset->resp - (char *) db->head; + written = sendfile (fd, db->wr_fd, &off, total); +# ifndef __ASSUME_SENDFILE + if (written == -1 && errno == ENOSYS) + goto use_write; +# endif + } + else +# ifndef __ASSUME_SENDFILE + use_write: +# endif +#endif + written = writeall (fd, &dataset->resp, total); } /* Add the record to the database. But only if it has not been diff --git a/nscd/initgrcache.c b/nscd/initgrcache.c index bb6dee2b4e..eb03fc7a5d 100644 --- a/nscd/initgrcache.c +++ b/nscd/initgrcache.c @@ -26,8 +26,15 @@ #include <time.h> #include <unistd.h> #include <sys/mman.h> -#include <dbg_log.h> -#include <nscd.h> +#ifdef HAVE_SENDFILE +# include <sys/sendfile.h> +#endif + +#include "dbg_log.h" +#include "nscd.h" +#ifdef HAVE_SENDFILE +# include <kernel-features.h> +#endif #include "../nss/nsswitch.h" @@ -344,7 +351,29 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req, unnecessarily let the receiver wait. */ assert (fd != -1); - written = writeall (fd, &dataset->resp, total); +#ifdef HAVE_SENDFILE + if (__builtin_expect (db->mmap_used, 1)) + { + assert (db->wr_fd != -1); + assert ((char *) &dataset->resp > (char *) db->data); + assert ((char *) &dataset->resp - (char *) db->head + + total + <= (sizeof (struct database_pers_head) + + db->head->module * sizeof (ref_t) + + db->head->data_size)); + off_t off = (char *) &dataset->resp - (char *) db->head; + written = sendfile (fd, db->wr_fd, &off, total); +# ifndef __ASSUME_SENDFILE + if (written == -1 && errno == ENOSYS) + goto use_write; +# endif + } + else +# ifndef __ASSUME_SENDFILE + use_write: +# endif +#endif + written = writeall (fd, &dataset->resp, total); } diff --git a/nscd/nscd_gethst_r.c b/nscd/nscd_gethst_r.c index 70ee38b71f..9fa10e2740 100644 --- a/nscd/nscd_gethst_r.c +++ b/nscd/nscd_gethst_r.c @@ -328,8 +328,9 @@ nscd_gethst_r (const char *key, size_t keylen, request_type type, /* And finally read the aliases. */ if (addr_list == NULL) { - if ((size_t) __readall (sock, resultbuf->h_aliases[0], total_len) - == total_len) + if (total_len == 0 + || ((size_t) __readall (sock, resultbuf->h_aliases[0], total_len) + == total_len)) { retval = 0; *result = resultbuf; diff --git a/nscd/nscd_stat.c b/nscd/nscd_stat.c index c1d0bffe20..7f6bd1c83e 100644 --- a/nscd/nscd_stat.c +++ b/nscd/nscd_stat.c @@ -24,6 +24,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <sys/socket.h> #include <unistd.h> #include <libintl.h> diff --git a/nscd/pwdcache.c b/nscd/pwdcache.c index 6b25968f71..6f4b032d10 100644 --- a/nscd/pwdcache.c +++ b/nscd/pwdcache.c @@ -32,10 +32,17 @@ #include <time.h> #include <unistd.h> #include <sys/mman.h> +#ifdef HAVE_SENDFILE +# include <sys/sendfile.h> +#endif +#include <sys/socket.h> #include <stackinfo.h> #include "nscd.h" #include "dbg_log.h" +#ifdef HAVE_SENDFILE +# include <kernel-features.h> +#endif /* This is the standard reply in case the service is disabled. */ static const pw_response_header disabled = @@ -288,7 +295,29 @@ cache_addpw (struct database_dyn *db, int fd, request_header *req, unnecessarily let the receiver wait. */ assert (fd != -1); - written = writeall (fd, &dataset->resp, total); +#ifdef HAVE_SENDFILE + if (__builtin_expect (db->mmap_used, 1)) + { + assert (db->wr_fd != -1); + assert ((char *) &dataset->resp > (char *) db->data); + assert ((char *) &dataset->resp - (char *) db->head + + total + <= (sizeof (struct database_pers_head) + + db->head->module * sizeof (ref_t) + + db->head->data_size)); + off_t off = (char *) &dataset->resp - (char *) db->head; + written = sendfile (fd, db->wr_fd, &off, total); +# ifndef __ASSUME_SENDFILE + if (written == -1 && errno == ENOSYS) + goto use_write; +# endif + } + else +# ifndef __ASSUME_SENDFILE + use_write: +# endif +#endif + written = writeall (fd, &dataset->resp, total); } diff --git a/string/test-strncmp.c b/string/test-strncmp.c index 431b64d6af..5adf0eb311 100644 --- a/string/test-strncmp.c +++ b/string/test-strncmp.c @@ -86,6 +86,65 @@ do_one_test (impl_t *impl, const char *s1, const char *s2, size_t n, } static void +do_test_limit (size_t align1, size_t align2, size_t len, size_t n, int max_char, + int exp_result) +{ + size_t i, align_n; + char *s1, *s2; + + if (n == 0) + { + s1 = (char*)(buf1 + page_size); + s2 = (char*)(buf2 + page_size); + if (HP_TIMING_AVAIL) + printf ("Length %4zd/%4zd:", len, n); + + FOR_EACH_IMPL (impl, 0) + do_one_test (impl, s1, s2, n, 0); + + if (HP_TIMING_AVAIL) + putchar ('\n'); + + return; + } + + align1 &= 15; + align2 &= 15; + align_n = (page_size - n) & 15; + + s1 = (char*)(buf1 + page_size - n); + s2 = (char*)(buf2 + page_size - n); + + if (align1 < align_n) + s1 -= (align_n - align1); + + if (align2 < align_n) + s2 -= (align_n - align2); + + for (i = 0; i < n; i++) + s1[i] = s2[i] = 1 + 23 * i % max_char; + + if (len < n) + { + s1[len] = 0; + s2[len] = 0; + if (exp_result < 0) + s2[len] = 32; + else if (exp_result > 0) + s1[len] = 64; + } + + if (HP_TIMING_AVAIL) + printf ("Length %4zd/%4zd, alignment %2zd/%2zd:", len, n, align1, align2); + + FOR_EACH_IMPL (impl, 0) + do_one_test (impl, s1, s2, n, exp_result); + + if (HP_TIMING_AVAIL) + putchar ('\n'); +} + +static void do_test (size_t align1, size_t align2, size_t len, size_t n, int max_char, int exp_result) { @@ -103,8 +162,8 @@ do_test (size_t align1, size_t align2, size_t len, size_t n, int max_char, if (align2 + n + 1 >= page_size) return; - s1 = buf1 + align1; - s2 = buf2 + align2; + s1 = (char*)(buf1 + align1); + s2 = (char*)(buf2 + align2); for (i = 0; i < n; i++) s1[i] = s2[i] = 1 + 23 * i % max_char; @@ -124,7 +183,7 @@ do_test (size_t align1, size_t align2, size_t len, size_t n, int max_char, printf ("Length %4zd/%4zd, alignment %2zd/%2zd:", len, n, align1, align2); FOR_EACH_IMPL (impl, 0) - do_one_test (impl, s1, s2, n, exp_result); + do_one_test (impl, (char*)s1, (char*)s2, n, exp_result); if (HP_TIMING_AVAIL) putchar ('\n'); @@ -208,7 +267,7 @@ do_random_tests (void) FOR_EACH_IMPL (impl, 1) { - r = CALL (impl, p1 + align1, p2 + align2, size); + r = CALL (impl, (char*)(p1 + align1), (char*)(p2 + align2), size); /* Test whether on 64-bit architectures where ABI requires callee to promote has the promotion been done. */ asm ("" : "=g" (r) : "0" (r)); @@ -271,6 +330,24 @@ test_main (void) do_test (2 * i, i, 8 << i, 16 << i, 255, 0); do_test (2 * i, i, 8 << i, 16 << i, 255, 1); } + + do_test_limit (0, 0, 0, 0, 127, 0); + do_test_limit (4, 0, 21, 20, 127, 0); + do_test_limit (0, 4, 21, 20, 127, 0); + do_test_limit (8, 0, 25, 24, 127, 0); + do_test_limit (0, 8, 25, 24, 127, 0); + + for (i = 0; i < 8; ++i) + { + do_test_limit (0, 0, 17 - i, 16 - i, 127, 0); + do_test_limit (0, 0, 17 - i, 16 - i, 255, 0); + do_test_limit (0, 0, 15 - i, 16 - i, 127, 0); + do_test_limit (0, 0, 15 - i, 16 - i, 127, 1); + do_test_limit (0, 0, 15 - i, 16 - i, 127, -1); + do_test_limit (0, 0, 15 - i, 16 - i, 255, 0); + do_test_limit (0, 0, 15 - i, 16 - i, 255, 1); + do_test_limit (0, 0, 15 - i, 16 - i, 255, -1); + } do_random_tests (); return ret; diff --git a/sysdeps/generic/futimesat.c b/sysdeps/generic/futimesat.c index 33d170862a..74ccd876e6 100644 --- a/sysdeps/generic/futimesat.c +++ b/sysdeps/generic/futimesat.c @@ -30,18 +30,14 @@ futimesat (fd, file, tvp) const char *file; const struct timeval tvp[2]; { - if (fd < 0 && fd != AT_FDCWD) + if (fd < 0 + && (file == NULL + || (fd != AT_FDCWD && file[0] != '/'))) { __set_errno (EBADF); return -1; } - if (file == NULL) - { - __set_errno (EINVAL); - return -1; - } - __set_errno (ENOSYS); return -1; } diff --git a/sysdeps/powerpc/fpu/e_sqrt.c b/sysdeps/powerpc/fpu/e_sqrt.c index eb9984d0a1..e6ba1f979f 100644 --- a/sysdeps/powerpc/fpu/e_sqrt.c +++ b/sysdeps/powerpc/fpu/e_sqrt.c @@ -24,7 +24,6 @@ #include <sysdep.h> #include <ldsodefs.h> -#include <dl-procinfo.h> static const double almost_half = 0.5000000000000001; /* 0.5 + 2^-53 */ static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; diff --git a/sysdeps/powerpc/fpu/e_sqrtf.c b/sysdeps/powerpc/fpu/e_sqrtf.c index 9b701012af..335935bb18 100644 --- a/sysdeps/powerpc/fpu/e_sqrtf.c +++ b/sysdeps/powerpc/fpu/e_sqrtf.c @@ -24,7 +24,6 @@ #include <sysdep.h> #include <ldsodefs.h> -#include <dl-procinfo.h> static const float almost_half = 0.50000006; /* 0.5 + 2^-24 */ static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; diff --git a/sysdeps/powerpc/fpu/w_sqrtf.c b/sysdeps/powerpc/fpu/w_sqrtf.c index e3f3c995e8..54b4f3be7f 100644 --- a/sysdeps/powerpc/fpu/w_sqrtf.c +++ b/sysdeps/powerpc/fpu/w_sqrtf.c @@ -23,7 +23,6 @@ #include <sysdep.h> #include <ldsodefs.h> -#include <dl-procinfo.h> #ifdef __STDC__ float diff --git a/sysdeps/powerpc/powerpc32/fpu/s_lround.S b/sysdeps/powerpc/powerpc32/fpu/s_lround.S index a85743164c..4f543eb269 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_lround.S +++ b/sysdeps/powerpc/powerpc32/fpu/s_lround.S @@ -79,7 +79,6 @@ ENTRY (__lround) b .L9 END (__lround) -strong_alias (__lround, __lround) weak_alias (__lround, lround) strong_alias (__lround, __lroundf) diff --git a/sysdeps/powerpc/powerpc32/strncmp.S b/sysdeps/powerpc/powerpc32/strncmp.S index 3b33bb921f..3e0fff5ac2 100644 --- a/sysdeps/powerpc/powerpc32/strncmp.S +++ b/sysdeps/powerpc/powerpc32/strncmp.S @@ -47,6 +47,7 @@ EALIGN (BP_SYM(strncmp), 4, 0) lis r7F7F, 0x7f7f dcbt 0,rSTR2 clrlwi. rTMP, rTMP, 30 + cmplwi cr1, rN, 0 lis rFEFE, -0x101 bne L(unaligned) /* We are word alligned so set up for two loops. first a word @@ -54,7 +55,8 @@ EALIGN (BP_SYM(strncmp), 4, 0) srwi. rTMP, rN, 2 clrlwi rN, rN, 30 addi rFEFE, rFEFE, -0x101 - addi r7F7F, r7F7F, 0x7f7f + addi r7F7F, r7F7F, 0x7f7f + cmplwi cr1, rN, 0 beq L(unaligned) mtctr rTMP /* Power4 wants mtctr 1st in dispatch group. */ @@ -122,16 +124,19 @@ L(tail): addi rSTR1, rSTR1, 4 bne- cr1, L(different) addi rSTR2, rSTR2, 4 + cmplwi cr1, rN, 0 L(unaligned): mtctr rN /* Power4 wants mtctr 1st in dispatch group */ - cmpwi rN,0 - lbz rWORD1, 0(rSTR1) - lbz rWORD2, 0(rSTR2) - bgt L(u1) + bgt cr1, L(uz) L(ux): li rRTN, 0 blr - + .align 4 +L(uz): + lbz rWORD1, 0(rSTR1) + lbz rWORD2, 0(rSTR2) + nop + b L(u1) L(u0): lbzu rWORD2, 1(rSTR2) L(u1): diff --git a/sysdeps/powerpc/powerpc64/strncmp.S b/sysdeps/powerpc/powerpc64/strncmp.S index 04bdc2f606..34479e2e91 100644 --- a/sysdeps/powerpc/powerpc64/strncmp.S +++ b/sysdeps/powerpc/powerpc64/strncmp.S @@ -48,6 +48,7 @@ EALIGN (BP_SYM(strncmp), 4, 0) lis r7F7F, 0x7f7f dcbt 0,rSTR2 clrldi. rTMP, rTMP, 61 + cmpldi cr1, rN, 0 lis rFEFE, -0x101 bne L(unaligned) /* We are doubleword alligned so set up for two loops. first a double word @@ -55,7 +56,8 @@ EALIGN (BP_SYM(strncmp), 4, 0) srdi. rTMP, rN, 3 clrldi rN, rN, 61 addi rFEFE, rFEFE, -0x101 - addi r7F7F, r7F7F, 0x7f7f + addi r7F7F, r7F7F, 0x7f7f + cmpldi cr1, rN, 0 beq L(unaligned) mtctr rTMP /* Power4 wants mtctr 1st in dispatch group. */ @@ -126,16 +128,19 @@ L(tail): addi rSTR1, rSTR1, 8 bne- cr1, L(different) addi rSTR2, rSTR2, 8 + cmpldi cr1, rN, 0 L(unaligned): mtctr rN /* Power4 wants mtctr 1st in dispatch group */ - cmpdi rN,0 - lbz rWORD1, 0(rSTR1) - lbz rWORD2, 0(rSTR2) - bgt L(u1) + bgt cr1, L(uz) L(ux): li rRTN, 0 blr - + .align 4 +L(uz): + lbz rWORD1, 0(rSTR1) + lbz rWORD2, 0(rSTR2) + nop + b L(u1) L(u0): lbzu rWORD2, 1(rSTR2) L(u1): diff --git a/sysdeps/powerpc/sysdep.h b/sysdeps/powerpc/sysdep.h index fb668ad51f..296231f655 100644 --- a/sysdeps/powerpc/sysdep.h +++ b/sysdeps/powerpc/sysdep.h @@ -29,6 +29,15 @@ #define PPC_FEATURE_HAS_MMU 0x04000000 /* Memory Management Unit. */ #define PPC_FEATURE_HAS_4xxMAC 0x02000000 /* 4xx Multiply Accumulator. */ #define PPC_FEATURE_UNIFIED_CACHE 0x01000000 /* Unified I/D cache. */ +#define PPC_FEATURE_HAS_SPE 0x00800000 +#define PPC_FEATURE_HAS_EFP_SINGLE 0x00400000 +#define PPC_FEATURE_HAS_EFP_DOUBLE 0x00200000 +#define PPC_FEATURE_NO_TB 0x00100000 /* 601/403gx have no timebase */ +#define PPC_FEATURE_POWER4 0x00080000 /* POWER4 microarch level */ +#define PPC_FEATURE_POWER5 0x00040000 /* POWER5 microarch level */ +#define PPC_FEATURE_POWER5_PLUS 0x00020000 /* POWER5+ microarch level */ +#define PPC_FEATURE_CELL 0x00010000 /* CELL PU microarch level */ +#define PPC_FEATURE_970 (PPC_FEATURE_POWER4 + PPC_FEATURE_HAS_ALTIVEC) #ifdef __ASSEMBLER__ diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index c5e1da03e9..b2bbbc0b28 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -152,6 +152,11 @@ CFLAGS-mq_receive.c += -fexceptions endif ifeq ($(subdir),nscd) -CFLAGS-connections.c += -DHAVE_EPOLL +CFLAGS-connections.c += -DHAVE_EPOLL -DHAVE_SENDFILE +CFLAGS-pwdcache.c += -DHAVE_SENDFILE +CFLAGS-grpcache.c += -DHAVE_SENDFILE +CFLAGS-hstcache.c += -DHAVE_SENDFILE +CFLAGS-aicache.c += -DHAVE_SENDFILE +CFLAGS-initgrcache.c += -DHAVE_SENDFILE CFLAGS-gai.c += -DNEED_NETLINK endif diff --git a/sysdeps/unix/sysv/linux/alpha/bits/shm.h b/sysdeps/unix/sysv/linux/alpha/bits/shm.h index bbee434ea0..35226c16ce 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/shm.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/shm.h @@ -71,6 +71,7 @@ struct shmid_ds # define SHM_DEST 01000 /* segment will be destroyed on last detach */ # define SHM_LOCKED 02000 /* segment will not be swapped */ # define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */ +# define SHM_NORESERVE 010000 /* don't check for reservations */ struct shminfo { diff --git a/sysdeps/unix/sysv/linux/bits/shm.h b/sysdeps/unix/sysv/linux/bits/shm.h index 225b89db2d..318d601aed 100644 --- a/sysdeps/unix/sysv/linux/bits/shm.h +++ b/sysdeps/unix/sysv/linux/bits/shm.h @@ -73,6 +73,7 @@ struct shmid_ds # define SHM_DEST 01000 /* segment will be destroyed on last detach */ # define SHM_LOCKED 02000 /* segment will not be swapped */ # define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */ +# define SHM_NORESERVE 010000 /* don't check for reservations */ struct shminfo { diff --git a/sysdeps/unix/sysv/linux/futimesat.c b/sysdeps/unix/sysv/linux/futimesat.c index 7ab0477c5e..8a87cc442b 100644 --- a/sysdeps/unix/sysv/linux/futimesat.c +++ b/sysdeps/unix/sysv/linux/futimesat.c @@ -37,7 +37,22 @@ futimesat (fd, file, tvp) { char *buf = NULL; - if (fd != AT_FDCWD && file[0] != '/') + if (file == NULL) + { + static const char procfd[] = "/proc/self/fd/%d"; + /* Buffer for the path name we are going to use. It consists of + - the string /proc/self/fd/ + - the file descriptor number. + The final NUL is included in the sizeof. A bit of overhead + due to the format elements compensates for possible negative + numbers. */ + size_t buflen = sizeof (procfd) + sizeof (int) * 3; + buf = alloca (buflen); + + __snprintf (buf, buflen, procfd, fd); + file = buf; + } + else if (fd != AT_FDCWD && file[0] != '/') { size_t filelen = strlen (file); static const char procfd[] = "/proc/self/fd/%d/%s"; diff --git a/sysdeps/unix/sysv/linux/hppa/bits/shm.h b/sysdeps/unix/sysv/linux/hppa/bits/shm.h index 1c022fda83..a91f1f575b 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/shm.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/shm.h @@ -79,6 +79,7 @@ struct shmid_ds # define SHM_DEST 01000 /* segment will be destroyed on last detach */ # define SHM_LOCKED 02000 /* segment will not be swapped */ # define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */ +# define SHM_NORESERVE 010000 /* don't check for reservations */ struct shminfo { diff --git a/sysdeps/unix/sysv/linux/ia64/bits/shm.h b/sysdeps/unix/sysv/linux/ia64/bits/shm.h index 078345d7e6..7f38f2dd7b 100644 --- a/sysdeps/unix/sysv/linux/ia64/bits/shm.h +++ b/sysdeps/unix/sysv/linux/ia64/bits/shm.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002, 2005 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 @@ -38,6 +38,8 @@ /* Segment low boundary address multiple. */ #define SHMLBA (1024 * 1024) +/* Type to count number of attaches. */ +typedef unsigned long int shmatt_t; /* Data structure describing a set of semaphores. */ struct shmid_ds @@ -49,7 +51,7 @@ struct shmid_ds __time_t shm_ctime; /* time of last change by shmctl() */ __pid_t shm_cpid; /* pid of creator */ __pid_t shm_lpid; /* pid of last shmop */ - unsigned long int shm_nattch; /* number of current attaches */ + shmatt_t shm_nattch; /* number of current attaches */ unsigned long int __unused1; unsigned long int __unused2; }; @@ -64,6 +66,7 @@ struct shmid_ds # define SHM_DEST 01000 /* segment will be destroyed on last detach */ # define SHM_LOCKED 02000 /* segment will not be swapped */ # define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */ +# define SHM_NORESERVE 010000 /* don't check for reservations */ struct shminfo { diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h index 002cc46c79..44ac727820 100644 --- a/sysdeps/unix/sysv/linux/kernel-features.h +++ b/sysdeps/unix/sysv/linux/kernel-features.h @@ -84,6 +84,11 @@ # define __ASSUME_MSG_NOSIGNAL 1 #endif +/* The sendfile syscall was introduced in 2.2.0. */ +#if __LINUX_KERNEL_VERSION >= 131584 +# define __ASSUME_SENDFILE 1 +#endif + /* On x86 another `getrlimit' syscall was added in 2.3.25. */ #if __LINUX_KERNEL_VERSION >= 131865 && defined __i386__ # define __ASSUME_NEW_GETRLIMIT_SYSCALL 1 diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h index 815a3da88f..6e7bdc99dd 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/mman.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/m68k version. - Copyright (C) 1997, 2003 Free Software Foundation, Inc. + Copyright (C) 1997, 2000, 2003, 2005 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 @@ -78,6 +78,7 @@ /* Flags for `mremap'. */ #ifdef __USE_GNU # define MREMAP_MAYMOVE 1 +# define MREMAP_FIXED 2 #endif /* Advice to `madvise'. */ diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/shm.h b/sysdeps/unix/sysv/linux/powerpc/bits/shm.h index 7705fb64d4..62560c0caf 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/shm.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/shm.h @@ -80,9 +80,10 @@ struct shmid_ds # define SHM_INFO 14 /* shm_mode upper byte flags */ -# define SHM_DEST 01000 /* segment will be destroyed on last detach */ -# define SHM_LOCKED 02000 /* segment will not be swapped */ +# define SHM_DEST 01000 /* segment will be destroyed on last detach */ +# define SHM_LOCKED 02000 /* segment will not be swapped */ # define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */ +# define SHM_NORESERVE 010000 /* don't check for reservations */ struct shminfo { diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/socket.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/socket.S index 72170c95c0..3e4a188a20 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/socket.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/socket.S @@ -44,7 +44,11 @@ #define stackblock 20 #ifndef __socket -#define __socket P(__,socket) +# ifndef NO_WEAK_ALIAS +# define __socket P(__,socket) +# else +# define __socket socket +# endif #endif .text @@ -114,4 +118,6 @@ ENTRY(__socket) PSEUDO_END (__socket) +#ifndef NO_WEAK_ALIAS weak_alias (__socket, socket) +#endif diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S index ec3ab5d9e6..a73f7be666 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S @@ -41,12 +41,12 @@ #define stackblock 80 /* offset to socket parm area. */ -#ifndef socket -/* If this is just socket.S leave it alone! */ -#else #ifndef __socket -#define __socket P(__,socket) -#endif +# ifndef NO_WEAK_ALIAS +# define __socket P(__,socket) +# else +# define __socket socket +# endif #endif .text @@ -120,4 +120,6 @@ ENTRY(__socket) cfi_endproc PSEUDO_END (__socket) +#ifndef NO_WEAK_ALIAS weak_alias (__socket, socket) +#endif diff --git a/sysdeps/unix/sysv/linux/s390/bits/shm.h b/sysdeps/unix/sysv/linux/s390/bits/shm.h index b7c2ad0514..d88ed36efa 100644 --- a/sysdeps/unix/sysv/linux/s390/bits/shm.h +++ b/sysdeps/unix/sysv/linux/s390/bits/shm.h @@ -80,6 +80,7 @@ struct shmid_ds # define SHM_DEST 01000 /* segment will be destroyed on last detach */ # define SHM_LOCKED 02000 /* segment will not be swapped */ # define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */ +# define SHM_NORESERVE 010000 /* don't check for reservations */ struct shminfo { diff --git a/sysdeps/unix/sysv/linux/sparc/bits/shm.h b/sysdeps/unix/sysv/linux/sparc/bits/shm.h index f075be8d8a..03decb110c 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/shm.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/shm.h @@ -81,6 +81,7 @@ struct shmid_ds # define SHM_DEST 01000 /* segment will be destroyed on last detach */ # define SHM_LOCKED 02000 /* segment will not be swapped */ # define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */ +# define SHM_NORESERVE 010000 /* don't check for reservations */ struct shminfo { diff --git a/sysdeps/unix/sysv/linux/unlinkat.c b/sysdeps/unix/sysv/linux/unlinkat.c index 36c0215b48..821029f5e5 100644 --- a/sysdeps/unix/sysv/linux/unlinkat.c +++ b/sysdeps/unix/sysv/linux/unlinkat.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* unlinkat -- Remove a link by relative name. + Copyright (C) 2005 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 @@ -20,7 +21,9 @@ #include <fcntl.h> #include <stddef.h> #include <stdio.h> +#include <stdlib.h> #include <string.h> +#include <sysdep.h> #include <unistd.h> @@ -51,7 +54,7 @@ unlinkat (fd, file, flag) due to the format elements compensates for possible negative numbers. */ size_t buflen = sizeof (procfd) + sizeof (int) * 3 + filelen; - buf = alloca (buflen); + buf = __alloca (buflen); __snprintf (buf, buflen, procfd, fd, file); file = buf; diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/shm.h b/sysdeps/unix/sysv/linux/x86_64/bits/shm.h index 4282d75617..3d8c05d212 100644 --- a/sysdeps/unix/sysv/linux/x86_64/bits/shm.h +++ b/sysdeps/unix/sysv/linux/x86_64/bits/shm.h @@ -80,6 +80,7 @@ struct shmid_ds # define SHM_DEST 01000 /* segment will be destroyed on last detach */ # define SHM_LOCKED 02000 /* segment will not be swapped */ # define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */ +# define SHM_NORESERVE 010000 /* don't check for reservations */ struct shminfo { diff --git a/sysdeps/wordsize-32/Makefile b/sysdeps/wordsize-32/Makefile index b50c0b1635..82beac44ed 100644 --- a/sysdeps/wordsize-32/Makefile +++ b/sysdeps/wordsize-32/Makefile @@ -2,5 +2,6 @@ ifeq ($(subdir),csu) ifeq (yes,$(build-shared)) sysdep_routines += divdi3 shared-only-routines += divdi3 +CPPFLAGS-divdi3.c = -Din_divdi3_c endif endif diff --git a/sysdeps/wordsize-32/symbol-hacks.h b/sysdeps/wordsize-32/symbol-hacks.h index ee53e1257f..c167cb9472 100644 --- a/sysdeps/wordsize-32/symbol-hacks.h +++ b/sysdeps/wordsize-32/symbol-hacks.h @@ -22,7 +22,7 @@ therefore we get PLTs. Unnecessarily so. Changing gcc is a big task which might not be worth it so we play tricks with the assembler. */ -#if !defined __ASSEMBLER__ && !defined NOT_IN_libc && defined SHARED +#if !defined __ASSEMBLER__ && !defined in_divdi3_c && !defined NOT_IN_libc && defined SHARED asm ("__divdi3 = __divdi3_internal"); asm ("__udivdi3 = __udivdi3_internal"); asm ("__moddi3 = __moddi3_internal"); |