Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert to using Fortran/C API #20

Closed
edwardhartnett opened this issue Oct 16, 2020 · 3 comments
Closed

convert to using Fortran/C API #20

edwardhartnett opened this issue Oct 16, 2020 · 3 comments

Comments

@edwardhartnett
Copy link
Contributor

There is now a standard way to call C from Fortran.

We are doing this sort of thing, but it is no longer necessary (from src/bufrlib.h):

/*
** On certain operating systems, the FORTRAN compiler appends an underscore
** to subprogram names in its object namespace.  Therefore, on such systems,
** a matching underscore must be appended to any C language references to
** the same subprogram names so that the linker can correctly resolve such
** references across the C <-> FORTRAN interface at link time.  This needs
** to be done for any subprogram that is either:
**   1) a C function, or
**   2) a FORTRAN subprogram called from C
*/
#ifdef UNDERSCORE
#define arallocc   arallocc_
#define ardllocc   ardllocc_
...
@jbathegit
Copy link
Collaborator

I haven't forgotten about this, but I'd like to get the (official ;-) 11.4.0 release out, so I'll work on this one as part of the next subsequent release.

It shouldn't be too difficult to replace all of the #ifdef UNDERSCORE defines with BIND(C) attributes on the corresponding functions, or something similar.

Version 11.5.0 automation moved this from To do to Done Apr 23, 2021
@jbathegit jbathegit reopened this Apr 23, 2021
Version 11.5.0 automation moved this from Done to In progress Apr 23, 2021
@jbathegit
Copy link
Collaborator

Sorry, accidentally hit "Close" on this, so just re-opened ;-)

@jbathegit
Copy link
Collaborator

I'm going to close this issue and leave #79 open, since they both cover the same topic.

Version 12.0.0 automation moved this from In progress to Done Aug 31, 2022
@jbathegit jbathegit removed this from Done in Version 12.0.0 Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

2 participants