annotate src/fftw-3.3.8/threads/f77api.c @ 168:ceec0dd9ec9c

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