Browse Source

Move the __rand48_* declarations into rand48.h, and then hide both them

and __dorand48() and __rand48_deterministic
ok deraadt@
OPENBSD_5_9
guenther 9 years ago
parent
commit
8858b239f2
7 changed files with 13 additions and 25 deletions
  1. +1
    -3
      src/lib/libc/stdlib/drand48.c
  2. +1
    -5
      src/lib/libc/stdlib/lcong48.c
  3. +1
    -3
      src/lib/libc/stdlib/lrand48.c
  4. +1
    -3
      src/lib/libc/stdlib/mrand48.c
  5. +7
    -1
      src/lib/libc/stdlib/rand48.h
  6. +1
    -5
      src/lib/libc/stdlib/seed48.c
  7. +1
    -5
      src/lib/libc/stdlib/srand48.c

+ 1
- 3
src/lib/libc/stdlib/drand48.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: drand48.c,v 1.5 2014/12/09 19:50:26 deraadt Exp $ */
/* $OpenBSD: drand48.c,v 1.6 2015/08/27 04:33:31 guenther Exp $ */
/*
* Copyright (c) 1993 Martin Birgmeier
* All rights reserved.
@ -14,8 +14,6 @@
#include "rand48.h"
extern unsigned short __rand48_seed[3];
double
drand48(void)
{


+ 1
- 5
src/lib/libc/stdlib/lcong48.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: lcong48.c,v 1.4 2014/12/08 21:45:20 deraadt Exp $ */
/* $OpenBSD: lcong48.c,v 1.5 2015/08/27 04:33:31 guenther Exp $ */
/*
* Copyright (c) 1993 Martin Birgmeier
* All rights reserved.
@ -14,10 +14,6 @@
#include "rand48.h"
extern unsigned short __rand48_seed[3];
extern unsigned short __rand48_mult[3];
extern unsigned short __rand48_add;
void
lcong48(unsigned short p[7])
{


+ 1
- 3
src/lib/libc/stdlib/lrand48.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: lrand48.c,v 1.4 2014/12/08 21:45:20 deraadt Exp $ */
/* $OpenBSD: lrand48.c,v 1.5 2015/08/27 04:33:31 guenther Exp $ */
/*
* Copyright (c) 1993 Martin Birgmeier
* All rights reserved.
@ -14,8 +14,6 @@
#include "rand48.h"
extern unsigned short __rand48_seed[3];
long
lrand48(void)
{


+ 1
- 3
src/lib/libc/stdlib/mrand48.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: mrand48.c,v 1.5 2014/12/09 00:02:18 tedu Exp $ */
/* $OpenBSD: mrand48.c,v 1.6 2015/08/27 04:33:31 guenther Exp $ */
/*
* Copyright (c) 1993 Martin Birgmeier
* All rights reserved.
@ -14,8 +14,6 @@
#include "rand48.h"
extern unsigned short __rand48_seed[3];
long
mrand48(void)
{


+ 7
- 1
src/lib/libc/stdlib/rand48.h View File

@ -10,7 +10,7 @@
* of any kind. I shall in no event be liable for anything that happens
* to anyone/anything when using this software.
*
* $OpenBSD: rand48.h,v 1.4 2014/12/08 21:45:20 deraadt Exp $
* $OpenBSD: rand48.h,v 1.5 2015/08/27 04:33:31 guenther Exp $
*/
#ifndef _RAND48_H_
@ -19,8 +19,14 @@
#include <math.h>
#include <stdlib.h>
__BEGIN_HIDDEN_DECLS
extern unsigned short __rand48_seed[3];
extern unsigned short __rand48_mult[3];
extern unsigned short __rand48_add;
void __dorand48(unsigned short[3]);
extern int __rand48_deterministic;
__END_HIDDEN_DECLS
#define RAND48_SEED_0 (0x330e)
#define RAND48_SEED_1 (0xabcd)


+ 1
- 5
src/lib/libc/stdlib/seed48.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: seed48.c,v 1.4 2014/12/08 21:45:20 deraadt Exp $ */
/* $OpenBSD: seed48.c,v 1.5 2015/08/27 04:33:31 guenther Exp $ */
/*
* Copyright (c) 1993 Martin Birgmeier
* All rights reserved.
@ -14,10 +14,6 @@
#include "rand48.h"
extern unsigned short __rand48_seed[3];
extern unsigned short __rand48_mult[3];
extern unsigned short __rand48_add;
unsigned short *
seed48(unsigned short xseed[3])
{


+ 1
- 5
src/lib/libc/stdlib/srand48.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: srand48.c,v 1.4 2014/12/08 21:45:20 deraadt Exp $ */
/* $OpenBSD: srand48.c,v 1.5 2015/08/27 04:33:31 guenther Exp $ */
/*
* Copyright (c) 1993 Martin Birgmeier
* All rights reserved.
@ -14,10 +14,6 @@
#include "rand48.h"
extern unsigned short __rand48_seed[3];
extern unsigned short __rand48_mult[3];
extern unsigned short __rand48_add;
int __rand48_deterministic;
void


Loading…
Cancel
Save