A U.S. appeals court on Wednesday upheld the U.S. military's longstanding policy banning people with HIV from enlisting, rejecting claims that advances in medical treatment made it unreasonable.