summaryrefslogtreecommitdiffstats
path: root/libgfortran/intrinsics/random.c
diff options
context:
space:
mode:
authoraj <aj@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-30 09:53:10 +0000
committeraj <aj@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-30 09:53:10 +0000
commitfbce28bc400682e2eb3201b5574403044a47cb09 (patch)
tree1223700984e154f1ab12a23d68e820ab6aa591ea /libgfortran/intrinsics/random.c
parent365db11eea46f39f4e46a11a6509d212e41c2307 (diff)
downloadppe42-gcc-fbce28bc400682e2eb3201b5574403044a47cb09.tar.gz
ppe42-gcc-fbce28bc400682e2eb3201b5574403044a47cb09.zip
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82442 138bc75d-0d04-0410-961f-82ee72b054a4
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 09a3fea62dd..c1539243c0e 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 ). */
OpenPOWER on IntegriCloud