blob: 7db6cf3f5723b76f12b99e41ff30d5ccddb0ee06 [file] [log] [blame]
//===-- runtime/environment.h -----------------------------------*- C++ -*-===//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#include "flang/Decimal/decimal.h"
#include <optional>
namespace Fortran::runtime {
class Terminator;
constexpr bool isHostLittleEndian{false};
constexpr bool isHostLittleEndian{true};
#error host endianness is not known
// External unformatted I/O data conversions
enum class Convert { Unknown, Native, LittleEndian, BigEndian, Swap };
std::optional<Convert> GetConvertFromString(const char *, std::size_t);
struct ExecutionEnvironment {
void Configure(int argc, const char *argv[], const char *envp[]);
const char *GetEnv(
const char *name, std::size_t name_length, const Terminator &terminator);
int argc;
const char **argv;
const char **envp;
int listDirectedOutputLineLengthLimit; // FORT_FMT_RECL
enum decimal::FortranRounding defaultOutputRoundingMode;
Convert conversion; // FORT_CONVERT
bool noStopMessage; // NO_STOP_MESSAGE=1 inhibits "Fortran STOP"
extern ExecutionEnvironment executionEnvironment;
} // namespace Fortran::runtime