aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/intrinsics/random.c
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@gcc.gnu.org>2004-05-30 11:53:10 +0200
committerAndreas Jaeger <aj@gcc.gnu.org>2004-05-30 11:53:10 +0200
commitebeb17c7bb8d07d412b5f02786fb79b0ab0ad2b9 (patch)
tree1223700984e154f1ab12a23d68e820ab6aa591ea /libgfortran/intrinsics/random.c
parent1ea7e6ad84d890cc6d002e9e698055de85a28cfd (diff)
downloadgcc-ebeb17c7bb8d07d412b5f02786fb79b0ab0ad2b9.zip
gcc-ebeb17c7bb8d07d412b5f02786fb79b0ab0ad2b9.tar.gz
gcc-ebeb17c7bb8d07d412b5f02786fb79b0ab0ad2b9.tar.bz2
random.c: Include unistd.h for close and read prototypes...
* intrinsics/random.c: Include unistd.h for close and read prototypes, remove unneeded inclusion of assert.h. * intrinsics/abort.c: Include stdlib.h for abort prototype, remove unneeded inclusion of assert.h. From-SVN: r82442
Diffstat (limited to 'libgfortran/intrinsics/random.c')
-rw-r--r--libgfortran/intrinsics/random.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libgfortran/intrinsics/random.c b/libgfortran/intrinsics/random.c
index 09a3fea..c153924 100644
--- a/libgfortran/intrinsics/random.c
+++ b/libgfortran/intrinsics/random.c
@@ -1,5 +1,5 @@
/* Implementation of the RANDOM intrinsics
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2004 Free Software Foundation, Inc.
Contributed by Lars Segerlund <seger@linuxmail.org>
The algorithm was taken from the paper :
@@ -37,7 +37,11 @@ Boston, MA 02111-1307, USA. */
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include <assert.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#include "libgfortran.h"
/*Use the 'big' generator by default ( period -> 2**19937 ). */