about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--nptl/ChangeLog5
-rw-r--r--nptl/sysdeps/unix/sysv/linux/smp.h7
-rw-r--r--resolv/nss_dns/dns-host.c17
4 files changed, 23 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index a9427a3505..1366284ef1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
 
+	* 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 1e66f8f9f6..3d6bd03cf8 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,8 @@
+2004-10-24  Ulrich Drepper  <drepper@redhat.com>
+
+	* sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
+	not-cancelable I/O functions.
+
 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
 
 	* 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 718fab683b..c1160a7939 100644
--- a/nptl/sysdeps/unix/sysv/linux/smp.h
+++ b/nptl/sysdeps/unix/sysv/linux/smp.h
@@ -20,6 +20,7 @@
 #include <fcntl.h>
 #include <string.h>
 #include <sys/sysctl.h>
+#include <not-cancel.h>
 
 /* 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 f6a2fa65d6..7045c5915b 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;
 }