Ported Apache compatibility functions