Adaptation to extreme acidity and osmotic stress