fortran.hpp
Go to the documentation of this file.
1//===========================================================================
2//
3// File: fortran.hpp
4//
5// Created: Sun Jun 21 18:50:37 2009
6//
7// Author(s): Bård Skaflestad <bard.skaflestad@sintef.no>
8// Atgeirr F Rasmussen <atgeirr@sintef.no>
9//
10// $Date$
11//
12// $Revision$
13//
14//===========================================================================
15
16/*
17 Copyright 2009, 2010 SINTEF ICT, Applied Mathematics.
18 Copyright 2009, 2010 Statoil ASA.
19
20 This file is part of The Open Reservoir Simulator Project (OpenRS).
21
22 OpenRS is free software: you can redistribute it and/or modify
23 it under the terms of the GNU General Public License as published by
24 the Free Software Foundation, either version 3 of the License, or
25 (at your option) any later version.
26
27 OpenRS is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 GNU General Public License for more details.
31
32 You should have received a copy of the GNU General Public License
33 along with OpenRS. If not, see <http://www.gnu.org/licenses/>.
34*/
35
36#ifndef OPENRS_FORTRAN_HEADER
37#define OPENRS_FORTRAN_HEADER
38
39// This file relies on autoconf correctly detecting the Fortran name
40// mangling scheme and subsequently defining the macros 'F77_FUNC' and
41// 'F77_FUNC_'.
42
43
44// However, if we're not using Autoconf, then make a guess at
45// Linux conventions...
46#ifndef F77_FUNC
47#define F77_FUNC(lcase,UCASE) lcase ## _
48#endif
49
50#ifdef F77_NAME
51#undef F77_NAME
52#endif
53#define F77_NAME(lcase,UCASE) F77_FUNC(lcase,UCASE)
54
55#ifdef F77_NAME_
56#undef F77_NAME_
57#endif
58#define F77_NAME_(lcase,UCASE) F77_FUNC_(lcase,UCASE)
59
60#ifdef F77_CHARACTER_TYPE
61#undef F77_CHARACTER_TYPE
62#endif
63#define F77_CHARACTER_TYPE const char*
64
65#ifdef F77_CHARACTER
66#undef F77_CHARACTER
67#endif
68#define F77_CHARACTER(c) &c
69
70#endif // OPENRS_FORTRAN_HEADER