12#ifndef FORTRAN_RUNTIME_EXTENSIONS_H_
13#define FORTRAN_RUNTIME_EXTENSIONS_H_
15#include "flang/Runtime/entry-names.h"
19#define FORTRAN_PROCEDURE_NAME(name) name##_
23typedef std::uint32_t uid_t;
24typedef std::uint32_t gid_t;
37double FORTRAN_PROCEDURE_NAME(dsecnds)(
double *refTime);
38double RTNAME(Dsecnds)(
double *refTime,
const char *sourceFile,
int line);
41void FORTRAN_PROCEDURE_NAME(flush)(
const int &unit);
42void RTNAME(Flush)(
int unit);
45void FORTRAN_PROCEDURE_NAME(fdate)(
char *string, std::int64_t length);
47void RTNAME(Free)(std::intptr_t ptr);
50std::int32_t RTNAME(Fseek)(
int unit, std::int64_t zeroBasedPos,
int whence,
51 const char *sourceFileName,
int lineNumber);
52std::int64_t RTNAME(Ftell)(
int unit);
55std::int32_t FORTRAN_PROCEDURE_NAME(fnum)(
const int &unitNumber);
58std::int32_t FORTRAN_PROCEDURE_NAME(iargc)();
61void FORTRAN_PROCEDURE_NAME(getarg)(
62 std::int32_t &n,
char *arg, std::int64_t length);
65gid_t RTNAME(GetGID)();
68uid_t RTNAME(GetUID)();
71void FORTRAN_PROCEDURE_NAME(getlog)(
char *name, std::int64_t length);
74int FORTRAN_PROCEDURE_NAME(hostnm)(
char *hn,
int length);
76std::intptr_t RTNAME(Malloc)(std::size_t size);
79std::int64_t RTNAME(Signal)(std::int64_t number, void (*handler)(int));
82void RTNAME(Sleep)(std::int64_t seconds);
85std::int64_t RTNAME(time)();
90std::int64_t FORTRAN_PROCEDURE_NAME(access)(
const char *name,
91 std::int64_t nameLength,
const char *mode, std::int64_t modeLength);
95int RTNAME(Chdir)(
const char *name);
98int FORTRAN_PROCEDURE_NAME(ierrno)();
101void RTNAME(Perror)(
const char *str);
104int FORTRAN_PROCEDURE_NAME(mclock)();
107float FORTRAN_PROCEDURE_NAME(secnds)(
float *refTime);
108float RTNAME(Secnds)(
float *refTime,
const char *sourceFile,
int line);
111int RTNAME(Irand)(
int *i);
114float RTNAME(Rand)(
int *i,
const char *sourceFile,
int line);
117void FORTRAN_PROCEDURE_NAME(srand)(
int *seed);
120void RTNAME(ShowDescriptor)(
const Fortran::runtime::Descriptor *descr);
Definition bit-population-count.h:20