1 /*
2  * Copyright (c) 2017, NVIDIA CORPORATION.  All rights reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 
18 /*   io3f.h - interface to the I/O support of f90 and f77 */
19 
20 #include "global.h"
21 
22 /*
23  * 3f code uses f77 functions/globals - just define macros to access
24  * the f90 equivalents.
25  */
26 #define __fio_close(f, s) __fortio_close(f, s)
27 #define __fio_find_unit(u) __fortio_find_unit(u)
28 #define fio_fileno(f) __fort_getfd(f)
29 #ifndef WINNT
30 #define pgi_fio fioFcbTbl
31 #endif
32 
33 #if defined(WINNT)
34 #define __PC_DOS 1
35 #else
36 #define __PC_DOS 0
37 #endif
38 
39 #define FIO_FCB_ASYPTR(f) __fortio_fiofcb_asyptr(f)
40 #define FIO_FCB_ASY_RW(f) __fortio_fiofcb_asy_rw(f)
41 #define FIO_FCB_SET_ASY_RW(f, a) __fortio_set_asy_rw(f, a)
42 #define FIO_FCB_STDUNIT(f) __fortio_fiofcb_stdunit(f)
43 #define FIO_FCB_FP(f) __fortio_fiofcb_fp(f)
44 #define FIO_FCB_FORM(f) __fortio_fiofcb_form(f)
45 #define FIO_FCB_NAME(f) __fortio_fiofcb_name(f)
46 #define FIO_FCB_NEXT(f) __fortio_fiofcb_next(f)
47