1 /* Copyright (C) 2002-2003 Free Software Foundation, Inc.
2 Contributed by Andy Vaught and Paul Brook <paul@nowt.org>
4 This file is part of the GNU Fortran 95 runtime library (libgfortran).
6 Libgfortran is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 In addition to the permissions in the GNU General Public License, the
12 Free Software Foundation gives you unlimited permission to link the
13 compiled version of this file into combinations with other programs,
14 and to distribute those combinations without any restriction coming
15 from the use of this file. (The General Public License restrictions
16 do apply in other respects; for example, they cover modification of
17 the file, and distribution when not linked into a combine
20 Libgfortran is distributed in the hope that it will be useful,
21 but WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 GNU General Public License for more details.
25 You should have received a copy of the GNU General Public License
26 along with libgfortran; see the file COPYING. If not, write to
27 the Free Software Foundation, 59 Temple Place - Suite 330,
28 Boston, MA 02111-1307, USA. */
36 #include "libgfortran.h"
38 /* This is the offset (in bytes) required to cast from logical(8)* to
39 logical(4)*. and still get the same result. Will be 0 for little-endian
40 machines and 4 for big-endian machines. */
41 int l8_to_l4_offset
= 0;
44 /* Figure out endianness for this machine. */
47 determine_endianness (void)
61 runtime_error ("Unable to determine machine endianness");
66 static char **argv_save
;
68 /* Set the saved values of the command line arguments. */
71 set_args (int argc
, char **argv
)
77 /* Retrieve the saved values of the command line arguments. */
80 get_args (int *argc
, char ***argv
)
87 /* Initialize the runtime library. */
89 static void __attribute__((constructor
))
92 /* Figure out the machine endianness. */
93 determine_endianness ();
101 /* Check for special command lines. */
103 if (argc
> 1 && strcmp (argv
[1], "--help") == 0)
106 /* if (argc > 1 && strcmp(argv[1], "--resume") == 0) resume(); */
109 random_seed(NULL
,NULL
,NULL
);
113 /* Cleanup the runtime library. */
115 static void __attribute__((destructor
))