blob: 388ee8a281a5254d51ff0c0bca00851922441f9b [file] [log] [blame]
Gary Klimowicz9e7548a2019-12-20 12:52:07 -08001#if 0 /*===-- runtime/magic-numbers.h -----------------------------------===*/
Gary Klimowicz3e6560682019-12-11 11:13:48 -08002/*
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 *
Gary Klimowicz9e7548a2019-12-20 12:52:07 -08007 *===--------------------------------------------------------------------===*/
Gary Klimowicz3e6560682019-12-11 11:13:48 -08008#endif
9#if 0
10This header can be included into both Fortran and C.
peter klauslerfc94aa62019-10-11 13:46:58 -070011
12This file defines various code values that need to be exported
13to predefined Fortran standard modules as well as to C/C++
14code in the compiler and runtime library.
15These include:
16 - the error/end code values that can be returned
17 to an IOSTAT= or STAT= specifier on a Fortran I/O statement
18 or coindexed data reference (see Fortran 2018 12.11.5,
19 16.10.2, and 16.10.2.33)
peter klausler491122d2020-01-16 13:51:25 -080020Codes from <errno.h>, e.g. ENOENT, are assumed to be positive
21and are used "raw" as IOSTAT values.
peter klausler8df28f02020-11-10 15:13:02 -080022
23CFI_ERROR_xxx and CFI_INVALID_xxx macros from ISO_Fortran_binding.h
24have small positive values. The FORTRAN_RUNTIME_STAT_xxx macros here
25start at 100 so as to never conflict with those codes.
peter klauslerfc94aa62019-10-11 13:46:58 -070026#endif
27#ifndef FORTRAN_RUNTIME_MAGIC_NUMBERS_H_
28#define FORTRAN_RUNTIME_MAGIC_NUMBERS_H_
29
30#define FORTRAN_RUNTIME_IOSTAT_END (-1)
31#define FORTRAN_RUNTIME_IOSTAT_EOR (-2)
32#define FORTRAN_RUNTIME_IOSTAT_FLUSH (-3)
peter klausler3b635712020-02-13 14:41:56 -080033#define FORTRAN_RUNTIME_IOSTAT_INQUIRE_INTERNAL_UNIT 256
peter klauslerfc94aa62019-10-11 13:46:58 -070034
peter klausler8df28f02020-11-10 15:13:02 -080035#define FORTRAN_RUNTIME_STAT_FAILED_IMAGE 101
36#define FORTRAN_RUNTIME_STAT_LOCKED 102
37#define FORTRAN_RUNTIME_STAT_LOCKED_OTHER_IMAGE 103
38#define FORTRAN_RUNTIME_STAT_STOPPED_IMAGE 104
39#define FORTRAN_RUNTIME_STAT_UNLOCKED 105
40#define FORTRAN_RUNTIME_STAT_UNLOCKED_FAILED_IMAGE 106
peter klauslerfc94aa62019-10-11 13:46:58 -070041#endif