Warning: This file is not a C or C++ file. It does not have highlighting.
1 | //===-- include/flang/Runtime/extensions.h ----------------------*- C++ -*-===// |
---|---|
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | // These C-coded entry points with Fortran-mangled names implement legacy |
10 | // extensions that will eventually be implemented in Fortran. |
11 | |
12 | #ifndef FORTRAN_RUNTIME_EXTENSIONS_H_ |
13 | #define FORTRAN_RUNTIME_EXTENSIONS_H_ |
14 | |
15 | #include "flang/Runtime/entry-names.h" |
16 | |
17 | #define FORTRAN_PROCEDURE_NAME(name) name##_ |
18 | |
19 | #include "flang/Runtime/entry-names.h" |
20 | #include <cstddef> |
21 | #include <cstdint> |
22 | |
23 | extern "C" { |
24 | |
25 | // CALL FLUSH(n) antedates the Fortran 2003 FLUSH statement. |
26 | void FORTRAN_PROCEDURE_NAME(flush)(const int &unit); |
27 | |
28 | // GNU extension subroutine FDATE |
29 | void FORTRAN_PROCEDURE_NAME(fdate)(char *string, std::int64_t length); |
30 | |
31 | // GNU Fortran 77 compatibility function IARGC. |
32 | std::int32_t FORTRAN_PROCEDURE_NAME(iargc)(); |
33 | |
34 | // GNU Fortran 77 compatibility subroutine GETARG(N, ARG). |
35 | void FORTRAN_PROCEDURE_NAME(getarg)( |
36 | std::int32_t &n, char *arg, std::int64_t length); |
37 | |
38 | // GNU extension subroutine GETLOG(C). |
39 | void FORTRAN_PROCEDURE_NAME(getlog)(char *name, std::int64_t length); |
40 | |
41 | // GNU extension function STATUS = SIGNAL(number, handler) |
42 | std::int64_t RTNAME(Signal)(std::int64_t number, void (*handler)(int)); |
43 | |
44 | // GNU extension subroutine SLEEP(SECONDS) |
45 | void RTNAME(Sleep)(std::int64_t seconds); |
46 | |
47 | // GNU extension function ACCESS(NAME, MODE) |
48 | // TODO: not supported on Windows |
49 | #ifndef _WIN32 |
50 | std::int64_t FORTRAN_PROCEDURE_NAME(access)(const char *name, |
51 | std::int64_t nameLength, const char *mode, std::int64_t modeLength); |
52 | #endif |
53 | |
54 | } // extern "C" |
55 | #endif // FORTRAN_RUNTIME_EXTENSIONS_H_ |
56 |
Warning: This file is not a C or C++ file. It does not have highlighting.