summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-04-09 18:07:15 +0000
committerUlrich Drepper <drepper@redhat.com>2001-04-09 18:07:15 +0000
commit4c78249d06de46901afafab3ff32b858b8c739ed (patch)
tree3c45281ff11bd3d0c584ff8382b24a5cdf13d281
parenteacde9d0818dac743bc5c2562e35f0a6e949327e (diff)
downloadglibc-4c78249d06de46901afafab3ff32b858b8c739ed.tar.gz
glibc-4c78249d06de46901afafab3ff32b858b8c739ed.tar.xz
glibc-4c78249d06de46901afafab3ff32b858b8c739ed.zip
Update.
2001-04-09  Ulrich Drepper  <drepper@redhat.com>

	* Makefile (distribute): Add scripts/documented.sh.
	* scripts/documented.sh: New file.
-rw-r--r--ChangeLog5
-rw-r--r--Makefile2
-rw-r--r--README2
-rw-r--r--README.template1
-rw-r--r--manual/math.texi82
-rw-r--r--manual/resource.texi4
-rw-r--r--manual/startup.texi2
-rw-r--r--scripts/documented.sh102
-rw-r--r--sysdeps/unix/sysv/linux/cris/setresgid.c1
-rw-r--r--sysdeps/unix/sysv/linux/cris/setresuid.c1
10 files changed, 186 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 42f4f35fd0..99451da07a 100644
--- 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.
diff --git a/Makefile b/Makefile
index 89e9078b92..6c920bc61f 100644
--- 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 43d17f2924..99fa128991 100644
--- 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:
diff --git a/README.template b/README.template
index 014ce43090..c399ba172b 100644
--- a/README.template
+++ b/README.template
@@ -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
diff --git a/manual/math.texi b/manual/math.texi
index 1ec597794f..6eba775cde 100644
--- a/manual/math.texi
+++ b/manual/math.texi
@@ -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
 
diff --git a/manual/resource.texi b/manual/resource.texi
index f9f2e7c3d8..d0775b88e7 100644
--- a/manual/resource.texi
+++ b/manual/resource.texi
@@ -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.
diff --git a/manual/startup.texi b/manual/startup.texi
index 66c4a88fd5..90f6a69ac2 100644
--- a/manual/startup.texi
+++ b/manual/startup.texi
@@ -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
index 0000000000..85fb8687c1
--- /dev/null
+++ b/scripts/documented.sh
@@ -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
index 0000000000..daca1a4833
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/setresgid.c
@@ -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
index 0000000000..3aeabe9ad7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/setresuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setresuid.c>