This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++/1618: lrand48() undefined
- To: gcc-bugs at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org, david dot eller at gmx dot net
- Subject: Re: libstdc++/1618: lrand48() undefined
- From: Benjamin Kosnik <bkoz at redhat dot com>
- Date: Thu, 11 Jan 2001 15:11:47 -0800
Hmm. this works for me:
#include <algorithm>
int main()
{
char slit[35] = "gilda-touch of evil-key largo";
std::random_shuffle(slit, slit + 5);
return 0;
}
Your /usr/include/stdlib.h (465) should have this:
#if defined __USE_SVID || defined __USE_XOPEN
/* System V style 48-bit random number generator functions. */
/* Return non-negative, double-precision floating-point value in [0.0,1.0). */
extern double drand48 (void) __THROW;
extern double erand48 (unsigned short int __xsubi[3]) __THROW;
/* Return non-negative, long integer in [0,2^31). */
extern long int lrand48 (void) __THROW;
extern long int nrand48 (unsigned short int __xsubi[3]) __THROW;