99#define PETSC_MINOR_MAX 23
1010
1111module CLI
12- use , intrinsic :: ISO_fortran_env
12+ use , intrinsic :: ISO_Fortran_env
1313 use , intrinsic :: ISO_C_binding
1414
1515 use PETScSys
@@ -31,7 +31,7 @@ module CLI
3131 CLI_jobName, & ! < name of the job (will be used for DADF5 result file)
3232 CLI_jobID ! < unique job ID (UUID)
3333
34- #ifdef BOOST
34+ #if (defined( BOOST) && !defined(OLD_STYLE_C_TO_FORTRAN_STRING))
3535 type :: tCLIBuffer
3636 character (len= :, kind= C_CHAR), pointer :: buf
3737 end type tCLIBuffer
@@ -46,7 +46,7 @@ module CLI
4646
4747interface
4848 function C_CLI__new (argc , argv , worldrank ) result(this) bind(C, name= ' CLI__new' )
49- use , intrinsic :: iso_c_binding , only: C_INT, C_PTR
49+ use , intrinsic :: ISO_C_binding , only: C_INT, C_PTR
5050 integer (C_INT), intent (in ) :: argc
5151 type (C_PTR), intent (in ) :: argv(* ) ! MD I think this should be dimension(:), but wait for working ifx
5252 integer (C_INT), intent (in ) :: worldrank
@@ -55,7 +55,7 @@ end function C_CLI__new
5555
5656 subroutine C_CLI_getParsedArgs (cli , geom , load , material , numerics , jobname , uuid , restart , stat ) &
5757 bind(C, name= ' CLI_getParsedArgs' )
58- use iso_c_binding
58+ use ISO_C_binding
5959 type (C_PTR), value :: cli
6060 character (kind= C_CHAR,len= :), allocatable , intent (out ) :: geom, load, material, numerics, jobname, uuid
6161 integer (C_INT), intent (out ) :: restart, stat
@@ -106,15 +106,15 @@ subroutine CLI_init()
106106#ifdef PETSC_DOI
107107 character (len=* ), parameter :: PETSc_DOI = PETSC_DOI
108108#endif
109- #ifdef BOOST
109+ #if (defined( BOOST) && !defined(OLD_STYLE_C_TO_FORTRAN_STRING))
110110 type (C_PTR) :: CLI_ = C_NULL_PTR
111111 type (tCLIArgs) :: cliArgs
112112 integer (C_INT) :: stat
113113#endif
114114
115115 print ' (/,1x,a)' , ' <<<+- CLI init -+>>>'
116116
117- #ifdef BOOST
117+ #if (defined( BOOST) && !defined(OLD_STYLE_C_TO_FORTRAN_STRING))
118118 print ' (a)' , ' Using boost, experimental C++ feature'
119119
120120 call cliArgs% copyCommandLineArgs()
@@ -242,7 +242,7 @@ subroutine CLI_init()
242242 if (allocated (numericsArg)) &
243243 print ' (1x,a)' , ' Numerics config: ' // IO_glueDiffering(CLI_numericsFile,numericsArg)
244244 print ' (1x,a)' , ' Job name: ' // CLI_jobName
245- #ifdef BOOST
245+ #if (defined( BOOST) && !defined(OLD_STYLE_C_TO_FORTRAN_STRING))
246246 print ' (1x,a)' , ' Job ID: ' // CLI_jobID
247247#endif
248248 if (CLI_restartInc > 0 ) &
@@ -314,7 +314,7 @@ subroutine printCompileOptions() bind(C, name="F_printCompileOptions")
314314
315315end subroutine printCompileOptions
316316
317- #ifdef BOOST
317+ #if (defined( BOOST) && !defined(OLD_STYLE_C_TO_FORTRAN_STRING))
318318!- -------------------------------------------------------------------------------------------------
319319! > @brief Copy command line args to c strings for boost-processing,
320320! allocate one extra element for the NULL termination.
0 commit comments