Boards of county commissioners, when working county prisoners on the public works of the counties shall provide, or cause to be provided, substantial food, clothes, shoes, medical attention, etc., for said prisoners as are required for state prisoners in the state.