* hurd/hurdrlimit.c (init_rlimit): Give the RLIMIT_NOFILE soft limit
authorRoland McGrath <roland@gnu.org>
Sun, 26 Mar 2000 19:17:23 +0000 (19:17 +0000)
committerRoland McGrath <roland@gnu.org>
Sun, 26 Mar 2000 19:17:23 +0000 (19:17 +0000)
an initial value of 1024 instead of RLIM_INFINITY.

* Versions.def (libmachuser, libhurduser): Remove these sections,
since these libraries do not presently use symbol versions.

* sysdeps/mach/hurd/getdtsz.c (__getdtablesize): If the resource limit
is RLIM_INFINITY, return -1 instead.

ChangeLog
Versions.def
sysdeps/mach/hurd/getdtsz.c

index 795c6b79044df3c6c76dd175def7e7e207271014..86ff40ddda61b18a98da2b9206c30bd418887fef 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2000-03-26  Roland McGrath  <roland@baalperazim.frob.com>
+
+       * hurd/hurdrlimit.c (init_rlimit): Give the RLIMIT_NOFILE soft limit
+       an initial value of 1024 instead of RLIM_INFINITY.
+
+       * Versions.def (libmachuser, libhurduser): Remove these sections,
+       since these libraries do not presently use symbol versions.
+
+       * sysdeps/mach/hurd/getdtsz.c (__getdtablesize): If the resource limit
+       is RLIM_INFINITY, return -1 instead.
+
 2000-03-24  Andreas Jaeger  <aj@suse.de>
 
        * Makefile (postclean): Added soversions.i.
index b038115fdb60388a992eb0d6a08d735fbbcf3ce5..31674d4bc30e8193c70170c82c15203453d910c0 100644 (file)
@@ -22,17 +22,11 @@ libdl {
   GLIBC_2.0
   GLIBC_2.1
 }
-libhurduser {
-  GLIBC_2.0
-}
 libm {
   GLIBC_2.0
   GLIBC_2.1
   GLIBC_2.2
 }
-libmachuser {
-  GLIBC_2.0
-}
 libnsl {
   GLIBC_2.0
   GLIBC_2.1
index 572ac5fd0ead60964cebb74c5151434677ff507b..f99f0c11ea9e26fe5358a451df9cd3641edeea26 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 93, 94, 95, 97 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,93,94,95,97,2000 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
 int
 __getdtablesize ()
 {
-  int size;
+  rlim_t limit;
+
   HURD_CRITICAL_BEGIN;
   __mutex_lock (&_hurd_rlimit_lock);
-  size = _hurd_rlimits[RLIMIT_NOFILE].rlim_cur;
+  limit = _hurd_rlimits[RLIMIT_NOFILE].rlim_cur;
   __mutex_unlock (&_hurd_rlimit_lock);
   HURD_CRITICAL_END;
-  return size;
+
+  /* RLIM_INFINITY is not meaningful to our caller.  -1 is a good choice
+     because `sysconf (_SC_OPEN_MAX)' calls us, and -1 from sysconf means
+     "no determinable limit".  */
+  return limit == RLIM_INFINITY ? -1 : (int) limit;
 }
 
 weak_alias (__getdtablesize, getdtablesize)