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.
* 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.
#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'
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;
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,
free (host_buffer.buf);
return status;
}
+hidden_def (_nss_dns_gethostbyname3_r)
enum nss_status
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;
}