1 |
733 |
jeremybenn |
/* Copyright (C) 2010, 2011
|
2 |
|
|
Free Software Foundation, Inc.
|
3 |
|
|
|
4 |
|
|
This file is part of the GNU Fortran runtime library (libgfortran).
|
5 |
|
|
|
6 |
|
|
Libgfortran is free software; you can redistribute it and/or modify
|
7 |
|
|
it under the terms of the GNU General Public License as published by
|
8 |
|
|
the Free Software Foundation; either version 3, or (at your option)
|
9 |
|
|
any later version.
|
10 |
|
|
|
11 |
|
|
Libgfortran is distributed in the hope that it will be useful,
|
12 |
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
|
|
GNU General Public License for more details.
|
15 |
|
|
|
16 |
|
|
Under Section 7 of GPL version 3, you are granted additional
|
17 |
|
|
permissions described in the GCC Runtime Library Exception, version
|
18 |
|
|
3.1, as published by the Free Software Foundation.
|
19 |
|
|
|
20 |
|
|
You should have received a copy of the GNU General Public License and
|
21 |
|
|
a copy of the GCC Runtime Library Exception along with this program;
|
22 |
|
|
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
23 |
|
|
<http://www.gnu.org/licenses/>. */
|
24 |
|
|
|
25 |
|
|
/* Note: This file needs to be a separate translation unit (.o file)
|
26 |
|
|
to make sure that for static linkage, the libquad dependence only
|
27 |
|
|
occurs if needed. */
|
28 |
|
|
|
29 |
|
|
#include "io.h"
|
30 |
|
|
|
31 |
|
|
|
32 |
|
|
#if defined(GFC_REAL_16_IS_FLOAT128)
|
33 |
|
|
|
34 |
|
|
/* The prototypes for the called procedures in transfer.c. */
|
35 |
|
|
|
36 |
|
|
extern void transfer_real (st_parameter_dt *, void *, int);
|
37 |
|
|
export_proto(transfer_real);
|
38 |
|
|
|
39 |
|
|
extern void transfer_real_write (st_parameter_dt *, void *, int);
|
40 |
|
|
export_proto(transfer_real_write);
|
41 |
|
|
|
42 |
|
|
extern void transfer_complex (st_parameter_dt *, void *, int);
|
43 |
|
|
export_proto(transfer_complex);
|
44 |
|
|
|
45 |
|
|
extern void transfer_complex_write (st_parameter_dt *, void *, int);
|
46 |
|
|
export_proto(transfer_complex_write);
|
47 |
|
|
|
48 |
|
|
|
49 |
|
|
/* The prototypes for the procedures in this file. */
|
50 |
|
|
|
51 |
|
|
extern void transfer_real128 (st_parameter_dt *, void *, int);
|
52 |
|
|
export_proto(transfer_real128);
|
53 |
|
|
|
54 |
|
|
extern void transfer_real128_write (st_parameter_dt *, void *, int);
|
55 |
|
|
export_proto(transfer_real128_write);
|
56 |
|
|
|
57 |
|
|
extern void transfer_complex128 (st_parameter_dt *, void *, int);
|
58 |
|
|
export_proto(transfer_complex128);
|
59 |
|
|
|
60 |
|
|
extern void transfer_complex128_write (st_parameter_dt *, void *, int);
|
61 |
|
|
export_proto(transfer_complex128_write);
|
62 |
|
|
|
63 |
|
|
|
64 |
|
|
/* Make sure that libquadmath is pulled in. The functions strtoflt128
|
65 |
|
|
and quadmath_snprintf are weakly referrenced in convert_real and
|
66 |
|
|
write_float; the pointer assignment with USED attribute make sure
|
67 |
|
|
that there is a non-weakref dependence if the quadmath functions
|
68 |
|
|
are used. That avoids segfault when libquadmath is statically linked. */
|
69 |
|
|
static void __attribute__((used)) *tmp1 = strtoflt128;
|
70 |
|
|
static void __attribute__((used)) *tmp2 = quadmath_snprintf;
|
71 |
|
|
|
72 |
|
|
void
|
73 |
|
|
transfer_real128 (st_parameter_dt *dtp, void *p, int kind)
|
74 |
|
|
{
|
75 |
|
|
transfer_real (dtp, p, kind);
|
76 |
|
|
}
|
77 |
|
|
|
78 |
|
|
|
79 |
|
|
void
|
80 |
|
|
transfer_real128_write (st_parameter_dt *dtp, void *p, int kind)
|
81 |
|
|
{
|
82 |
|
|
transfer_real (dtp, p, kind);
|
83 |
|
|
}
|
84 |
|
|
|
85 |
|
|
|
86 |
|
|
void
|
87 |
|
|
transfer_complex128 (st_parameter_dt *dtp, void *p, int kind)
|
88 |
|
|
{
|
89 |
|
|
transfer_complex (dtp, p, kind);
|
90 |
|
|
}
|
91 |
|
|
|
92 |
|
|
|
93 |
|
|
void
|
94 |
|
|
transfer_complex128_write (st_parameter_dt *dtp, void *p, int kind)
|
95 |
|
|
{
|
96 |
|
|
transfer_complex_write (dtp, p, kind);
|
97 |
|
|
}
|
98 |
|
|
#endif
|