add some fortran and c++ patches for 4.9