OSDN Git Service

gcc/fortran:
[pf3gnuchains/gcc-fork.git] / libgfortran / intrinsics / iso_c_binding.h
1 /* Copyright (C) 2007 Free Software Foundation, Inc.
2    Contributed by Christopher Rickett.
3
4 This file is part of the GNU Fortran 95 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 2, or (at your option)
9 any later version.
10
11 In addition to the permissions in the GNU General Public License, the
12 Free Software Foundation gives you unlimited permission to link the
13 compiled version of this file into combinations with other programs,
14 and to distribute those combinations without any restriction coming
15 from the use of this file.  (The General Public License restrictions
16 do apply in other respects; for example, they cover modification of
17 the file, and distribution when not linked into a combine
18 executable.)
19
20 Libgfortran is distributed in the hope that it will be useful,
21 but WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23 GNU General Public License for more details.
24
25 You should have received a copy of the GNU General Public License
26 along with Libgfortran; see the file COPYING.  If not, write to
27 the Free Software Foundation, 51 Franklin Street, Fifth Floor,
28 Boston, MA 02110-1301, USA.  */
29
30
31 /* Declarations for ISO_C_BINDING library helper functions.  */
32
33 #ifndef GFOR_ISO_C_BINDING_H
34 #define GFOR_ISO_C_BINDING_H
35
36 #include "libgfortran.h"
37
38 typedef struct c_ptr
39 {
40   void *c_address;
41 }
42 c_ptr_t;
43
44 typedef struct c_funptr
45 {
46   void *c_address;
47 }
48 c_funptr_t;
49
50 #define ISO_C_BINDING_PREFIX(a) __iso_c_binding_##a
51
52 void ISO_C_BINDING_PREFIX(c_f_pointer)(void *, gfc_array_void *,
53                                        const array_t *, int, int);
54
55 /* The second param here may change, once procedure pointers are
56    implemented.  */
57 void ISO_C_BINDING_PREFIX(c_f_procpointer) (void *, gfc_array_void *);
58
59 void ISO_C_BINDING_PREFIX(c_f_pointer_u0) (void *, gfc_array_void *,
60                                            const array_t *);
61 void ISO_C_BINDING_PREFIX(c_f_pointer_d0) (void *, gfc_array_void *,
62                                            const array_t *);
63
64 #endif