mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-11-16 12:34:45 +00:00
2003-05-16 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* pppd/magic.c: Remove *rand48. * pppd/chap.c: Remove prototypes of *rand48.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2003-05-16 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* pppd/magic.c: Remove *rand48.
|
||||
* pppd/chap.c: Remove prototypes of *rand48.
|
||||
|
||||
2003-03-18 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* pppd/utils.c: Remove strlcpy, strlcat.
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h> /* drand48, srand48 */
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
@@ -115,9 +116,6 @@ static void ChapSendChallenge __P((chap_state *));
|
||||
static void ChapSendResponse __P((chap_state *));
|
||||
static void ChapGenChallenge __P((chap_state *));
|
||||
|
||||
extern double drand48 __P((void));
|
||||
extern void srand48 __P((long));
|
||||
|
||||
/*
|
||||
* ChapInit - Initialize a CHAP unit.
|
||||
*/
|
||||
|
||||
@@ -30,9 +30,6 @@
|
||||
|
||||
static const char rcsid[] = RCSID;
|
||||
|
||||
extern long mrand48 __P((void));
|
||||
extern void srand48 __P((long));
|
||||
|
||||
/*
|
||||
* magic_init - Initialize the magic number generator.
|
||||
*
|
||||
@@ -59,27 +56,3 @@ magic()
|
||||
{
|
||||
return (u_int32_t) mrand48();
|
||||
}
|
||||
|
||||
/*
|
||||
* Substitute procedures for those systems which don't have
|
||||
* drand48 et al.
|
||||
*/
|
||||
|
||||
double
|
||||
drand48()
|
||||
{
|
||||
return (double)rand() / (double)0x7fffffffL; /* 2**31-1 */
|
||||
}
|
||||
|
||||
long
|
||||
mrand48()
|
||||
{
|
||||
return rand();
|
||||
}
|
||||
|
||||
void
|
||||
srand48(seedval)
|
||||
long seedval;
|
||||
{
|
||||
srand((int)seedval);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user