Bsoft  1.9
Bernard's software package
f77_func.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 1997-1999 Massachusetts Institute of Technology
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  */
19 
20 #ifndef F77_FUNC_H
21 #define F77_FUNC_H
22 
23 #include <fftw-int.h>
24 
25 /* Define a macro to mangle function names so that they can be
26  recognized by the Fortran linker. Specifically, F77_FUNC_
27  is designed to mangle identifiers containing an underscore. */
28 
29 #ifdef FFTW_FORTRANIZE_LOWERCASE
30 # ifdef FFTW_FORTRANIZE_EXTRA_UNDERSCORE
31 # define F77_FUNC_(x,X) x ## _
32 # else
33 # define F77_FUNC_(x,X) x
34 # endif
35 #endif
36 
37 #ifdef FFTW_FORTRANIZE_LOWERCASE_UNDERSCORE
38 # ifdef FFTW_FORTRANIZE_EXTRA_UNDERSCORE
39 # define F77_FUNC_(x,X) x ## __
40 # else
41 # define F77_FUNC_(x,X) x ## _
42 # endif
43 #endif
44 
45 #ifdef FFTW_FORTRANIZE_UPPERCASE
46 # ifdef FFTW_FORTRANIZE_EXTRA_UNDERSCORE
47 # define F77_FUNC_(x,X) X ## _
48 # else
49 # define F77_FUNC_(x,X) X
50 # endif
51 #endif
52 
53 #ifdef FFTW_FORTRANIZE_UPPERCASE_UNDERSCORE
54 # ifdef FFTW_FORTRANIZE_EXTRA_UNDERSCORE
55 # define F77_FUNC_(x,X) X ## __
56 # else
57 # define F77_FUNC_(x,X) X ## _
58 # endif
59 #endif
60 
61 #endif /* F77_FUNC_H */