From 687193750c5b58febfbd3571407688ba1c852c36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Wed, 2 Nov 2005 14:29:50 +0000 Subject: [PATCH] added drand48, erand48, lrand48, nrand48, mrand48, jrand48, srand48, seed48, and lcong48 functions fixed bug #63 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14645 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/libroot/posix/glibc/stdlib/Jamfile | 24 +++++++++++++++++-- .../libroot/posix/glibc/stdlib/drand48.c | 4 +++- .../libroot/posix/glibc/stdlib/erand48.c | 4 +++- .../libroot/posix/glibc/stdlib/jrand48.c | 4 +++- .../libroot/posix/glibc/stdlib/lcong48.c | 4 +++- .../libroot/posix/glibc/stdlib/lrand48.c | 4 +++- .../libroot/posix/glibc/stdlib/mrand48.c | 4 +++- .../libroot/posix/glibc/stdlib/nrand48.c | 4 +++- .../libroot/posix/glibc/stdlib/seed48.c | 4 +++- .../libroot/posix/glibc/stdlib/srand48.c | 4 +++- 10 files changed, 49 insertions(+), 11 deletions(-) diff --git a/src/system/libroot/posix/glibc/stdlib/Jamfile b/src/system/libroot/posix/glibc/stdlib/Jamfile index 16ea5113ea..9a47de8035 100644 --- a/src/system/libroot/posix/glibc/stdlib/Jamfile +++ b/src/system/libroot/posix/glibc/stdlib/Jamfile @@ -1,9 +1,29 @@ SubDir HAIKU_TOP src system libroot posix glibc stdlib ; -SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch - $(TARGET_ARCH) ; +SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch $(TARGET_ARCH) ; +SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include ; +SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc ; KernelMergeObject posix_gnu_stdlib.o : + drand48.c + drand48_r.c + drand48-iter.c + erand48.c + erand48_r.c fpioconst.c + jrand48.c + jrand48_r.c + lcong48.c + lcong48_r.c + lrand48.c + lrand48_r.c + mrand48.c + mrand48_r.c + nrand48.c + nrand48_r.c + seed48.c + seed48_r.c + srand48.c + srand48_r.c : -fPIC -DPIC ; diff --git a/src/system/libroot/posix/glibc/stdlib/drand48.c b/src/system/libroot/posix/glibc/stdlib/drand48.c index 06b586f812..cff95e10a7 100644 --- a/src/system/libroot/posix/glibc/stdlib/drand48.c +++ b/src/system/libroot/posix/glibc/stdlib/drand48.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,2001,2002 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1998, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , August 1995. @@ -19,6 +19,8 @@ #include +/* Global state for non-reentrant functions. Defined in drand48-iter.c. */ +extern struct drand48_data __libc_drand48_data; double drand48 () diff --git a/src/system/libroot/posix/glibc/stdlib/erand48.c b/src/system/libroot/posix/glibc/stdlib/erand48.c index 7ed4e4cab6..cceba27aea 100644 --- a/src/system/libroot/posix/glibc/stdlib/erand48.c +++ b/src/system/libroot/posix/glibc/stdlib/erand48.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , August 1995. @@ -19,6 +19,8 @@ #include +/* Global state for non-reentrant functions. Defined in drand48-iter.c. */ +extern struct drand48_data __libc_drand48_data; double erand48 (xsubi) diff --git a/src/system/libroot/posix/glibc/stdlib/jrand48.c b/src/system/libroot/posix/glibc/stdlib/jrand48.c index 81fa8241ef..1df00bc3a1 100644 --- a/src/system/libroot/posix/glibc/stdlib/jrand48.c +++ b/src/system/libroot/posix/glibc/stdlib/jrand48.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , August 1995. @@ -19,6 +19,8 @@ #include +/* Global state for non-reentrant functions. Defined in drand48-iter.c. */ +extern struct drand48_data __libc_drand48_data; long int jrand48 (xsubi) diff --git a/src/system/libroot/posix/glibc/stdlib/lcong48.c b/src/system/libroot/posix/glibc/stdlib/lcong48.c index 075494a888..b9e683eabe 100644 --- a/src/system/libroot/posix/glibc/stdlib/lcong48.c +++ b/src/system/libroot/posix/glibc/stdlib/lcong48.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , August 1995. @@ -19,6 +19,8 @@ #include +/* Global state for non-reentrant functions. Defined in drand48-iter.c. */ +extern struct drand48_data __libc_drand48_data; void lcong48 (param) diff --git a/src/system/libroot/posix/glibc/stdlib/lrand48.c b/src/system/libroot/posix/glibc/stdlib/lrand48.c index a76d77365c..97773b4c73 100644 --- a/src/system/libroot/posix/glibc/stdlib/lrand48.c +++ b/src/system/libroot/posix/glibc/stdlib/lrand48.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,2001,2002 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1998, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , August 1995. @@ -19,6 +19,8 @@ #include +/* Global state for non-reentrant functions. Defined in drand48-iter.c. */ +extern struct drand48_data __libc_drand48_data; long int lrand48 () diff --git a/src/system/libroot/posix/glibc/stdlib/mrand48.c b/src/system/libroot/posix/glibc/stdlib/mrand48.c index cb60191110..09c9666729 100644 --- a/src/system/libroot/posix/glibc/stdlib/mrand48.c +++ b/src/system/libroot/posix/glibc/stdlib/mrand48.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,2001,2002 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1998, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , August 1995. @@ -19,6 +19,8 @@ #include +/* Global state for non-reentrant functions. Defined in drand48-iter.c. */ +extern struct drand48_data __libc_drand48_data; long int mrand48 () diff --git a/src/system/libroot/posix/glibc/stdlib/nrand48.c b/src/system/libroot/posix/glibc/stdlib/nrand48.c index 0c6b2707b8..4e572a4182 100644 --- a/src/system/libroot/posix/glibc/stdlib/nrand48.c +++ b/src/system/libroot/posix/glibc/stdlib/nrand48.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , August 1995. @@ -19,6 +19,8 @@ #include +/* Global state for non-reentrant functions. Defined in drand48-iter.c. */ +extern struct drand48_data __libc_drand48_data; long int nrand48 (xsubi) diff --git a/src/system/libroot/posix/glibc/stdlib/seed48.c b/src/system/libroot/posix/glibc/stdlib/seed48.c index 7b23d2fba9..548231a642 100644 --- a/src/system/libroot/posix/glibc/stdlib/seed48.c +++ b/src/system/libroot/posix/glibc/stdlib/seed48.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,2001,2002 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1998, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , August 1995. @@ -19,6 +19,8 @@ #include +/* Global state for non-reentrant functions. Defined in drand48-iter.c. */ +extern struct drand48_data __libc_drand48_data; unsigned short int * seed48 (seed16v) diff --git a/src/system/libroot/posix/glibc/stdlib/srand48.c b/src/system/libroot/posix/glibc/stdlib/srand48.c index c8ea919877..6c5d94f19e 100644 --- a/src/system/libroot/posix/glibc/stdlib/srand48.c +++ b/src/system/libroot/posix/glibc/stdlib/srand48.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , August 1995. @@ -19,6 +19,8 @@ #include +/* Global state for non-reentrant functions. Defined in drand48-iter.c. */ +extern struct drand48_data __libc_drand48_data; void srand48 (seedval)