iso_c_binding.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* Copyright (C) 2007-2015 Free Software Foundation, Inc.
  2. Contributed by Christopher Rickett.
  3. This file is part of the GNU Fortran 95 runtime library (libgfortran).
  4. Libgfortran 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 3, or (at your option)
  7. any later version.
  8. Libgfortran is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. Under Section 7 of GPL version 3, you are granted additional
  13. permissions described in the GCC Runtime Library Exception, version
  14. 3.1, as published by the Free Software Foundation.
  15. You should have received a copy of the GNU General Public License and
  16. a copy of the GCC Runtime Library Exception along with this program;
  17. see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  18. <http://www.gnu.org/licenses/>. */
  19. /* Declarations for ISO_C_BINDING library helper functions. */
  20. #ifndef GFOR_ISO_C_BINDING_H
  21. #define GFOR_ISO_C_BINDING_H
  22. #include "libgfortran.h"
  23. typedef struct c_ptr
  24. {
  25. void *c_address;
  26. }
  27. c_ptr_t;
  28. typedef struct c_funptr
  29. {
  30. void *c_address;
  31. }
  32. c_funptr_t;
  33. #define ISO_C_BINDING_PREFIX(a) __iso_c_binding_##a
  34. void ISO_C_BINDING_PREFIX(c_f_pointer)(void *, gfc_array_void *,
  35. const array_t *, int, int);
  36. void ISO_C_BINDING_PREFIX(c_f_pointer_u0) (void *, gfc_array_void *,
  37. const array_t *);
  38. void ISO_C_BINDING_PREFIX(c_f_pointer_d0) (void *, gfc_array_void *,
  39. const array_t *);
  40. #endif