A simpler version for the C function who is supposed to print the value of TRUE from Fortran. We support
only the fortran compilers who define the LOGICAL as being at most of the same size as an int. This commit was SVN r8306.
Этот коммит содержится в:
родитель
cae4b603f4
Коммит
906d19a73e
@ -68,11 +68,7 @@ void $ompi_ac_print_logical_fn(ompi_fortran_logical_t * logical)
|
|||||||
FILE *f=fopen("conftestval", "w");
|
FILE *f=fopen("conftestval", "w");
|
||||||
if (!f) exit(1);
|
if (!f) exit(1);
|
||||||
|
|
||||||
if( 1 == sizeof(ompi_fortran_logical_t) ) {
|
if( SIZEOF_INT >= sizeof(ompi_fortran_logical_t) ) {
|
||||||
fprintf(f, "%d\n", (int)*logical);
|
|
||||||
} else if( 2 == sizeof(ompi_fortran_logical_t) ) {
|
|
||||||
fprintf(f, "%d\n", (int)*logical);
|
|
||||||
} else if( 4 == sizeof(ompi_fortran_logical_t) ) {
|
|
||||||
fprintf(f, "%d\n", (int)*logical);
|
fprintf(f, "%d\n", (int)*logical);
|
||||||
} else {
|
} else {
|
||||||
exit(1);
|
exit(1);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user