Back to index

glibc  2.9
Functions
srand48_r.c File Reference
#include <stdlib.h>
#include <limits.h>

Go to the source code of this file.

Functions

int __srand48_r (long int seedval, struct drand48_data *buffer)

Function Documentation

int __srand48_r ( long int  seedval,
struct drand48_data *  buffer 
)

Definition at line 24 of file srand48_r.c.

{
  /* The standards say we only have 32 bits.  */
  if (sizeof (long int) > 4)
    seedval &= 0xffffffffl;

  buffer->__x[2] = seedval >> 16;
  buffer->__x[1] = seedval & 0xffffl;
  buffer->__x[0] = 0x330e;

  buffer->__a = 0x5deece66dull;
  buffer->__c = 0xb;
  buffer->__init = 1;

  return 0;
}

Here is the caller graph for this function: