Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update.
1999-08-02  Thorsten Kukuk  <kukuk@suse.de>

	* nis/nis_callback.c (internal_nis_do_callback) use poll()
	instead of select().

1999-08-02  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/generic/s_nextafter.c: Define __nexttoward and
	nexttoward so something else so that aliasing works.

1999-08-02  Thorsten Kukuk  <kukuk@suse.de>

	* sysdeps/generic/math_ldbl.h: Fix typo.
	* sysdeps/generic/strtold.c: Remove unbalanced #endif.
	* sysdeps/alpha/fpu/e_sqrt.c: Use new path for e_sqrt.c.

1999-08-02  Ulrich Drepper  <drepper@cygnus.com>

	* elf/resolvfail.c: Include stdio.h.  Also test dlerror.
  • Loading branch information
Ulrich Drepper committed Aug 2, 1999
1 parent ff5fad1 commit 249fd24
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 28 deletions.
20 changes: 20 additions & 0 deletions ChangeLog
@@ -1,3 +1,23 @@
1999-08-02 Thorsten Kukuk <kukuk@suse.de>

* nis/nis_callback.c (internal_nis_do_callback) use poll()
instead of select().

1999-08-02 Ulrich Drepper <drepper@cygnus.com>

* sysdeps/generic/s_nextafter.c: Define __nexttoward and
nexttoward so something else so that aliasing works.

1999-08-02 Thorsten Kukuk <kukuk@suse.de>

* sysdeps/generic/math_ldbl.h: Fix typo.
* sysdeps/generic/strtold.c: Remove unbalanced #endif.
* sysdeps/alpha/fpu/e_sqrt.c: Use new path for e_sqrt.c.

1999-08-02 Ulrich Drepper <drepper@cygnus.com>

* elf/resolvfail.c: Include stdio.h. Also test dlerror.

1999-08-01 Ulrich Drepper <drepper@cygnus.com>

* elf/Makefile (tests): Add resolvfail. Add rules to build the
Expand Down
8 changes: 3 additions & 5 deletions FAQ
Expand Up @@ -1048,14 +1048,12 @@ files. You don't necessarily need to recompile the GNU C library since the
only place where OPEN_MAX and FD_SETSIZE is really needed in the library
itself is the size of fd_set which is used by select.

The GNU C library is now (nearly) select free. This means it internally has
no limits imposed by the `fd_set' type. Instead almost all places where the
The GNU C library is now select free. This means it internally has no
limits imposed by the `fd_set' type. Instead all places where the
functionality is needed the `poll' function is used.

If you increase the number of file descriptors in the kernel you don't need
to recompile the C library. The remaining select calls are in the RPC code.
If your RPC daemons don't need more than FD_SETSIZE file descriptors, you
don't need to change anything at all.
to recompile the C library.

{UD} You can always get the maximum number of file descriptors a process is
allowed to have open at any time using
Expand Down
6 changes: 6 additions & 0 deletions elf/resolvfail.c
@@ -1,4 +1,5 @@
#include <dlfcn.h>
#include <stdio.h>

static const char obj[] = "testobj1.so";

Expand All @@ -20,6 +21,11 @@ main (void)
puts ("dlsym() did not fail");
return 1;
}
else if (dlerror () == NULL)
{
puts ("dlerror() didn't return a string");
return 1;
}

return 0;
}
41 changes: 21 additions & 20 deletions nis/nis_callback.c
@@ -1,6 +1,6 @@
/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
Expand All @@ -27,6 +27,7 @@
#include <string.h>
#include <memory.h>
#include <syslog.h>
#include <sys/poll.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
Expand Down Expand Up @@ -195,29 +196,29 @@ static nis_error
internal_nis_do_callback (struct dir_binding *bptr, netobj *cookie,
struct nis_cb *cb)
{
/* Default timeout can be changed using clnt_control() */
static struct timeval TIMEOUT = {25, 0};
#ifdef FD_SETSIZE
fd_set readfds;
#else
int readfds;
#endif /* def FD_SETSIZE */
struct timeval tv;
struct timeval TIMEOUT = {25, 0};
bool_t cb_is_running = FALSE;

data = cb;

for (;;)
{
#ifdef FD_SETSIZE
readfds = svc_fdset;
#else
readfds = svc_fds;
#endif /* def FD_SETSIZE */
tv.tv_sec = 25;
tv.tv_usec = 0;
switch (select (_rpc_dtablesize (), &readfds, NULL, NULL, &tv))
{
struct pollfd *my_pollfd;
int i;

if (svc_max_pollfd == 0 && svc_pollfd == NULL)
return NIS_CBERROR;

my_pollfd = malloc (sizeof (struct pollfd) * svc_max_pollfd);
for (i = 0; i < svc_max_pollfd; ++i)
{
my_pollfd[i].fd = svc_pollfd[i].fd;
my_pollfd[i].events = svc_pollfd[i].events;
my_pollfd[i].revents = 0;
}

switch (i = __poll (my_pollfd, svc_max_pollfd, 25*1000))
{
case -1:
if (errno == EINTR)
continue;
Expand All @@ -237,7 +238,7 @@ internal_nis_do_callback (struct dir_binding *bptr, netobj *cookie,
}
break;
default:
svc_getreqset (&readfds);
svc_getreq_poll (my_pollfd, i);
if (data->nomore)
return data->result;
}
Expand Down
2 changes: 1 addition & 1 deletion sysdeps/alpha/fpu/e_sqrt.c
Expand Up @@ -162,4 +162,4 @@ static double __full_ieee754_sqrt(double) __attribute__((unused));

#endif /* _IEEE_FP_INEXACT */

#include <sysdeps/libm-ieee754/e_sqrt.c>
#include <sysdeps/ieee754/dbl-64/e_sqrt.c>
2 changes: 1 addition & 1 deletion sysdeps/generic/math_ldbl.h
@@ -1,4 +1,4 @@
#ifndef _MATH_PRIVATE_H
#ifndef _MATH_PRIVATE_H_
#error "Never use <math_ldbl.h> directly; include <math_private.h> instead."
#endif

Expand Down
4 changes: 4 additions & 0 deletions sysdeps/generic/s_nextafter.c
Expand Up @@ -21,6 +21,10 @@ static char rcsid[] = "$NetBSD: s_nextafter.c,v 1.8 1995/05/10 20:47:58 jtc Exp
* Special cases:
*/

/* Ugly hack so that the aliasing works. */
#define __nexttoward __internal___nexttoward
#define nexttoward __internal_nexttoward

#include "math.h"
#include "math_private.h"

Expand Down
1 change: 0 additions & 1 deletion sysdeps/generic/strtold.c
Expand Up @@ -30,4 +30,3 @@ strtold (const char *nptr, char **endptr)
{
return __strtod_internal (nptr, endptr, 0);
}
#endif

0 comments on commit 249fd24

Please sign in to comment.