Hi,
gfortran trunk and 9-branch now have an option to automatically
generate C prototypes for old-style F77 procedures. I just did
for a in *.f; do gfortran -fsyntax-only -fc-prototypes-external $a >
${a%.f}.h; done
in the src/modules/lapack directory. This generates header
files which contain prototypes like
int ilaenv_ (int *ispec, char *name, char *opts, int *n1, int *n2, int
*n3, int *n4, size_t name_len, size_t opts_len);
void dlacn2_ (int *n, double *v, double *x, int *isgn, double *est, int
*kase, int *isave);
void dlaln2_ (int_least32_t *ltrans, int *na, int *nw, double *smin,
double *ca, double *a, int *lda, double *d1, double *d2, double *b, int
*ldb, double *wr, double *wi, double *x, int *ldx, double *scale, double
*xnorm, int *info);
void dlabad_ (double *small, double *large);
void drscl_ (int *n, double *sa, double *sx, int *incx);
void dlatrs_ (char *uplo, char *trans, char *diag, char *normin, int *n,
double *a, int *lda, double *x, double *scale, double *cnorm, int *info,
size_t uplo_len, size_t trans_len, size_t diag_len, size_t normin_len);
which could serve as the basis for adjusting the calling sequence
for the C bindings to what the compiler expects.
I checked, and it appears that at least ifort uses the same convention
as gfortran 8/9 regarding character argument passing.
Regards
Thomas