1*3e4d5678SCameron Smith module mkdir_mod 2*3e4d5678SCameron Smith implicit none 3*3e4d5678SCameron Smith interface 4*3e4d5678SCameron Smith integer function c_mkdir(path) bind(C, name="ph_mkdir") 5*3e4d5678SCameron Smith use iso_c_binding 6*3e4d5678SCameron Smith character(c_char) :: path(*) 7*3e4d5678SCameron Smith end function 8*3e4d5678SCameron Smith end interface 9*3e4d5678SCameron Smith contains 10*3e4d5678SCameron Smith subroutine mkdir(path, err) 11*3e4d5678SCameron Smith use iso_c_binding 12*3e4d5678SCameron Smith character(len=*) :: path 13*3e4d5678SCameron Smith integer, optional, intent(out) :: err 14*3e4d5678SCameron Smith integer :: loc_err 15*3e4d5678SCameron Smith loc_err = c_mkdir(path//c_null_char) 16*3e4d5678SCameron Smith if( present(err) ) err = loc_err 17*3e4d5678SCameron Smith end subroutine 18*3e4d5678SCameron Smith end module mkdir_mod 19