From: Ulrich Drepper Date: Sun, 24 Oct 2004 23:02:46 +0000 (+0000) Subject: Update. X-Git-Tag: upstream/2.30~17267 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=78d8d2117bcb9b5926a2af189bdf4bced4deb982;p=external%2Fglibc.git Update. * resolv/nss_dns/dns-host.c: Avoid using PLTs. --- diff --git a/ChangeLog b/ChangeLog index a9427a3..1366284 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2004-10-24 Ulrich Drepper + * resolv/nss_dns/dns-host.c: Avoid using PLTs. * include/libc-symbols.h: Define hidden attribute macros for libnss_nisplus and libutil. * include/utmp.h: Add libutil_hidden_proto for login_tty. @@ -10,7 +11,6 @@ * include/rpcsvc/yp.h: New file. * include/rpcsvc/ypclnt.h: New file. * include/rpcsvc/ypupd.h: New file. - * include/libc-symbols.h: Define hidden attribute macros for libnsl. * include/rpcsvc/nislib.h: Use libnsl_hidden_proto for various functions. diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 1e66f8f..3d6bd03 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,8 @@ +2004-10-24 Ulrich Drepper + + * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use + not-cancelable I/O functions. + 2004-10-21 Kaz Kojima * sysdeps/unix/sysv/linux/sh/lowlevellock.S diff --git a/nptl/sysdeps/unix/sysv/linux/smp.h b/nptl/sysdeps/unix/sysv/linux/smp.h index 718fab6..c1160a7 100644 --- a/nptl/sysdeps/unix/sysv/linux/smp.h +++ b/nptl/sysdeps/unix/sysv/linux/smp.h @@ -20,6 +20,7 @@ #include #include #include +#include /* Test whether the machine has more than one processor. This is not the best test but good enough. More complicated tests would require `malloc' @@ -37,13 +38,13 @@ is_smp_system (void) buf, &reslen, NULL, 0) < 0) { /* This was not successful. Now try reading the /proc filesystem. */ - int fd = __open ("/proc/sys/kernel/version", O_RDONLY); + int fd = open_not_cancel_2 ("/proc/sys/kernel/version", O_RDONLY); if (__builtin_expect (fd, 0) == -1 - || (reslen = __read (fd, buf, sizeof (buf))) <= 0) + || (reslen = read_not_cancel (fd, buf, sizeof (buf))) <= 0) /* This also didn't work. We give up and say it's a UP machine. */ buf[0] = '\0'; - __close (fd); + close_not_cancel_no_status (fd); } return strstr (buf, "SMP") != NULL; diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c index f6a2fa6..7045c59 100644 --- a/resolv/nss_dns/dns-host.c +++ b/resolv/nss_dns/dns-host.c @@ -127,6 +127,14 @@ static enum nss_status getanswer_r (const querybuf *answer, int anslen, size_t buflen, int *errnop, int *h_errnop, int map, int32_t *ttlp, char **canonp); +extern enum nss_status _nss_dns_gethostbyname3_r (const char *name, int af, + struct hostent *result, + char *buffer, size_t buflen, + int *errnop, int *h_errnop, + int32_t *ttlp, + char **canonp); +hidden_proto (_nss_dns_gethostbyname3_r) + enum nss_status _nss_dns_gethostbyname3_r (const char *name, int af, struct hostent *result, char *buffer, size_t buflen, int *errnop, @@ -216,6 +224,7 @@ _nss_dns_gethostbyname3_r (const char *name, int af, struct hostent *result, free (host_buffer.buf); return status; } +hidden_def (_nss_dns_gethostbyname3_r) enum nss_status @@ -236,11 +245,11 @@ _nss_dns_gethostbyname_r (const char *name, struct hostent *result, enum nss_status status = NSS_STATUS_NOTFOUND; if (_res.options & RES_USE_INET6) - status = _nss_dns_gethostbyname2_r (name, AF_INET6, result, buffer, - buflen, errnop, h_errnop); + status = _nss_dns_gethostbyname3_r (name, AF_INET6, result, buffer, + buflen, errnop, h_errnop, NULL, NULL); if (status == NSS_STATUS_NOTFOUND) - status = _nss_dns_gethostbyname2_r (name, AF_INET, result, buffer, - buflen, errnop, h_errnop); + status = _nss_dns_gethostbyname3_r (name, AF_INET, result, buffer, + buflen, errnop, h_errnop, NULL, NULL); return status; }