A person having charge of a jail shall receive and keep in such jail, when room is available, all persons confined or committed thereto by process or order issued under authority of the United States until discharged according to law, the same as if such persons had been committed under process issued under authority of the state, if provision is made by the United States for the support of such persons confined, and for any additional personnel required.