annotate src/fftw-3.3.8/threads/f77api.c @ 83:ae30d91d2ffe

Replace these with versions built using an older toolset (so as to avoid ABI compatibilities when linking on Ubuntu 14.04 for packaging purposes)
author Chris Cannam
date Fri, 07 Feb 2020 11:51:13 +0000
parents d0c2a83c1364
children
rev   line source
Chris@82 1 /*
Chris@82 2 * Copyright (c) 2003, 2007-14 Matteo Frigo
Chris@82 3 * Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology
Chris@82 4 *
Chris@82 5 * This program is free software; you can redistribute it and/or modify
Chris@82 6 * it under the terms of the GNU General Public License as published by
Chris@82 7 * the Free Software Foundation; either version 2 of the License, or
Chris@82 8 * (at your option) any later version.
Chris@82 9 *
Chris@82 10 * This program is distributed in the hope that it will be useful,
Chris@82 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@82 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@82 13 * GNU General Public License for more details.
Chris@82 14 *
Chris@82 15 * You should have received a copy of the GNU General Public License
Chris@82 16 * along with this program; if not, write to the Free Software
Chris@82 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Chris@82 18 *
Chris@82 19 */
Chris@82 20
Chris@82 21 #include "api/api.h"
Chris@82 22
Chris@82 23 /* if F77_FUNC is not defined, then we don't know how to mangle identifiers
Chris@82 24 for the Fortran linker, and we must omit the f77 API. */
Chris@82 25 #if defined(F77_FUNC) || defined(WINDOWS_F77_MANGLING)
Chris@82 26
Chris@82 27 #include "api/x77.h"
Chris@82 28
Chris@82 29 #define F77(a, A) F77x(x77(a), X77(A))
Chris@82 30
Chris@82 31 #ifndef WINDOWS_F77_MANGLING
Chris@82 32
Chris@82 33 #if defined(F77_FUNC)
Chris@82 34 # define F77x(a, A) F77_FUNC(a, A)
Chris@82 35 # include "f77funcs.h"
Chris@82 36 #endif
Chris@82 37
Chris@82 38 #if defined(F77_FUNC_) && !defined(F77_FUNC_EQUIV)
Chris@82 39 # undef F77x
Chris@82 40 # define F77x(a, A) F77_FUNC_(a, A)
Chris@82 41 # include "f77funcs.h"
Chris@82 42 #endif
Chris@82 43
Chris@82 44 #else /* WINDOWS_F77_MANGLING */
Chris@82 45
Chris@82 46 /* Various mangling conventions common (?) under Windows. */
Chris@82 47
Chris@82 48 /* g77 */
Chris@82 49 # define WINDOWS_F77_FUNC(a, A) a ## __
Chris@82 50 # define F77x(a, A) WINDOWS_F77_FUNC(a, A)
Chris@82 51 # include "f77funcs.h"
Chris@82 52
Chris@82 53 /* Intel, etc. */
Chris@82 54 # undef WINDOWS_F77_FUNC
Chris@82 55 # define WINDOWS_F77_FUNC(a, A) a ## _
Chris@82 56 # include "f77funcs.h"
Chris@82 57
Chris@82 58 /* Digital/Compaq/HP Visual Fortran, Intel Fortran. stdcall attribute
Chris@82 59 is apparently required to adjust for calling conventions (callee
Chris@82 60 pops stack in stdcall). See also:
Chris@82 61 http://msdn.microsoft.com/library/en-us/vccore98/html/_core_mixed.2d.language_programming.3a_.overview.asp
Chris@82 62 */
Chris@82 63 # undef WINDOWS_F77_FUNC
Chris@82 64 # if defined(__GNUC__)
Chris@82 65 # define WINDOWS_F77_FUNC(a, A) __attribute__((stdcall)) A
Chris@82 66 # elif defined(_MSC_VER) || defined(_ICC) || defined(_STDCALL_SUPPORTED)
Chris@82 67 # define WINDOWS_F77_FUNC(a, A) __stdcall A
Chris@82 68 # else
Chris@82 69 # define WINDOWS_F77_FUNC(a, A) A /* oh well */
Chris@82 70 # endif
Chris@82 71 # include "f77funcs.h"
Chris@82 72
Chris@82 73 #endif /* WINDOWS_F77_MANGLING */
Chris@82 74
Chris@82 75 #endif /* F77_FUNC */