Update.
authorUlrich Drepper <drepper@redhat.com>
Mon, 9 Apr 2001 18:07:15 +0000 (18:07 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 9 Apr 2001 18:07:15 +0000 (18:07 +0000)
2001-04-09  Ulrich Drepper  <drepper@redhat.com>

* Makefile (distribute): Add scripts/documented.sh.
* scripts/documented.sh: New file.

ChangeLog
Makefile
README
README.template
manual/math.texi
manual/resource.texi
manual/startup.texi
scripts/documented.sh [new file with mode: 0644]
sysdeps/unix/sysv/linux/cris/setresgid.c [new file with mode: 0644]
sysdeps/unix/sysv/linux/cris/setresuid.c [new file with mode: 0644]

index 42f4f35..99451da 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-04-09  Ulrich Drepper  <drepper@redhat.com>
+
+       * Makefile (distribute): Add scripts/documented.sh.
+       * scripts/documented.sh: New file.
+
 2001-04-08  Hans-Peter Nilsson  <hp@axis.com>
 
        * sysdeps/unix/sysv/linux/cris/Dist: New file.
index 89e9078..6c920bc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -267,7 +267,7 @@ distribute  :=      README README.libm INSTALL FAQ FAQ.in NOTES NEWS BUGS   \
                            mkinstalldirs move-if-change install-sh     \
                            test-installation.pl gen-FAQ.pl versions.awk\
                            gen-sorted.awk abi-versions.awk             \
-                           firstversions.awk)
+                           firstversions.awk documented.sh)
 
 distribute := $(strip $(distribute))
 generated := $(generated) stubs.h
diff --git a/README b/README
index 43d17f2..99fa128 100644 (file)
--- a/README
+++ b/README
@@ -19,6 +19,8 @@ configurations:
                ia64-*-linux-gnu        Linux-2.x on ia64
                s390-*-linux-gnu        Linux-2.x on IBM S/390
                s390x-*-linux-gnu       Linux-2.x on IBM S/390 64-bit
+               sh-*-linux-gnu          Linux-2.x on Super Hitachi
+               cris-*-linux-gnu        Linux-2.4+ on CRIS
 
 Former releases of this library (version 1.09.1 and perhaps earlier
 versions) used to run on the following configurations:
index 014ce43..c399ba1 100644 (file)
@@ -19,6 +19,7 @@ configurations:
                ia64-*-linux-gnu        Linux-2.x on ia64
                s390-*-linux-gnu        Linux-2.x on IBM S/390
                s390x-*-linux-gnu       Linux-2.x on IBM S/390 64-bit
+               sh-*-linux-gnu          Linux-2.x on Super Hitachi
                cris-*-linux-gnu        Linux-2.4+ on CRIS
 
 Former releases of this library (version 1.09.1 and perhaps earlier
index 1ec5977..6eba775 100644 (file)
@@ -236,9 +236,9 @@ the implementation.)
 These functions return the complex sine of @var{z}.
 The mathematical definition of the complex sine is
 
-@ifinfo
+@ifnottex
 @math{sin (z) = 1/(2*i) * (exp (z*i) - exp (-z*i))}.
-@end ifinfo
+@end ifnottex
 @tex
 $$\sin(z) = {1\over 2i} (e^{zi} - e^{-zi})$$
 @end tex
@@ -256,9 +256,9 @@ $$\sin(z) = {1\over 2i} (e^{zi} - e^{-zi})$$
 These functions return the complex cosine of @var{z}.
 The mathematical definition of the complex cosine is
 
-@ifinfo
+@ifnottex
 @math{cos (z) = 1/2 * (exp (z*i) + exp (-z*i))}
-@end ifinfo
+@end ifnottex
 @tex
 $$\cos(z) = {1\over 2} (e^{zi} + e^{-zi})$$
 @end tex
@@ -276,9 +276,9 @@ $$\cos(z) = {1\over 2} (e^{zi} + e^{-zi})$$
 These functions return the complex tangent of @var{z}.
 The mathematical definition of the complex tangent is
 
-@ifinfo
+@ifnottex
 @math{tan (z) = -i * (exp (z*i) - exp (-z*i)) / (exp (z*i) + exp (-z*i))}
-@end ifinfo
+@end ifnottex
 @tex
 $$\tan(z) = -i \cdot {e^{zi} - e^{-zi}\over e^{zi} + e^{-zi}}$$
 @end tex
@@ -723,9 +723,9 @@ These functions return @code{e} (the base of natural
 logarithms) raised to the power of @var{z}.
 Mathematically, this corresponds to the value
 
-@ifinfo
+@ifnottex
 @math{exp (z) = exp (creal (z)) * (cos (cimag (z)) + I * sin (cimag (z)))}
-@end ifinfo
+@end ifnottex
 @tex
 $$\exp(z) = e^z = e^{{\rm Re}\,z} (\cos ({\rm Im}\,z) + i \sin ({\rm Im}\,z))$$
 @end tex
@@ -743,9 +743,9 @@ $$\exp(z) = e^z = e^{{\rm Re}\,z} (\cos ({\rm Im}\,z) + i \sin ({\rm Im}\,z))$$
 These functions return the natural logarithm of @var{z}.
 Mathematically, this corresponds to the value
 
-@ifinfo
+@ifnottex
 @math{log (z) = log (cabs (z)) + I * carg (z)}
-@end ifinfo
+@end ifnottex
 @tex
 $$\log(z) = \log |z| + i \arg z$$
 @end tex
@@ -769,9 +769,9 @@ or is very close to 0.  It is well-defined for all other values of
 These functions return the base 10 logarithm of the complex value
 @var{z}. Mathematically, this corresponds to the value
 
-@ifinfo
+@ifnottex
 @math{log (z) = log10 (cabs (z)) + I * carg (z)}
-@end ifinfo
+@end ifnottex
 @tex
 $$\log_{10}(z) = \log_{10}|z| + i \arg z$$
 @end tex
@@ -1411,6 +1411,64 @@ restore that state.
 If the function fails the return value is @code{NULL}.
 @end deftypefun
 
+The four functions described so far in this section all work on a state
+which is shared by all threads.  The state is not directly accessible to
+the user and can only be modified by these functions.  This makes it
+hard to deal with situations where each thread should have its own
+pseudo-random number generator.
+
+The GNU C library contains four additional functions which contain the
+state as an explicit parameter and therefore make it possible to handle
+thread-local PRNGs.  Beside this there are no difference.  In fact, the
+four functions already discussed are implemented internally using the
+following interfaces.
+
+The @file{stdlib.h} header contains a definition of the following type:
+
+@comment stdlib.h
+@comment GNU
+@deftp {Data Type} {struct random_data}
+
+Objects of type @code{struct random_data} contain the information
+necessary to represent the state of the PRNG.  Although a complete
+definition of the type is present the type should be treated as opaque.
+@end deftp
+
+The functions modifying the state follow exactly the already described
+functions.
+
+@comment stdlib.h
+@comment GNU
+@deftypefun int random_r (struct random_data *restrict @var{buf}, int32_t *restrict @var{result})
+The @code{random_r} function behaves exactly like the @code{random}
+function except that it uses and modifies the state in the object
+pointed to by the first parameter instead of the global state.
+@end deftypefun
+
+@comment stdlib.h
+@comment GNU
+@deftypefun int srandom_r (unsigned int @var{seed}, struct random_data *@var{buf})
+The @code{srandom_r} function behaves exactly like the @code{srandom}
+function except that it uses and modifies the state in the object
+pointed to by the second parameter instead of the global state.
+@end deftypefun
+
+@comment stdlib.h
+@comment GNU
+@deftypefun int initstate_r (unsigned int @var{seed}, char *restrict @var{statebuf}, size_t @var{statelen}, struct random_data *restrict @var{buf})
+The @code{initstate_r} function behaves exactly like the @code{initstate}
+function except that it uses and modifies the state in the object
+pointed to by the fourth parameter instead of the global state.
+@end deftypefun
+
+@comment stdlib.h
+@comment GNU
+@deftypefun int setstate_r (char *restrict @var{statebuf}, struct random_data *restrict @var{buf})
+The @code{setstate_r} function behaves exactly like the @code{setstate}
+function except that it uses and modifies the state in the object
+pointed to by the first parameter instead of the global state.
+@end deftypefun
+
 @node SVID Random
 @subsection SVID Random Number Function
 
index f9f2e7c..d0775b8 100644 (file)
@@ -1379,7 +1379,7 @@ get this information two functions.  They are declared in the file
 
 @comment sys/sysinfo.h
 @comment GNU
-@deftypefun long int get_phys_pages (void)
+@deftypefun {long int} get_phys_pages (void)
 The @code{get_phys_pages} function returns the total number of pages of
 physical the system has.  To get the amount of memory this number has to
 be multiplied by the page size.
@@ -1389,7 +1389,7 @@ This function is a GNU extension.
 
 @comment sys/sysinfo.h
 @comment GNU
-@deftypefun long int get_avphys_pages (void)
+@deftypefun {long int} get_avphys_pages (void)
 The @code{get_phys_pages} function returns the number of available pages of
 physical the system has.  To get the amount of memory this number has to
 be multiplied by the page size.
index 66c4a88..90f6a69 100644 (file)
@@ -625,7 +625,7 @@ anyway.
 
 @comment unistd.h
 @comment ???
-@deftypefun long int syscall (long int @var{sysno}, ...)
+@deftypefun {long int} syscall (long int @var{sysno}, ...)
 
 @code{syscall} performs a generic system call.
 
diff --git a/scripts/documented.sh b/scripts/documented.sh
new file mode 100644 (file)
index 0000000..85fb868
--- /dev/null
@@ -0,0 +1,102 @@
+#! /bin/sh
+bindir=$1
+
+VERSION=1.0
+
+egrep -h @deftypefunx? *.texi ../linuxthreads/*.texi |
+sed -e 's/@deftypefunx*[[:space:]]*\({[^{]*}\|[[:alnum:]_]*\)[[:space:]]*\([[:alnum:]_]*\).*/\2/' -e '/^@/d' |
+sed -e '/^obstack_/d' -e '/^\([lf]\|\)stat\(\|64\)$/d' -e '/^mknod$/d' |
+sed -e '/^signbit$/d' -e '/^sigsetjmp$/d' |
+sed -e '/^pthread_cleanup/d' -e '/^IFTODT$/d' -e '/^DTTOIF$/d' |
+sed -e '/^__fwriting$/d' -e '/^__fwritable$/d' -e '/^__fsetlocking$/d' |
+sed -e '/^__freading$/d' -e '/^__freadable$/d' -e '/^__fpurge$/d' |
+sed -e '/^__fpending$/d' -e '/^__flbf$/d' -e '/^__fbufsize$/d' |
+sed -e '/^alloca$/d' |
+sort -u > DOCUMENTED
+
+nm --extern --define $bindir/libc.so $bindir/math/libm.so $bindir/rt/librt.so $bindir/linuxthreads/libpthread.so $bindir/dlfcn/libdl.so $bindir/crypt/libcrypt.so $bindir/login/libutil.so |
+egrep " [TW] ([[:alpha:]]|_[[:alpha:]])" |
+sed 's/\(@.*\)//' |
+cut -b 12- |
+sed -e '/^_IO/d' -e '/^_dl/d' -e '/^_pthread/d' -e '/^_obstack/d' |
+sed -e '/^_argp/d' -e '/^_authenticate$/d' -e '/^_environ$/d' |
+sed -e '/^_errno$/d' -e '/^_h_errno$/d' -e '/^_longjmp$/d' |
+sed -e '/^_mcleanup$/d' -e '/^_rpc_dtablesize$/d' -e '/^_seterr_reply$/d' |
+sed -e '/^_nss/d' -e '/^_setjmp$/d' |
+sort -u > AVAILABLE
+
+cat <<EOF
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+  <head>
+    <title>Undocumented glibc functions</title>
+  </head>
+
+  <body>
+    <center><h1>Undocumented <tt>glibc</tt> functions</h1></center>
+
+    <p>The following table includes names of the function in glibc
+    which are not yet documented in the manual.  This list is
+    automatically created and therefore might contain errors.  Please
+    check the latest manual (available from the CVS archive) before
+    starting to work.  It might also be good to let me know in
+    advanace on which functions you intend to work to avoid
+    duplication.</p>
+
+    <p>A few comments:</p>
+
+    <ul>
+      <li>Some functions in the list are much less important than
+      others.  Please prioritize.</li>
+
+      <li>Similarly for the LFS functions (those ending in 64).</li>
+    </ul>
+
+    <p>The function sombody already volunteered to document are marked
+    with a reference to the person.</p>
+
+    <center><table>
+EOF
+
+n=0
+diff -y --width=60 --suppress-common-lines DOCUMENTED AVAILABLE |
+expand | cut -b 33- | sed '/^[[:space:]]*$/d' |
+while read name; do
+  line="$line
+<td><tt>$name</tt></td>"
+  n=$(expr $n + 1)
+  if [ $n -eq 4 ]; then
+    echo "<tr>
+$line
+</tr>"
+    line=""
+    n=0
+  fi
+done
+if [ $n -gt 0 ]; then
+  if [ $n -eq 1 ]; then
+    line="$line
+<td></td>"
+  fi
+  if [ $n -eq 2 ]; then
+    line="$line
+<td></td>"
+  fi
+  if [ $n -eq 3 ]; then
+    line="$line
+<td></td>"
+  fi
+  echo "<tr>
+$line
+</tr>"
+fi
+
+cat <<EOF
+    </table></center>
+
+    <hr>
+    <address><a href="mailto:drepper@redhat.com">Ulrich Drepper</a></address>
+Generated on $(date) with documented.sh version $VERSION
+  </body>
+</html>
+EOF
diff --git a/sysdeps/unix/sysv/linux/cris/setresgid.c b/sysdeps/unix/sysv/linux/cris/setresgid.c
new file mode 100644 (file)
index 0000000..daca1a4
--- /dev/null
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setresgid.c>
diff --git a/sysdeps/unix/sysv/linux/cris/setresuid.c b/sysdeps/unix/sysv/linux/cris/setresuid.c
new file mode 100644 (file)
index 0000000..3aeabe9
--- /dev/null
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setresuid.c>